void ppp_config(void)
{
switch (ppp_config_step)
{
case 0:
free_rom_buf(aUart5RxBuffer,sizeof(aUart5RxBuffer));
gprs_puts("AT+GTSET=\"LPMMODE\",0\r\n");
gprs_tick = msTicks;
ppp_config_step = 1;
break;
case 1:
if((msTicks - gprs_tick) > 500)
{
if(strstr(aUart5RxBuffer, "OK") == NULL)
{
ppp_config_step = 0;
}
else
{
ppp_config_step = 2;
}
free_rom_buf(aUart5RxBuffer,sizeof(aUart5RxBuffer));
}
break;
...
...
|