#ifndef USTV_SPI_H
#define USTV_SPI_H


/****************************************************************************************************/
// Déclarations des prototypes de fonctions
/****************************************************************************************************/

void initSPI1(void);

void invertSPI1_CKE(void);
void invertSPI1_CKP(void);
void setSPI1_CKP_CKE(int ckp,int cke);
void setHighSpeedClk(unsigned char yn,unsigned char device);

void WriteSingleCommandSpi1( unsigned char dat, unsigned char device );
void WriteMultipleCommandSpi1( unsigned char commands[], int nbCommands, unsigned char device );
void WriteSingleCommandMultipleReadSpi1(unsigned char command, unsigned char results[], int nbResults, unsigned char device, unsigned char invertReadCKE);
void WriteMultipleCommandMultipleReadSpi1(unsigned char commands[], int nbCommands, unsigned char results[], int nbResults, unsigned char device, unsigned char invertReadCKE );
void WriteSingleCommandPlusNOPSpi1( unsigned char dat, unsigned char device );

#endif

