From d5e256486eafab543c3e24850fe87136c2f0575d Mon Sep 17 00:00:00 2001 From: Daniel Campora Date: Thu, 3 Sep 2015 11:25:44 +0200 Subject: cc3200: Re-work Pin class according to the new API. Also add relevant test. --- docs/wipy/quickref.rst | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'docs/wipy') diff --git a/docs/wipy/quickref.rst b/docs/wipy/quickref.rst index 358020d94..da895d7b3 100644 --- a/docs/wipy/quickref.rst +++ b/docs/wipy/quickref.rst @@ -28,14 +28,15 @@ See :ref:`pyb.Pin `. :: from pyb import Pin # initialize GP2 in gpio mode (af=0) and make it an output - p_out = Pin('GP2', af=0, mode=Pin.OUT) + p_out = Pin('GP2', mode=Pin.OUT) p_out.high() p_out.low() p_out.toggle() + p_out(True) # make GP1 an input with the pull-up enabled - p_in = Pin('GP1', af = 0, mode=Pin.IN, type = Pin.STD_PU) - p_in.value() # get value, 0 or 1 + p_in = Pin('GP1', mode=Pin.IN, pull = Pin.PULL_UP) + p_in() # get value, 0 or 1 Timers ------ -- cgit v1.2.3