diff --git a/bsp/src/at_device_nt26k.c b/bsp/src/at_device_nt26k.c index 08eef4d..45ea806 100644 --- a/bsp/src/at_device_nt26k.c +++ b/bsp/src/at_device_nt26k.c @@ -196,7 +196,7 @@ static int nt26k_wakeup(struct at_device *device) rt_pin_write(nt26k->pwr_key_pin, PIN_LOW); rt_thread_mdelay(100); rt_pin_write(nt26k->pwr_key_pin, PIN_HIGH); - nt26k->sleep_status = RT_TRUE; + nt26k->sleep_status = RT_FALSE; } return (RT_EOK); } @@ -376,7 +376,7 @@ rt_mutex_take(nt26k_mutex, RT_WAITING_FOREVER); at_delete_resp(resp); return -RT_ERROR; } - + if (at_obj_exec_cmd(device->client, resp, TCP_SEND_DATA, socket_id, data) == RT_EOK) { if ((line_buffer = at_resp_get_line(resp, 2)) != RT_NULL) @@ -794,7 +794,7 @@ static void nt26k_init_thread_entry(void *parameter) } LOG_D("start init %s device.", device->name); - + while (1) { /* power on the nt26k device */ @@ -1078,7 +1078,7 @@ static void nt26k_init_thread_entry(void *parameter) LOG_I("%s device initialize retry...", device->name); // nt26k_power_off(device); rt_thread_mdelay(1000); - + } } @@ -1417,7 +1417,7 @@ int Time_Calibration(struct at_device *device) rtc_dt.year, rtc_dt.month, rtc_dt.day, rtc_dt.hour, rtc_dt.minute, rtc_dt.second); ntp_flag = 1; at_delete_resp(resp); - + return RT_EOK; } else diff --git a/bsp/src/bsp_nt26k.c b/bsp/src/bsp_nt26k.c index fb89f12..9a4e93c 100644 --- a/bsp/src/bsp_nt26k.c +++ b/bsp/src/bsp_nt26k.c @@ -1482,7 +1482,7 @@ static void Nt26k_Life_Thread_Entry(void *parameter) at_delete_resp(resp); result = -RT_ETIMEOUT; } - if (device->class->device_ops->control(device, AT_DEVICE_CTRL_POWER_OFF, RT_NULL) == RT_EOK) + if (device->class->device_ops->control(device, AT_DEVICE_CTRL_WAKEUP, RT_NULL) == RT_EOK) { if (device->class->device_ops->control(device, AT_DEVICE_CTRL_POWER_ON, RT_NULL) == RT_EOK) { @@ -1557,12 +1557,12 @@ static void Nt26k_Life_Thread_Entry(void *parameter) { LOG_D("关闭模组功能"); } - goto __exit; + goto __exit; } } else { - goto __exit; + goto __exit; } } else