From 7027fd53438f36cdfc417df4b667575671a1c857 Mon Sep 17 00:00:00 2001 From: Daniel Campora Date: Mon, 10 Aug 2015 16:44:20 +0200 Subject: cc3200: Make ADC API compatible with the pyboard. --- docs/library/pyb.ADC.rst | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'docs') 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. `_ + 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. `_ + .. 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. -- cgit v1.2.3