本帖最后由 大鸭梨 于 2017-7-6 14:38 编辑
u8 atk_8266_netpro_sel(u16 x,u16 y,u8* name)
{ u8 key=0,t=0,*p; u8 netpro=1;
LCD_Clear(WHITE);
POINT_COLOR=RED;
p=mymalloc(SRAMIN,50);//éêÇë50¸ö×Ö½úμÄÄú′æ
sprintf((char*)p,"%s 1¤×÷Ä£ê½Ñ¡Ôñ",name);
Show_Str_Mid(0,y,p,16,240);
Show_Str(x,y+30,200,16,"KEY0:ÏÂò»¸ö",16,0);
Show_Str(x,y+50,200,16,"KEY1:éÏò»¸ö",16,0);
Show_Str(x,y+70,200,16,"WK_UP:è·¶¨",16,0);
Show_Str(x,y+100,200,16,"ÇëÑ¡Ôñ:",16,0);
POINT_COLOR=BLUE;
Show_Str(x+16,y+120,200,16,"TCP·tÎñÆ÷",16,0);
Show_Str(x+16,y+140,200,16,"TCP¿í»§¶Ë",16,0);
Show_Str(x+16,y+160,200,16,"UDPÄ£ê½",16,0);
POINT_COLOR=RED;
Show_Str(x,y+120,200,16,"¡ú",16,0);
while(1)
{
key=KEY_Scan(0);
//key=WKUP_PRES;
if(key)
{
if(key==WKUP_PRES)break;
Show_Str(x,y+120+netpro*20,200,16," ",16,0);
if(key==KEY0_PRES)//KEY0
{
if(netpro<2)netpro++;
else netpro=0;
}else if(key==KEY1_PRES)//KEY1
{
if(netpro>0)netpro--;
else netpro=2;
}
Show_Str(x,y+120+netpro*20,200,16,"¡ú",16,0);
}
delay_ms(10);
atk_8266_at_response(1);
if((t++)==20){t=0;LED0=!LED0;}//LEDéá˸
}
myfree(SRAMIN,p);
return 1;
}
一周热门 更多>