uart取出来的通过tcp发送,数据有变动
时间:10-02
整理:3721RD
点击:
每次取出一个中断后就发一个包出去,下面是代码
while( iNewSockID < 0 )
{
// accepts a connection form a TCP client, if there is any 接受连接形成的TCP客户端
// otherwise returns SL_EAGAIN
if(uart1_string[0] != '#'){ Report("n\ruart0: %s\n\r", uart1_string); BsdTcpClient(g_uiPortNum + 1); uart1_string[0] = '#';}if(uart0_string[0] != '#'){ Report_io("uart1:%s",uart0_string);
// BsdTcpClient(g_uiPortNum + 1); uart0_string[0] = '#';}_SlNonOsMainLoopTask();
m++;
iNewSockID = sl_Accept(iSockID, ( struct SlSockAddr_t *)&sAddr,
(SlSocklen_t*)&iAddrSize);
if( iNewSockID == SL_EAGAIN )
{
MAP_UtilsDelay(10000);
}
else if( iNewSockID < 0 )
{
// error
sl_Close(iNewSockID);
sl_Close(iSockID);
ASSERT_ON_ERROR(ACCEPT_ERROR);
}
}
M,0500,v1.0那行就是发出去的
uart是取到的,两个不一样

