kopia lustrzana https://github.com/espressif/esp-idf
Merge branch 'doc/explain_ledc_callback_return_value' into 'master'
ledc: explain the callback return value Closes IDFGH-8647 See merge request espressif/esp-idf!20916pull/10165/head
commit
9f18a0bb5b
|
@ -90,6 +90,7 @@ typedef struct {
|
|||
* @brief Type of LEDC event callback
|
||||
* @param param LEDC callback parameter
|
||||
* @param user_arg User registered data
|
||||
* @return Whether a high priority task has been waken up by this function
|
||||
*/
|
||||
typedef bool (*ledc_cb_t)(const ledc_cb_param_t *param, void *user_arg);
|
||||
|
||||
|
@ -462,7 +463,7 @@ esp_err_t ledc_fade_start(ledc_mode_t speed_mode, ledc_channel_t channel, ledc_f
|
|||
* - ESP_ERR_INVALID_ARG Parameter error.
|
||||
*/
|
||||
esp_err_t ledc_fade_stop(ledc_mode_t speed_mode, ledc_channel_t channel);
|
||||
#endif
|
||||
#endif //SOC_LEDC_SUPPORT_FADE_STOP
|
||||
|
||||
/**
|
||||
* @brief A thread-safe API to set duty for LEDC channel and return when duty updated.
|
||||
|
@ -528,6 +529,7 @@ esp_err_t ledc_set_fade_step_and_start(ledc_mode_t speed_mode, ledc_channel_t ch
|
|||
* - ESP_FAIL Fade function init error
|
||||
*/
|
||||
esp_err_t ledc_cb_register(ledc_mode_t speed_mode, ledc_channel_t channel, ledc_cbs_t *cbs, void *user_arg);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -235,7 +235,7 @@ The LEDC hardware provides the means to gradually transition from one duty cycle
|
|||
|
||||
Start fading with :cpp:func:`ledc_fade_start`. A fade can be operated in blocking or non-blocking mode, please check :cpp:enum:`ledc_fade_mode_t` for the difference between the two available fade modes. Note that with either fade mode, the next fade or fixed-duty update will not take effect until the last fade finishes or is stopped. :cpp:func:`ledc_fade_stop` has to be called to stop a fade that is in progress.
|
||||
|
||||
To get a notification about the completion of a fade operation, a fade end callback function can be registered for each channel by calling :cpp:func:`ledc_cb_register` after the fade service being installed.
|
||||
To get a notification about the completion of a fade operation, a fade end callback function can be registered for each channel by calling :cpp:func:`ledc_cb_register` after the fade service being installed. The fade end callback prototype is defined in :cpp:type:`ledc_cb_t`, where you should return a boolean value from the callback function, indicating whether a high priority task is woken up by this callback function.
|
||||
|
||||
If not required anymore, fading and an associated interrupt can be disabled with :cpp:func:`ledc_fade_func_uninstall`.
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue