unsigned char XPT2046_SendByte(unsigned char byte)
{
/* Loop while DR register in not emplty */
while (SPI_I2S_GetFlagStatus(SPI3, SPI_I2S_FLAG_TXE) == RESET);
/* Send Half Word through the SPI3 peripheral */
SPI_I2S_SendData(SPI3, byte);
/* Wait to receive a Half Word */
while (SPI_I2S_GetFlagStatus(SPI3, SPI_I2S_FLAG_RXNE) == RESET);
/* Return the Half Word read from the SPI bus */
return SPI_I2S_ReceiveData(SPI3);
}
程序一直卡死在红 {MOD}那句,不知道为什么,求教~
此帖出自小平头技术问答
一周热门 更多>