请教各位大佬,这是怎么回事?代码如下:
Code: Select all
esp_sleep_enable_gpio_wakeup();
/* To make sure the complete line is printed before entering sleep mode,
* need to wait until UART TX FIFO is empty:
*/
uart_tx_wait_idle(CONFIG_ESP_CONSOLE_UART_NUM);
int64_t sleep_start = esp_timer_get_time();
/* Enter sleep mode */
esp_light_sleep_start();
/* Get timestamp before entering sleep */
LOG_INFO_TAG("K", "T: %lld", esp_timer_get_time() - sleep_start);