summaryrefslogtreecommitdiffstatshomepage
path: root/docs/library/pyb.Pin.rst
diff options
context:
space:
mode:
authorDaniel Campora <daniel@wipy.io>2015-07-28 23:03:53 +0200
committerDaniel Campora <daniel@wipy.io>2015-07-30 00:43:08 +0200
commit007878781c74e0e4213759d8ee07ee81b5342f5c (patch)
treefb4ee36746826043ce18993b488ac42b370f5cfa /docs/library/pyb.Pin.rst
parentcfc4c338015cb65a35228706c44485dd57ec238e (diff)
downloadmicropython-007878781c74e0e4213759d8ee07ee81b5342f5c.tar.gz
micropython-007878781c74e0e4213759d8ee07ee81b5342f5c.zip
cc3200: Rename pins from GPIO to just GP.
This is how the names will be printed on the sticker that goes on top of the EMI shield. The shorter names also help saving a few bytes of RAM and ROM.
Diffstat (limited to 'docs/library/pyb.Pin.rst')
-rw-r--r--docs/library/pyb.Pin.rst12
1 files changed, 6 insertions, 6 deletions
diff --git a/docs/library/pyb.Pin.rst b/docs/library/pyb.Pin.rst
index 092af11c7a..00a65126d9 100644
--- a/docs/library/pyb.Pin.rst
+++ b/docs/library/pyb.Pin.rst
@@ -67,14 +67,14 @@ Usage Model:
Board pins are identified by their string name::
- g = pyb.Pin('GPIO9', af=0, mode=pyb.Pin.IN, type=pyb.Pin.STD, strength=pyb.Pin.S2MA)
+ g = pyb.Pin('GP9', af=0, mode=pyb.Pin.IN, type=pyb.Pin.STD, strength=pyb.Pin.S2MA)
You can also configure the Pin to generate interrupts. For instance::
def pincb(pin):
print(pin.name())
- pin_int = pyb.Pin('GPIO10', af=0, mode=Pin.IN, type=pyb.Pin.STD_PD, strength=pyb.Pin.S2MA)
+ pin_int = pyb.Pin('GP10', af=0, mode=Pin.IN, type=pyb.Pin.STD_PD, strength=pyb.Pin.S2MA)
pin_int.callback (mode=pyb.Pin.INT_RISING, handler=pincb)
# the callback can be triggered manually
pin_int.callback()()
@@ -288,12 +288,12 @@ Methods
board. Please note:
- If ``wakes=pyb.Sleep.ACTIVE`` any pin can wake the board.
- - If ``wakes=pyb.Sleep.SUSPENDED`` pins ``GPIO2``, ``GPIO4``, ``GPIO10``,
- ``GPIO11``, GPIO17`` or ``GPIO24`` can wake the board. Note that only 1
+ - If ``wakes=pyb.Sleep.SUSPENDED`` pins ``GP2``, ``GP4``, ``GP10``,
+ ``GP11``, GP17`` or ``GP24`` can wake the board. Note that only 1
of this pins can be enabled as a wake source at the same time, so, only
the last enabled pin as a ``pyb.Sleep.SUSPENDED`` wake source will have effect.
- - If ``wakes=pyb.Sleep.SUSPENDED`` pins ``GPIO2``, ``GPIO4``, ``GPIO10``,
- ``GPIO11``, ``GPIO17`` and ``GPIO24`` can wake the board. In this case all of the
+ - If ``wakes=pyb.Sleep.SUSPENDED`` pins ``GP2``, ``GP4``, ``GP10``,
+ ``GP11``, ``GP17`` and ``GP24`` can wake the board. In this case all of the
6 pins can be enabled as a ``pyb.Sleep.HIBERNATE`` wake source at the same time.
- Values can be ORed to make a pin generate interrupts in more than one power
mode.