EasyManua.ls Logo

Espressif ESP32-S2 - Page 248

Espressif ESP32-S2
1695 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
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 *cw)
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 Some useful macros can be used to specified the GPIO number of a DAC channel, or vice
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 237
Submit Document Feedback
Release v4.4

Table of Contents