From 3770fadfc23e622dcb2810bae2357d8a869f6eb9 Mon Sep 17 00:00:00 2001 From: shenmengjing Date: Tue, 9 Jul 2024 15:08:37 +0800 Subject: [PATCH] docs: Update the application examples in dac.rst --- docs/en/api-reference/peripherals/dac.rst | 9 ++++----- docs/zh_CN/api-reference/peripherals/dac.rst | 9 ++++----- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/docs/en/api-reference/peripherals/dac.rst b/docs/en/api-reference/peripherals/dac.rst index 2d3bdc23b5..4cb3eb12b3 100644 --- a/docs/en/api-reference/peripherals/dac.rst +++ b/docs/en/api-reference/peripherals/dac.rst @@ -130,11 +130,10 @@ Kconfig Options Application Example ------------------- -The basic examples for the ``One-shot Mode``, ``Continuous Mode``, and ``Cosine Mode`` can be found in: - -- :example:`peripherals/dac/dac_oneshot` -- :example:`peripherals/dac/dac_continuous` -- :example:`peripherals/dac/dac_cosine_wave` +- :example:`peripherals/dac/dac_continuous/signal_generator` demonstrates how to use the DAC driver on {IDF_TARGET_NAME} to output continuous voltage in two ways: by DMA transmission and by timer interrupt, generating different waveforms such as sine, triangle, saw tooth and square wave. +- :example:`peripherals/dac/dac_continuous/dac_audio` demonstrates how to use the DAC driver on {IDF_TARGET_NAME} to play a piece of audio stored in a buffer, with the audio being played every one second from a speaker or earphone. +- :example:`peripherals/dac/dac_cosine_wave` demonstrates how to use the DAC driver on an {IDF_TARGET_NAME} board to output a cosine wave on both channels, which can be monitored using an oscilloscope or the ADC channels internally. +- :example:`peripherals/dac/dac_oneshot` demonstrates how to use the DAC driver on {IDF_TARGET_NAME} to output a voltage that increases stepwise every 500 ms and resets to 0 periodically, with the output monitored via ADC or an optional oscilloscope. API Reference ------------- diff --git a/docs/zh_CN/api-reference/peripherals/dac.rst b/docs/zh_CN/api-reference/peripherals/dac.rst index 6ef70b6898..1c45cbf8c5 100644 --- a/docs/zh_CN/api-reference/peripherals/dac.rst +++ b/docs/zh_CN/api-reference/peripherals/dac.rst @@ -130,11 +130,10 @@ Kconfig 选项 应用示例 -------- -``单次模式``、 ``连续模式`` 和 ``余弦模式`` 的基本示例如下所示: - -- :example:`peripherals/dac/dac_oneshot` -- :example:`peripherals/dac/dac_continuous` -- :example:`peripherals/dac/dac_cosine_wave` +- :example:`peripherals/dac/dac_continuous/signal_generator` 演示了在 {IDF_TARGET_NAME} 上使用 DAC 驱动程序输出连续电压的两种方式:通过 DMA 传输、以及通过定时器中断。两种方式可以生成不同的波形,如正弦波、三角波、锯齿波和方波。 +- :example:`peripherals/dac/dac_continuous/dac_audio` 演示了如何在 {IDF_TARGET_NAME} 上使用 DAC 驱动程序播放存储在 buffer 中的音频,每秒钟通过扬声器或耳机播放一次。 +- :example:`peripherals/dac/dac_cosine_wave` 演示了如何在 {IDF_TARGET_NAME} 开发板上使用 DAC 驱动程序在两个通道上输出余弦波,并且可以通过示波器或内部的 ADC 通道进行监控。 +- :example:`peripherals/dac/dac_oneshot` 演示了如何在 {IDF_TARGET_NAME} 上使用 DAC 驱动程序输出每 500 毫秒阶跃增加一次的电压,并且会定期复位为 0。输出的电压可通过 ADC 或可选的示波器进行监测。 API 参考 --------