GD SPI波形,在使用过程中会写入只是写入寄存器,如果这是立马取消片选,则会错误
ST SPI波形
GD改善后,添加新的判断
void spi_write_byte(uint32_t spi_periph, uint8_t data)
{
while(RESET == spi_i2s_flag_get(spi_periph, SPI_FLAG_TBE));
spi_i2s_data_transmit(spi_periph, data);
while(SET == spi_i2s_flag_get(spi_periph, SPI_FLAG_TRANS));
}