]> granicus.if.org Git - esp-idf/commitdiff
ULP: remove deprecated cycle_sel field from ADC instruction
authorIvan Grokhotkov <ivan@espressif.com>
Wed, 31 May 2017 10:22:48 +0000 (18:22 +0800)
committerIvan Grokhotkov <ivan@espressif.com>
Wed, 31 May 2017 10:22:48 +0000 (18:22 +0800)
Cycle_sel field was never used in binutils and was always set to zero.
This change removes it from documentation and examples.

Needs ULP binutils with this change:
https://github.com/espressif/binutils-esp32ulp/commit/af79434

docs/api-guides/ulp_instruction_set.rst
examples/system/ulp_adc/main/ulp/adc.S

index fdabb7f6bb22160fc9f751248464a6edf876e464..dda5a70679bbd3753283bc1411bffe656ddc162d 100755 (executable)
@@ -651,21 +651,21 @@ Similar considerations apply to ``LD`` and ``ST`` instructions. Consider the fol
 ---------------------------------\r
 \r
 **Syntax**\r
-  **ADC**   *Rdst, Sar_sel, Mux, Cycles*\r
+  - **ADC**   *Rdst, Sar_sel, Mux*\r
+\r
+  - **ADC**   *Rdst, Sar_sel, Mux, 0* — deprecated form\r
 \r
 **Operands**\r
-  - *Rdst* –      Destination Register R[0..3], result will be stored to this register\r
-  - *Sar_sel* – selected ADC : 0=SARADC0, 1=SARADC1\r
+  - *Rdst* – Destination Register R[0..3], result will be stored to this register\r
+  - *Sar_sel* – Select ADC: 0 = SARADC1, 1 = SARADC2\r
   - *Mux*  -  selected PAD, SARADC Pad[Mux+1] is enabled\r
-  - *Cycle* – number of cycles used to perform measurement\r
 \r
 **Description**\r
   The instruction makes measurements from ADC.\r
 \r
 **Examples**::\r
 \r
-   1:        ADC      R1, 0, 1, 100 // Measure value using ADC1 pad 2,\r
-                                    // for 100 cycles and move result to R1\r
+   1:        ADC      R1, 0, 1      // Measure value using ADC1 pad 2 and store result into R1\r
 \r
 \r
 **REG_RD** – read from peripheral register\r
index 9450f55d2a937c1889c17ceb79117b40296f260c..1f0f6d5ac9eca9a2f02075b7d5a9e8643a5592b5 100644 (file)
@@ -72,7 +72,7 @@ entry:
        stage_rst
 measure:
        /* measure and add value to accumulator */
-       adc r1, 0, adc_channel + 1, 0
+       adc r1, 0, adc_channel + 1
        add r0, r0, r1
        /* increment loop counter and check exit condition */
        stage_inc 1