This commit is contained in:
stark1898y 2025-02-08 14:28:49 +08:00
parent 5aa64c354a
commit e8aca5d95b
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_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

View File

@ -1478,7 +1478,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)
{
@ -1553,12 +1553,12 @@ static void Nt26k_Life_Thread_Entry(void *parameter)
{
LOG_D("关闭模组功能");
}
goto __exit;
goto __exit;
}
}
else
{
goto __exit;
goto __exit;
}
}
else