Function esp_idf_sys::dac_cosine_new_channel

source ยท
pub unsafe extern "C" fn dac_cosine_new_channel(
    cos_cfg: *const dac_cosine_config_t,
    ret_handle: *mut dac_cosine_handle_t,
) -> esp_err_t
Expand description

@brief Allocate a new DAC cosine wave channel @note Since there is only one cosine wave generator, only the first channel can set the frequency of the cosine wave. Normally, the latter one is not allowed to set a different frequency, but the it can be forced to set by setting the bit force_set_freq in the configuration, notice that another channel will be affected as well when the frequency is updated.

@param[in] cos_cfg The configuration of cosine wave channel @param[out] ret_handle The returned cosine wave channel handle @return - ESP_ERR_INVALID_ARG The input parameter is invalid - ESP_ERR_INVALID_STATE The DAC channel has been registered already - ESP_ERR_NO_MEM No memory for the DAC cosine wave channel resources - ESP_OK Allocate the new DAC cosine wave channel success