Function esp_idf_hal::sys::ledc_fade_start
source ยท pub unsafe extern "C" fn ledc_fade_start(
speed_mode: u32,
channel: u32,
fade_mode: u32,
) -> i32
Expand description
@brief Start LEDC fading. @note Call ledc_fade_func_install() once before calling this function. Call this API right after ledc_set_fade_with_time or ledc_set_fade_with_step before to start fading. @note Starting fade operation with this API is not thread-safe, use with care. @note For ESP32, hardware does not support any duty change while a fade operation is running in progress on that channel. Other duty operations will have to wait until the fade operation has finished. @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 @param fade_mode Whether to block until fading done. See ledc_types.h ledc_fade_mode_t for more info. Note that this function will not return until fading to the target duty if LEDC_FADE_WAIT_DONE mode is selected.
@return - ESP_OK Success - ESP_ERR_INVALID_STATE Fade function not installed. - ESP_ERR_INVALID_ARG Parameter error.