diff options
author | Daniel Campora <daniel@wipy.io> | 2015-09-03 11:25:44 +0200 |
---|---|---|
committer | Daniel Campora <daniel@wipy.io> | 2015-09-10 07:59:35 +0200 |
commit | d5e256486eafab543c3e24850fe87136c2f0575d (patch) | |
tree | 7082fb8108308a8b39f9c44423097e8f453c3bc6 /docs/wipy/quickref.rst | |
parent | 42054c3cad3c31fa25c09450577d986b62d983c0 (diff) | |
download | micropython-d5e256486eafab543c3e24850fe87136c2f0575d.tar.gz micropython-d5e256486eafab543c3e24850fe87136c2f0575d.zip |
cc3200: Re-work Pin class according to the new API.
Also add relevant test.
Diffstat (limited to 'docs/wipy/quickref.rst')
-rw-r--r-- | docs/wipy/quickref.rst | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/docs/wipy/quickref.rst b/docs/wipy/quickref.rst index 358020d94e..da895d7b30 100644 --- a/docs/wipy/quickref.rst +++ b/docs/wipy/quickref.rst @@ -28,14 +28,15 @@ See :ref:`pyb.Pin <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 ------ |