dac_cosine_new_channel() function
Allocate a new DAC cosine wave channel
Arguments
cos_cfg
The configuration of cosine wave channel
ret_handle
The returned cosine wave channel handle
Return value
- 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
Notes
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.
dac_cosine_new_channel() calls 15 functions:
![]()
dac_cosine_new_channel()
dac_cosine_new_channel() reads 14 variables and writes 1 variable:
![]()
dac_cosine_new_channel()
dac_cosine_new_channel() allocates 1 types:
![]()
dac_cosine_new_channel()