Function esp_idf_sys::esp_register_freertos_idle_hook
source · pub unsafe extern "C" fn esp_register_freertos_idle_hook(
new_idle_cb: esp_freertos_idle_cb_t,
) -> esp_err_t
Expand description
@brief 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.
@param[in] new_idle_cb Callback to be called
@return - ESP_OK: Callback registered to the calling core’s idle hook - ESP_ERR_NO_MEM: No more space on the calling core’s idle hook to register callback