Skip to main content

sdm_channel_enable

Function sdm_channel_enable 

Source
pub unsafe extern "C" fn sdm_channel_enable(
    chan: *mut sdm_channel_t,
) -> i32
Expand description

@brief Enable the Sigma Delta channel

@note This function will transit the channel state from init to enable. @note This function will acquire a PM lock, if a specific source clock (e.g. APB) is selected in the sdm_config_t, while CONFIG_PM_ENABLE is enabled.

@param[in] chan SDM channel created by sdm_new_channel @return - ESP_OK: Enable SDM channel successfully - ESP_ERR_INVALID_ARG: Enable SDM channel failed because of invalid argument - ESP_ERR_INVALID_STATE: Enable SDM channel failed because the channel is already enabled - ESP_FAIL: Enable SDM channel failed because of other error