|
while(1)
{
OSSemPend(poeUart0ReviceSem, 0, &iUart0Err);
uiNum = uartFifoStatus(UART0, RX_FIFO); /* 查看收到多少数据 */
uartRead(UART0,uiReviceBuf0, uiNum, NULL); /* 读数据 */
if(uiReviceBuf0[1]==129)
{
x=uiReviceBuf0[4]+uiReviceBuf0[3]*256;
y=uiReviceBuf0[6]+uiReviceBuf0[5]*256;
}
while(uiReviceBuf0[1]!=128)
{
OSTimeDly(1);
}
}
为什么我运行程序时没等到信号量,直接跳到红字延时那里了,请大家指导下,谢谢~
|
|