- static uint8_t SPI1_SendByte(uint8_t byte)
- {
- SPI_I2S_ReceiveData(SPI1);
- SPI_I2S_SendData(SPI1, byte);
- while (SPI_I2S_GetFlagStatus(SPI1, SPI_I2S_FLAG_TXE) == RESET);
- while (SPI_I2S_GetFlagStatus(SPI1, SPI_I2S_FLAG_RXNE) == RESET);
- return SPI_I2S_ReceiveData(SPI1);
- }
|