Prechádzať zdrojové kódy

docs: fix indention in dac code snippet

Marius Vikhammer 3 rokov pred
rodič
commit
57f68e417f
1 zmenil súbory, kde vykonal 8 pridanie a 5 odobranie
  1. 8 5
      docs/en/api-reference/peripherals/dac.rst

+ 8 - 5
docs/en/api-reference/peripherals/dac.rst

@@ -28,14 +28,17 @@ For other analog output options, see the :doc:`Sigma-delta Modulation module <si
 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
 -------------