pub unsafe extern "C" fn sdm_channel_set_duty(
chan: *mut sdm_channel_t,
duty: i8,
) -> i32Expand description
@brief The alias function of sdm_channel_set_pulse_density, it decides the pulse density of the output signal
@note sdm_channel_set_pulse_density has a more appropriate name compare this
alias function, suggest to turn to sdm_channel_set_pulse_density instead
@param[in] chan SDM channel created by sdm_new_channel
@param[in] duty Actually it’s the quantized pulse density of the PDM output signal
@return - ESP_OK: Set duty cycle successfully - ESP_ERR_INVALID_ARG: Set duty cycle failed because of invalid argument - ESP_FAIL: Set duty cycle failed because of other error