这个是我目前的发送方式,发一个字节,中断查询是否接受一次
Uint16 SPI_SendByte(Uint16 byte)
{
Uint16 SPIRXD;
while(SpibRegs.SPISTS.bit.BUFFULL_FLAG == 1);
SpibRegs.SPITXBUF = (byte<<8);
while(SpibRegs.SPISTS.bit.INT_FLAG != 1);{}//Wait until data is received
SPIRXD = SpibRegs.SPIRXBUF;
return SPIRXD;
}
如何做出优化呢?
Susan Yang:
您可以参考下 C2000Ware_3_02_00_00\driverlib\f28004x\examples\spi 内的
spi_ex4_eeprom