mirror of
https://github.com/oopuuu/zTC1.git
synced 2025-12-13 13:38:14 +08:00
send_http, 扫描接口
This commit is contained in:
@@ -73,6 +73,13 @@ static void wifi_status_callback(WiFiEvent status, void* arg)
|
||||
}
|
||||
}
|
||||
|
||||
//wifi扫描结果回调
|
||||
void wifi_scan_callback(ScanResult *pApList, mico_Context_t * const inContext)
|
||||
{
|
||||
os_log("wifi_scan_callback ApNum[%d] ApList[0](%s)", (int)pApList[0].ApNum, pApList[0].ApList[0].ssid);
|
||||
}
|
||||
|
||||
|
||||
//100ms定时器回调
|
||||
static void wifi_led_timer_callback(void* arg)
|
||||
{
|
||||
@@ -133,6 +140,9 @@ void wifi_init(void)
|
||||
mico_system_notify_register(mico_notify_DHCP_COMPLETED, (void *) wifi_get_ip_callback, NULL);
|
||||
//wifi连接状态改变回调
|
||||
mico_system_notify_register(mico_notify_WIFI_STATUS_CHANGED, (void*) wifi_status_callback, NULL);
|
||||
//wifi扫描结果回调
|
||||
mico_system_notify_register(mico_notify_WIFI_SCAN_COMPLETED, (void*)wifi_scan_callback, NULL);
|
||||
|
||||
//sntp_init();
|
||||
//启动定时器开始进行wifi连接
|
||||
if (!mico_rtos_is_timer_running(&wifi_led_timer)) mico_rtos_start_timer(&wifi_led_timer);
|
||||
|
||||
Reference in New Issue
Block a user