summaryrefslogtreecommitdiff
path: root/docs/library/pyb.ADC.rst
diff options
context:
space:
mode:
authorDaniel Campora <daniel@wipy.io>2015-08-10 16:44:20 +0200
committerDaniel Campora <daniel@wipy.io>2015-08-10 23:42:05 +0200
commit7027fd53438f36cdfc417df4b667575671a1c857 (patch)
tree2236469acf67d9c721cca2b3cb7383993034c46b /docs/library/pyb.ADC.rst
parent7da2fdc3cdd422d0cba60b40146aba07881bdc97 (diff)
cc3200: Make ADC API compatible with the pyboard.
Diffstat (limited to 'docs/library/pyb.ADC.rst')
-rw-r--r--docs/library/pyb.ADC.rst18
1 files changed, 10 insertions, 8 deletions
diff --git a/docs/library/pyb.ADC.rst b/docs/library/pyb.ADC.rst
index 02734e72f..2e2c2070d 100644
--- a/docs/library/pyb.ADC.rst
+++ b/docs/library/pyb.ADC.rst
@@ -24,8 +24,10 @@ class ADC -- analog to digital conversion: read analog values on a pin
import pyb
- adc = pyb.ADC(channel) # create an analog object on one of the 4 ADC channels
+ adc = pyb.ADC(pin) # create an analog object on one of the 4 ADC channels
val = adc.read() # read an analog value
+ adc.deinit() # disable the adc channel
+ adc.init() # enable the adc channel
Constructors
------------
@@ -39,13 +41,13 @@ Constructors
.. only:: port_wipy
- .. class:: pyb.ADC(channel)
+ .. class:: pyb.ADC(pin)
- Create an ADC object on the given channel. Each channel is associated
- to a specific pin. For more info check the `pinout and alternate functions
- table. <https://raw.githubusercontent.com/wipy/wipy/master/docs/PinOUT.png>`_
+ Create an ADC object associated with the given pin.
This allows you to then read analog values on that pin.
-
+ For more info check the `pinout and alternate functions
+ table. <https://raw.githubusercontent.com/wipy/wipy/master/docs/PinOUT.png>`_
+
.. warning::
ADC pin input range is 0-1.4V (being 1.8V the absolute maximum that it
@@ -100,10 +102,10 @@ Methods
.. only:: port_wipy
- .. method:: adc.enable()
+ .. method:: adc.init()
Enable the ADC channel.
- .. method:: adc.disable()
+ .. method:: adc.deinit()
Disable the ADC channel.