Function esp_idf_svc::hal::sys::ledc_set_fade

source ยท
pub unsafe extern "C" fn ledc_set_fade(
    speed_mode: u32,
    channel: u32,
    duty: u32,
    fade_direction: u32,
    step_num: u32,
    duty_cycle_num: u32,
    duty_scale: u32,
) -> i32
Expand description

@brief LEDC set gradient Set LEDC gradient, After the function calls the ledc_update_duty function, the function can take effect.

@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 (0 - LEDC_CHANNEL_MAX-1), select from ledc_channel_t @param duty Set the start of the gradient duty, the range of duty setting is [0, (2**duty_resolution)] @param fade_direction Set the direction of the gradient @param step_num Set the number of the gradient @param duty_cycle_num Set how many LEDC tick each time the gradient lasts @param duty_scale Set gradient change amplitude

@return - ESP_OK Success - ESP_ERR_INVALID_ARG Parameter error