EasyManua.ls Logo

Espressif ESP32-S2 - Page 247

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
Parameters
cfg: Pointer to digital controller paramter. See dac_digi_config_t.
esp_err_t dac_digi_start(void)
DAC digital controller start output voltage.
Return
ESP_OK success
esp_err_t dac_digi_stop(void)
DAC digital controller stop output voltage.
Return
ESP_OK success
esp_err_t dac_digi_fifo_reset(void)
Reset DAC digital controller FIFO.
Return
ESP_OK success
esp_err_t dac_digi_reset(void)
Reset DAC digital controller.
Return
ESP_OK success
Header File
components/driver/include/driver/dac_common.h
Functions
esp_err_t dac_pad_get_io_num(dac_channel_t channel, gpio_num_t *gpio_num)
Get the GPIO number of a specic DAC channel.
Return
ESP_OK if success
Parameters
channel: Channel to get the gpio number
gpio_num: output buffer to hold the gpio number
esp_err_t dac_output_voltage(dac_channel_t channel, uint8_t dac_value)
Set DAC output voltage. DAC output is 8-bit. Maximum (255) corresponds to VDD3P3_RTC.
Note Need to configure DAC pad before calling this function. DAC channel 1 is attached to GPIO25, DAC
channel 2 is attached to GPIO26
Return
ESP_OK success
Parameters
channel: DAC channel
dac_value: DAC output value
esp_err_t dac_output_enable(dac_channel_t channel)
DAC pad output enable.
Note DAC channel 1 is attached to GPIO25, DAC channel 2 is attached to GPIO26 I2S left channel will be
mapped to DAC channel 2 I2S right channel will be mapped to DAC channel 1
Parameters
channel: DAC channel
esp_err_t dac_output_disable(dac_channel_t channel)
DAC pad output disable.
Note DAC channel 1 is attached to GPIO25, DAC channel 2 is attached to GPIO26
Return
Espressif Systems 236
Submit Document Feedback
Release v4.4

Table of Contents