This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

F280049的SPI可以多字节发送吗?

Other Parts Discussed in Thread: C2000WARE

这个是我目前的发送方式,发一个字节,中断查询是否接受一次

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;
}

如何做出优化呢?