标签:span ESS name tps https .com disable esc rip
ESP32有两个DAC通道,通道1链接GPIO25, 通道2链接GPIO26;
当DAC设置为 “built-in DAC mode”的时候,I2S可以通过DAC发送数据;
使用示例:
dac_output_enable(DAC_CHANNEL_1);
dac_output_voltage(DAC_CHANNEL_1, 200);
dac一共有8位,将3.3V电压按照255均分之后,就是dac的精度的最小单位;
API函数如下:
esp_err_tdac_pad_get_io_num
(dac_channel_tchannel, gpio_num_t *gpio_num)
获取指定的DAC通道的GPIO口;
esp_err_tdac_output_voltage
(dac_channel_tchannel, uint8_t dac_value)
设置DAC的输出电压;
esp_err_tdac_output_enable
(dac_channel_tchannel)
DAC的输出使能;
esp_err_tdac_output_disable
(dac_channel_tchannel)
DAC的输出失能;
esp_err_tdac_i2s_enable
()
DAC 的I2S使能;
esp_err_tdac_i2s_disable
()
DAC的I2S失能;
标签:span ESS name tps https .com disable esc rip
原文地址:https://www.cnblogs.com/braveheart007/p/10459861.html