aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorDaniel Campora2015-07-28 23:03:53 +0200
committerDaniel Campora2015-07-30 00:43:08 +0200
commit007878781c74e0e4213759d8ee07ee81b5342f5c (patch)
treefb4ee36746826043ce18993b488ac42b370f5cfa /docs
parentcfc4c338015cb65a35228706c44485dd57ec238e (diff)
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')
-rw-r--r--docs/library/pyb.ADC.rst2
-rw-r--r--docs/library/pyb.HeartBeat.rst8
-rw-r--r--docs/library/pyb.Pin.rst12
-rw-r--r--docs/library/pyb.SD.rst2
-rw-r--r--docs/wipy/general.rst8
-rw-r--r--docs/wipy/quickref.rst34
6 files changed, 33 insertions, 33 deletions
diff --git a/docs/library/pyb.ADC.rst b/docs/library/pyb.ADC.rst
index 36c376d37..02734e72f 100644
--- a/docs/library/pyb.ADC.rst
+++ b/docs/library/pyb.ADC.rst
@@ -49,7 +49,7 @@ Constructors
.. warning::
ADC pin input range is 0-1.4V (being 1.8V the absolute maximum that it
- can withstand). When GPIO2, GPIO3, GPIO4 or GPIO5 are remapped to the
+ can withstand). When GP2, GP3, GP4 or GP5 are remapped to the
ADC block, 1.8 V is the maximum. If these pins are used in digital mode,
then the maximum allowed input is 3.6V.
diff --git a/docs/library/pyb.HeartBeat.rst b/docs/library/pyb.HeartBeat.rst
index 971f2e93e..a50fc8a23 100644
--- a/docs/library/pyb.HeartBeat.rst
+++ b/docs/library/pyb.HeartBeat.rst
@@ -5,8 +5,8 @@ class HeartBeat -- heart beat LED
The HeartBeat class controls the heart beat led which by default
flashes once every 5s. The user can disable the HeartBeat and then
-is free to control this LED manually through GPIO25 using the Pin
-class. The GPIO25 can also be remapped as a PWM output, an this
+is free to control this LED manually through GP25 using the Pin
+class. The GP25 can also be remapped as a PWM output, an this
can be used to control the light intesity of the heart beat LED.
Example usage::
@@ -39,8 +39,8 @@ Methods
# disable the heart beat
pyb.HeartBeat().disable()
- # get the GPIO25 pin object
- hbl = pyb.Pin('GPIO25')
+ # get the GP25 pin object
+ hbl = pyb.Pin('GP25')
# toggle the led
hbl.toggle()
...
diff --git a/docs/library/pyb.Pin.rst b/docs/library/pyb.Pin.rst
index 092af11c7..00a65126d 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.
diff --git a/docs/library/pyb.SD.rst b/docs/library/pyb.SD.rst
index cbdfdfd04..0746b435b 100644
--- a/docs/library/pyb.SD.rst
+++ b/docs/library/pyb.SD.rst
@@ -15,7 +15,7 @@ Example usage::
# data, clk and cmd pins must be passed along with
# their respective alternate functions
- sd = pyb.SD('GPIO15', 8, 'GPIO10', 6, 'GPIO11', 6)
+ sd = pyb.SD('GP15', 8, 'GP10', 6, 'GP11', 6)
sd.enable() # enable and mount the SD card
sd.disable() # disable and unmount it
diff --git a/docs/wipy/general.rst b/docs/wipy/general.rst
index 976fb6891..f7c867e0c 100644
--- a/docs/wipy/general.rst
+++ b/docs/wipy/general.rst
@@ -35,21 +35,21 @@ If you power up normally, or press the reset button, the WiPy will boot
into standard mode; the ``boot.py`` file will be executed first, then
``main.py`` will run.
-You can override this boot sequence by pulling ``GPIO28`` **up** (connect
+You can override this boot sequence by pulling ``GP28`` **up** (connect
it to the 3v3 output pin) during reset. This procedure also allows going
back in time to old firmware versions. The WiPy can hold up to 3 different
firmware versions, which are: the factory firmware plus 2 user updates.
-After reset, if ``GPIO28`` is held high, the heart beat LED will start flashing
+After reset, if ``GP28`` is held high, the heart beat LED will start flashing
slowly, if after 3 seconds the pin is still being held high, the LED will start
blinking a bit faster and the WiPy will select the previous user update to boot.
-If the previous user update is the desired firmware image, ``GPIO28`` must be
+If the previous user update is the desired firmware image, ``GP28`` must be
released before 3 more seconds elapse. If 3 seconds later the pin is still high,
the factory firmware will be selected, the LED will flash quickly for 1.5 seconds
and the WiPy will proceed to boot. The firmware selection mechanism is as follows:
-**Safe Boot Pin** ``GPIO28`` **released during:**
+**Safe Boot Pin** ``GP28`` **released during:**
+-------------------------+-------------------------+----------------------------+
| 1st 3 secs window | 2nd 3 secs window | Final 1.5 secs window |
diff --git a/docs/wipy/quickref.rst b/docs/wipy/quickref.rst
index a8e0bdc98..34517d273 100644
--- a/docs/wipy/quickref.rst
+++ b/docs/wipy/quickref.rst
@@ -27,14 +27,14 @@ See :ref:`pyb.Pin <pyb.Pin>`. ::
from pyb import Pin
- # initialize GPIO2 in gpio mode (af=0) and make it an output
- p_out = Pin('GPIO2', af=0, mode=Pin.OUT)
+ # initialize GP2 in gpio mode (af=0) and make it an output
+ p_out = Pin('GP2', af=0, mode=Pin.OUT)
p_out.high()
p_out.low()
p_out.toggle()
- # make GPIO1 an input with the pull-up enabled
- p_in = Pin('GPIO1', af = 0, mode=Pin.IN, type = Pin.STD_PU)
+ # 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
Timers
@@ -50,7 +50,7 @@ See :ref:`pyb.Timer <pyb.Timer>` and :ref:`pyb.Pin <pyb.Pin>`. ::
tim_a.time() # get the value in microseconds
tim_a.freq(1) # 1 Hz
- p_out = Pin('GPIO2', af=0, mode=Pin.OUT)
+ p_out = Pin('GP2', af=0, mode=Pin.OUT)
tim_a.callback(handler=lambda t: p_out.toggle())
PWM (pulse width modulation)
@@ -61,8 +61,8 @@ See :ref:`pyb.Pin <pyb.Pin>` and :ref:`pyb.Timer <pyb.Timer>`. ::
from pyb import Timer
from pyb import Pin
- # assign GPIO25 to alternate function 5 (PWM)
- p_out = Pin('GPIO25', af=9, type=Pin.STD)
+ # assign GP25 to alternate function 5 (PWM)
+ p_out = Pin('GP25', af=9, type=Pin.STD)
# timer 2 in PWM mode and width must be 16 buts
tim = Timer(2, mode=Timer.PWM, width=16)
@@ -88,8 +88,8 @@ See :ref:`pyb.Pin <pyb.Pin>` and :ref:`pyb.UART <pyb.UART>`. ::
from pyb import Pin, UART
# first assign TX and RX to the correct pins
- Pin('GPIO1', af=3, mode=Pin.STD_PU) # TX
- Pin('GPIO2', af=3, mode=Pin.STD_PU) # RX
+ Pin('GP1', af=3, mode=Pin.STD_PU) # TX
+ Pin('GP2', af=3, mode=Pin.STD_PU) # RX
uart = UART(1, 9600)
uart.write('hello')
@@ -103,10 +103,10 @@ See :ref:`pyb.Pin <pyb.Pin>` and :ref:`pyb.SPI <pyb.SPI>`. ::
from pyb import Pin, SPI
# first assign CLK, MISO, MOSI, CS to the correct pins
- Pin('GPIO14', af=7, mode=Pin.STD) # CLK
- Pin('GPIO15', af=7, mode=Pin.STD) # MISO
- Pin('GPIO16', af=7, mode=Pin.STD) # MOSI
- Pin('GPIO17', af=7, mode=Pin.STD) # NSS/CS
+ Pin('GP14', af=7, mode=Pin.STD) # CLK
+ Pin('GP15', af=7, mode=Pin.STD) # MISO
+ Pin('GP16', af=7, mode=Pin.STD) # MOSI
+ Pin('GP17', af=7, mode=Pin.STD) # NSS/CS
# configure the SPI master @ 2MHz
spi = SPI(1, SPI.MASTER, baudrate=200000, polarity=0, phase=0)
@@ -122,8 +122,8 @@ See :ref:`pyb.Pin <pyb.Pin>` and :ref:`pyb.I2C <pyb.I2C>`. ::
from pyb import Pin, I2C
# first assign SCL and SDA to the correct pins
- Pin('GPIO23', af=9, mode=Pin.STD_PU) # SCL
- Pin('GPIO24', af=9, mode=Pin.STD_PU) # SDA
+ Pin('GP23', af=9, mode=Pin.STD_PU) # SCL
+ Pin('GP24', af=9, mode=Pin.STD_PU) # SDA
# configure the I2C bus
i2c = I2C(1, I2C.MASTER, baudrate=100000)
@@ -174,7 +174,7 @@ See :ref:`pyb.SD <pyb.SD>`. ::
# SD card pins need special configuration so we pass 'em to the constructor
# data pin, data af, clock pin, clock af, cmd pin, cmd af
- sd = pyb.SD('GPIO15', 8, 'GPIO10', 6, 'GPIO11', 6)
+ sd = pyb.SD('GP15', 8, 'GP10', 6, 'GP11', 6)
sd.enable()
WLAN (WiFi)
@@ -220,7 +220,7 @@ See :ref:`pyb.HeartBeat <pyb.HeartBeat>`. ::
from pyb import HeartBeat
- # disable the heart beat indication (you are free to use this LED connected to GPIO25)
+ # disable the heart beat indication (you are free to use this LED connected to GP25)
HeartBeat().disable()
# enable the heart beat again
HeartBeat().enable()