Defines | |
#define | SPI_CPOL_LOW 0x00 |
Hidle clock level is low. | |
#define | SPI_CPOL_HI 0x01 |
Hidle clock level is high. | |
#define | SPI_FIRST_EDGE 0x00 |
Data sampled of first clock edge. | |
#define | SPI_SECOND_EDGE 0x02 |
Data sampled on second clock edge. | |
#define | SPI_LSB_FIRST 0x00 |
Bit order is LSB. | |
#define | SPI_MSB_FIRST 0x04 |
Bit order is MSB. | |
Functions | |
int | SPI_InitBus (unsigned int Mode, unsigned int BitPerWord) |
Set the initial state of SPI bus data lines. | |
uint32_t | SPI_DataExchange (uint32_t Data) |
SPI bus data exchange. |
#define SPI_CPOL_LOW 0x00 |
Hidle clock level is low.
/brief SPI operation mode
uint32_t SPI_DataExchange | ( | uint32_t | Data | ) |
SPI bus data exchange.
Data | data sent over the SPI bus. |
int SPI_InitBus | ( | unsigned int | Mode, | |
unsigned int | BitPerWord | |||
) |
Set the initial state of SPI bus data lines.
Mode | bus mode. | |
BitPerWord | SPI bus word size. |