EasyManuals Logo

Espressif ESP32-S2 User Manual

Espressif ESP32-S2
1695 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #982 background imageLoading...
Page #982 background image
Chapter 2. API Reference
Warning Idle callbacks MUST NOT, UNDER ANY CIRCUMSTANCES, CALL A FUNCTION THAT
MIGHT BLOCK.
Return
ESP_OK: Callback registered to the specified cores idle hook
ESP_ERR_NO_MEM: No more space on the specified cores idle hook to register callback
ESP_ERR_INVALID_ARG: cpuid is invalid
Parameters
[in] new_idle_cb: Callback to be called
[in] cpuid: id of the core
esp_err_t esp_register_freertos_idle_hook(esp_freertos_idle_cb_t new_idle_cb)
Register a callback to the idle hook of the core that calls this function. The callback should return true if it
should be called by the idle hook once per interrupt (or FreeRTOS tick), and return false if it should be called
repeatedly as fast as possible by the idle hook.
Warning Idle callbacks MUST NOT, UNDER ANY CIRCUMSTANCES, CALL A FUNCTION THAT
MIGHT BLOCK.
Return
ESP_OK: Callback registered to the calling cores idle hook
ESP_ERR_NO_MEM: No more space on the calling cores idle hook to register callback
Parameters
[in] new_idle_cb: Callback to be called
esp_err_t esp_register_freertos_tick_hook_for_cpu(esp_freertos_tick_cb_t new_tick_cb,
UBaseType_t cpuid)
Register a callback to be called from the specified cores tick hook.
Return
ESP_OK: Callback registered to specied cores tick hook
ESP_ERR_NO_MEM: No more space on the specified cores tick hook to register the callback
ESP_ERR_INVALID_ARG: cpuid is invalid
Parameters
[in] new_tick_cb: Callback to be called
[in] cpuid: id of the core
esp_err_t esp_register_freertos_tick_hook(esp_freertos_tick_cb_t new_tick_cb)
Register a callback to be called from the calling cores tick hook.
Return
ESP_OK: Callback registered to the calling cores tick hook
ESP_ERR_NO_MEM: No more space on the calling cores tick hook to register the callback
Parameters
[in] new_tick_cb: Callback to be called
void esp_deregister_freertos_idle_hook_for_cpu(esp_freertos_idle_cb_t old_idle_cb,
UBaseType_t cpuid)
Unregister an idle callback from the idle hook of the specified core.
Parameters
[in] old_idle_cb: Callback to be unregistered
[in] cpuid: id of the core
void esp_deregister_freertos_idle_hook(esp_freertos_idle_cb_t old_idle_cb)
Unregister an idle callback. If the idle callback is registered to the idle hooks of both cores, the idle hook will
be unregistered from both cores.
Parameters
[in] old_idle_cb: Callback to be unregistered
void esp_deregister_freertos_tick_hook_for_cpu(esp_freertos_tick_cb_t old_tick_cb,
UBaseType_t cpuid)
Unregister a tick callback from the tick hook of the specified core.
Parameters
[in] old_tick_cb: Callback to be unregistered
Espressif Systems 971
Submit Document Feedback
Release v4.4

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Espressif ESP32-S2 and is the answer not in the manual?

Espressif ESP32-S2 Specifications

General IconGeneral
BrandEspressif
ModelESP32-S2
CategorySingle board computers
LanguageEnglish