diff options
Diffstat (limited to 'docs/library/pyb.Pin.rst')
-rw-r--r-- | docs/library/pyb.Pin.rst | 12 |
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. |