esp_register_freertos_idle_hook_for_cpu() function
Register a callback to be called from the specified core's idle hook. 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.
- ESP_OK: Callback registered to the specified core's idle hook - ESP_ERR_NO_MEM: No more space on the specified core's idle hook to register callback - ESP_ERR_INVALID_ARG: cpuid is invalid
Examples
esp_register_freertos_idle_hook_for_cpu() is referenced by 1 libraries and example projects: