We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IDF v5.4 ESP32
already enable light sleep callback option in menuconfig
the func esp_pm_light_sleep_register_cbs register functions,but don't run when enter and after light sleep mode? the code as below:
esp_pm_light_sleep_register_cbs
esp_err_t before_sleep_callback(int64_t sleep_time_us, void *arg) { ESP_LOGI(TAG, "Entering light sleep mode,%lld",sleep_time_us); // led1^=1; // gpio_set_level(18, led1); return -1; } esp_err_t after_wake_up_callback(int64_t sleep_time_us, void *arg) { ESP_LOGI(TAG, "Woken up from light sleep mode,%lld",sleep_time_us); // led2^=1; // gpio_set_level(4, led2); return -1; } esp_pm_sleep_cbs_register_config_t pm_callbacks = { .enter_cb = before_sleep_callback, .exit_cb = after_wake_up_callback, .enter_cb_prior=5, .exit_cb_prior=5, .enter_cb_user_arg=0, .exit_cb_user_arg=0 }; esp_err_t ret = esp_pm_light_sleep_register_cbs(&pm_callbacks); if (ret != ESP_OK) { ESP_LOGE(TAG, "Failed to register power management callbacks: %s", esp_err_to_name(ret)); } esp_sleep_enable_timer_wakeup(1000000); while (true) { uart_wait_tx_idle_polling(CONFIG_ESP_CONSOLE_UART_NUM); /* Enter sleep mode */ esp_light_sleep_start(); vTaskDelay(100); }
The text was updated successfully, but these errors were encountered:
esp-lis
No branches or pull requests
IDF v5.4
ESP32
already enable light sleep callback option in menuconfig
the func
esp_pm_light_sleep_register_cbs
register functions,but don't run when enter and after light sleep mode?the code as below:
The text was updated successfully, but these errors were encountered: