49#define SPI1_DUMMY_DATA 0x0
141 SPI1CON1Lbits.SPIEN = 0U;
147 if(!SPI1CON1Lbits.SPIEN)
150 SPI1CON1Lbits.SPIEN = 1U;
159 while(1U == SPI1STATLbits.SPITBF)
166 while (1U == SPI1STATLbits.SPIRBE)
176 while(1U == SPI1STATLbits.SPITBF)
186 while (1U == SPI1STATLbits.SPIRBE)
196 return (!SPI1STATLbits.SPIRBE);
201 return (!SPI1STATLbits.SPITBF);
This is the generated driver header file for the SPI1 driver.
static const struct SPI1_CLIENT_CONFIG config[]
void SPI1_Initialize(void)
Initializes SPI1 module, using the given initialization data. This function must be called before any...
void SPI1_Deinitialize(void)
Deinitializes the SPI1 to POR values.
bool SPI1_Open(uint8_t spiConfigIndex)
Configures SPI1 module with user defined unique configuration.
const struct SPI_CLIENT_INTERFACE SPI1_Client
Structure object of type SPI_CLIENT_INTERFACE assigned with name displayed in the Melody Driver User ...
bool SPI1_IsRxReady(void)
Returns a boolean value if data is available to read.
uint8_t SPI1_ByteRead(void)
Reads one byte of data from SPI1.
bool SPI1_IsTxReady(void)
Returns a boolean value if data can be written.
void SPI1_Close(void)
Disables the SPI1 module.
void SPI1_ByteWrite(uint8_t byteData)
Writes one byte of data.
uint8_t SPI1_ByteExchange(uint8_t byteData)
Exchanges one byte of data. This is a blocking function.
Structure containing the function pointers of SPI CLIENT driver.
void(* Initialize)(void)
Pointer to SPIx_Initialize e.g. SPI1_Initialize.
uint16_t controlRegister1