Espressif ESP32-S2 Programming Manual page 248

Table of Contents

Advertisement

Chapter 2. API Reference
• ESP_OK success
Parameters
• channel: DAC channel
esp_err_t
dac_cw_generator_enable(void)
Enable cosine wave generator output.
Return
• ESP_OK success
esp_err_t
dac_cw_generator_disable(void)
Disable cosine wave generator output.
Return
• ESP_OK success
esp_err_t dac_cw_generator_config(dac_cw_config_t
Config the cosine wave generator function in DAC module.
Return
• ESP_OK success
• ESP_ERR_INVALID_ARG The parameter is NULL.
Parameters
• cw: Configuration.
GPIO Lookup Macros
versa. e.g.
1. DAC_CHANNEL_1_GPIO_NUM is the GPIO number of channel 1 (GPIO17);
2. DAC_GPIO18_CHANNEL is the channel number of GPIO 26 (channel 2).
Header File
components/soc/esp32s2/include/soc/dac_channel.h
Macros
DAC_GPIO17_CHANNEL
DAC_CHANNEL_1_GPIO_NUM
DAC_GPIO18_CHANNEL
DAC_CHANNEL_2_GPIO_NUM
Header File
components/hal/include/hal/dac_types.h
Structures
struct dac_cw_config_t
Config the cosine wave generator function in DAC module.
Public Members
dac_channel_t
en_ch
Enable the cosine wave generator of DAC channel.
dac_cw_scale_t
scale
Set the amplitude of the cosine wave generator output.
Espressif Systems
Some useful macros can be used to specified the GPIO number of a DAC channel, or vice
Submit Document Feedback
*cw)
237
Release v4.4

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the ESP32-S2 and is the answer not in the manual?

Table of Contents

Save PDF