Function esp_idf_svc::sys::ledc_fade_stop
source ยท pub unsafe extern "C" fn ledc_fade_stop(
speed_mode: u32,
channel: u32,
) -> i32
Expand description
@brief Stop LEDC fading. The duty of the channel is garanteed to be fixed at most one PWM cycle after the function returns.
@note This API can be called if a new fixed duty or a new fade want to be set while the last fade operation is still running in progress. @note Call this API will abort the fading operation only if it was started by calling ledc_fade_start with LEDC_FADE_NO_WAIT mode. @note If a fade was started with LEDC_FADE_WAIT_DONE mode, calling this API afterwards has no use in stopping the fade. Fade will continue until it reachs the target duty.
@param speed_mode Select the LEDC channel group with specified speed mode. Note that not all targets support high speed mode. @param channel LEDC channel number
@return - ESP_OK Success - ESP_ERR_INVALID_STATE Channel not initialized - ESP_ERR_INVALID_ARG Parameter error - ESP_FAIL Fade function init error