Function esp_idf_sys::ledc_get_duty
source · pub unsafe extern "C" fn ledc_get_duty(
speed_mode: ledc_mode_t,
channel: ledc_channel_t,
) -> u32
Expand description
@brief LEDC get duty This function returns the duty at the present PWM cycle. You shouldn’t expect the function to return the new duty in the same cycle of calling ledc_update_duty, because duty update doesn’t take effect until the next cycle.
@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
@return - LEDC_ERR_DUTY if parameter error - Others Current LEDC duty