判断\r\n结束标准

ucPrev==0x0D&&ucCur==0x0A

\r\n

uint8_t ucPrev =0,ucCur = 0;
uint32_t recvlen = 0;
for (; uiLen > 0; uiLen--){
ucCur = UARTRecvByte();
recvlen++;
*pucData++ = ucCur;
if(ucPrev==0x0D&&ucCur==0x0A)
{
break;
}
ucPrev = ucCur;
}

//判断是否\r\n 结束标准

posted on 2017-11-20 09:50  lydstory  阅读(216)  评论(0编辑  收藏  举报

导航