20 #define SPI_0_28125MHZ_CLOCK_DIVIDER 256 21 #define SPI_0_5625MHZ_CLOCK_DIVIDER 128 22 #define SPI_18MHZ_CLOCK_DIVIDER 2 23 #define SPI_9MHZ_CLOCK_DIVIDER 4 bool spiInit(SPI_TypeDef *instance)
Serial Peripheral Interface.
bool spiIsBusBusy(SPI_TypeDef *instance)
void spiTransfer(SPI_TypeDef *instance, uint8_t *out, const uint8_t *in, int len)
uint8_t spiTransferByte(SPI_TypeDef *instance, uint8_t in)
void spiSetDivisor(SPI_TypeDef *instance, uint16_t divisor)