1.该版本先带延时tty读取
This commit is contained in:
parent
0aac9d5806
commit
9045cdecd6
|
@ -249,10 +249,10 @@ static SINT32 hal_ttyusb_read(SINT32 fd, SF_CHAR *recvBuf, SINT32 waitTime)
|
||||||
SINT32 s32ret = 0;
|
SINT32 s32ret = 0;
|
||||||
fd_set read_fds;
|
fd_set read_fds;
|
||||||
struct timeval TimeoutVal;
|
struct timeval TimeoutVal;
|
||||||
//if(waitTime > 0)
|
if(waitTime > 0)
|
||||||
// sf_sleep_ms(waitTime);
|
sf_sleep_ms(waitTime);
|
||||||
|
|
||||||
//while(waitTime--)
|
while(waitTime--)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
|
@ -275,13 +275,13 @@ static SINT32 hal_ttyusb_read(SINT32 fd, SF_CHAR *recvBuf, SINT32 waitTime)
|
||||||
}
|
}
|
||||||
else if (s32ret < 0) {
|
else if (s32ret < 0) {
|
||||||
//MLOGE(" select failed\n");
|
//MLOGE(" select failed\n");
|
||||||
return SF_FAILURE;
|
//return SF_FAILURE;
|
||||||
//continue;
|
continue;
|
||||||
}
|
}
|
||||||
else if (0 == s32ret) {
|
else if (0 == s32ret) {
|
||||||
//MLOGW("FIFO select timeout [%d]\n",waitTime);
|
//MLOGW("FIFO select timeout [%d]\n",waitTime);
|
||||||
return SF_FAILURE;
|
//return SF_FAILURE;
|
||||||
//continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user