summaryrefslogtreecommitdiffstatshomepage
path: root/docs/wipy
diff options
context:
space:
mode:
Diffstat (limited to 'docs/wipy')
-rw-r--r--docs/wipy/general.rst8
-rw-r--r--docs/wipy/quickref.rst34
2 files changed, 21 insertions, 21 deletions
diff --git a/docs/wipy/general.rst b/docs/wipy/general.rst
index 976fb6891f..f7c867e0c7 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 a8e0bdc98a..34517d2738 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()