1.调整打印和优化usb超时时间
This commit is contained in:
parent
9dc4b60688
commit
8058456c1c
|
@ -91,15 +91,17 @@ SINT32 app_ttyusb_IsOpen(void) {
|
||||||
|
|
||||||
UINT8 i = 0;
|
UINT8 i = 0;
|
||||||
|
|
||||||
for (i = 0; i < 40; i++) {
|
for (i = 0; i < 150; i++) {
|
||||||
if (access("/dev/ttyUSB2", F_OK) == SF_SUCCESS) {
|
if (access("/dev/ttyUSB2", F_OK) == SF_SUCCESS) {
|
||||||
printf("tty usb ko exist!\r\n");
|
printf("tty usb ko exist!\r\n");
|
||||||
|
printf("4G Init OK\r\n");
|
||||||
break;
|
break;
|
||||||
} else {
|
} else {
|
||||||
usleep(100 * 1000);
|
usleep(100 * 1000);
|
||||||
if(39 == i)
|
if(149 == i)
|
||||||
{
|
{
|
||||||
MLOGE("NO ttyUSB dev!!\n");
|
MLOGE("NO ttyUSB dev!!\n");
|
||||||
|
printf("4G Init ERR\r\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -119,6 +121,7 @@ SINT32 app_ttyusb_IsOpen(void) {
|
||||||
{
|
{
|
||||||
MLOGE("-------ttyUSB retry init fail!\n");
|
MLOGE("-------ttyUSB retry init fail!\n");
|
||||||
s32ret = SF_TTY_ERROR_OPEN;
|
s32ret = SF_TTY_ERROR_OPEN;
|
||||||
|
printf("4G Init Fail, retry\r\n");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user