This commit is contained in:
小马_666 2025-02-08 17:49:43 +08:00
commit 8a5f6e2e85
2 changed files with 8 additions and 8 deletions

View File

@ -196,7 +196,7 @@ static int nt26k_wakeup(struct at_device *device)
rt_pin_write(nt26k->pwr_key_pin, PIN_LOW); rt_pin_write(nt26k->pwr_key_pin, PIN_LOW);
rt_thread_mdelay(100); rt_thread_mdelay(100);
rt_pin_write(nt26k->pwr_key_pin, PIN_HIGH); rt_pin_write(nt26k->pwr_key_pin, PIN_HIGH);
nt26k->sleep_status = RT_TRUE; nt26k->sleep_status = RT_FALSE;
} }
return (RT_EOK); return (RT_EOK);
} }
@ -376,7 +376,7 @@ rt_mutex_take(nt26k_mutex, RT_WAITING_FOREVER);
at_delete_resp(resp); at_delete_resp(resp);
return -RT_ERROR; return -RT_ERROR;
} }
if (at_obj_exec_cmd(device->client, resp, TCP_SEND_DATA, socket_id, data) == RT_EOK) 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) 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); LOG_D("start init %s device.", device->name);
while (1) while (1)
{ {
/* power on the nt26k device */ /* 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); LOG_I("%s device initialize retry...", device->name);
// nt26k_power_off(device); // nt26k_power_off(device);
rt_thread_mdelay(1000); 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); rtc_dt.year, rtc_dt.month, rtc_dt.day, rtc_dt.hour, rtc_dt.minute, rtc_dt.second);
ntp_flag = 1; ntp_flag = 1;
at_delete_resp(resp); at_delete_resp(resp);
return RT_EOK; return RT_EOK;
} }
else else

View File

@ -1482,7 +1482,7 @@ static void Nt26k_Life_Thread_Entry(void *parameter)
at_delete_resp(resp); at_delete_resp(resp);
result = -RT_ETIMEOUT; 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) 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("关闭模组功能"); LOG_D("关闭模组功能");
} }
goto __exit; goto __exit;
} }
} }
else else
{ {
goto __exit; goto __exit;
} }
} }
else else