mirror of
https://github.com/espressif/esp-idf.git
synced 2025-07-30 10:47:19 +02:00
docs: fix indention in dac code snippet
This commit is contained in:
@ -28,14 +28,17 @@ For other analog output options, see the :doc:`Sigma-delta Modulation module <si
|
|||||||
Application Example
|
Application Example
|
||||||
-------------------
|
-------------------
|
||||||
|
|
||||||
Setting DAC channel 1 ({IDF_TARGET_DAC_CH_1}) voltage to approx 0.78 of VDD_A voltage (VDD * 200 / 255). For VDD_A 3.3V, this is 2.59V::
|
Setting DAC channel 1 ({IDF_TARGET_DAC_CH_1}) voltage to approx 0.78 of VDD_A voltage (VDD * 200 / 255). For VDD_A 3.3V, this is 2.59V.
|
||||||
|
|
||||||
#include <driver/dac.h>
|
.. code:: c
|
||||||
|
|
||||||
...
|
#include <driver/dac.h>
|
||||||
|
|
||||||
|
...
|
||||||
|
|
||||||
|
dac_output_enable(DAC_CHANNEL_1);
|
||||||
|
dac_output_voltage(DAC_CHANNEL_1, 200);
|
||||||
|
|
||||||
dac_output_enable(DAC_CHANNEL_1);
|
|
||||||
dac_output_voltage(DAC_CHANNEL_1, 200);
|
|
||||||
|
|
||||||
API Reference
|
API Reference
|
||||||
-------------
|
-------------
|
||||||
|
Reference in New Issue
Block a user