Function esp_idf_svc::hal::sys::ledc_set_freq

source ยท
pub unsafe extern "C" fn ledc_set_freq(
    speed_mode: u32,
    timer_num: u32,
    freq_hz: u32,
) -> i32
Expand description

@brief LEDC set channel frequency (Hz)

@param speed_mode Select the LEDC channel group with specified speed mode. Note that not all targets support high speed mode. @param timer_num LEDC timer index (0-3), select from ledc_timer_t @param freq_hz Set the LEDC frequency

@return - ESP_OK Success - ESP_ERR_INVALID_ARG Parameter error - ESP_FAIL Can not find a proper pre-divider number base on the given frequency and the current duty_resolution.