uint8 ModemCommand(char *Command) { uint8 i,err; uint16 j; OSSemPend(ModemSem, 0, &err); GetAllChar(); if (ModemState == MODEM_CLOSE) { while(1) { while ((U1LSR & 0x00000001) != 0) { err = U1RBR; } ModemWrite("AT\r\n", 4); i = ModemGetch(); j = 0; while ( j <= 20 ) { err = i; i = ModemGetch(); if (err == 'O' || err == 'o') if (i == 'K' || i == 'k') { i = ModemGetch(); i = ModemGetch(); break; } if( (i == 0) && (j == 3) ) { j=20; } j++; } if(j >=20 ) { continue; } else break; } 其中下面一段程序如何理解?? if (err == 'O' || err == 'o') if (i == 'K' || i == 'k') { i = ModemGetch(); i = ModemGetch(); break; } if( (i == 0) && (j == 3) ) { j=20; } j++; } if(j >=20 ) { continue; } else break; } 望高手指教 |