|
发表于 2023-4-12 14:28:27
|
显示全部楼层
本帖最后由 zzs999k 于 2023-4-12 14:34 编辑
u16 server_connect_status_value=0x0000; //WIFI状态
u16read_add_array[0]=0x00;
u16read_add_array[1]=0x5A;
sys_write_vp(0x04B0,"CMCC-wuchao",sizeof("CMCC-wuchao")/2);//WIFI 名称
sys_write_vp(0x04C0,"wuchao123456",sizeof("wuchao123456")/2);//WIFI密码
while(1)
{
sys_read_vp(0x4A2,(u8*)&server_connect_status_value,1);//判断wifi状态重连,这里可以优化下用定时器不用在while1里一直判断占用处理器
if ((server_connect_status_value & 0xff) == 0x00) {//00未连接
sys_write_vp(0x498,read_add_array,1);
}
else if ((server_connect_status_value & 0xff) == 0x0f) {//0f连接失败
sys_write_vp(0x498,(u8*)&read_add_array,1);
}else{
}
}
|
|