summaryrefslogtreecommitdiffstatshomepage
path: root/docs/esp32
diff options
context:
space:
mode:
authorJonathan Hogg <me@jonathanhogg.com>2022-03-07 09:03:49 +0000
committerDamien George <damien@micropython.org>2022-03-07 23:41:29 +1100
commit4c7c80d6266c6362253755c92bf649dc85c47dae (patch)
treec63fa40061c2754bed1d7e2f76ab2bf1a328c81c /docs/esp32
parent33083bf52730fa1c238a154685a895b2775cc355 (diff)
downloadmicropython-4c7c80d6266c6362253755c92bf649dc85c47dae.tar.gz
micropython-4c7c80d6266c6362253755c92bf649dc85c47dae.zip
docs/esp32/quickref: Document GPIO drive strength.
Add brief documentation of the new `drive` keyword argument.
Diffstat (limited to 'docs/esp32')
-rw-r--r--docs/esp32/quickref.rst10
1 files changed, 10 insertions, 0 deletions
diff --git a/docs/esp32/quickref.rst b/docs/esp32/quickref.rst
index da586819fd..56e765536e 100644
--- a/docs/esp32/quickref.rst
+++ b/docs/esp32/quickref.rst
@@ -160,6 +160,7 @@ Use the :ref:`machine.Pin <machine.Pin>` class::
p4 = Pin(4, Pin.IN, Pin.PULL_UP) # enable internal pull-up resistor
p5 = Pin(5, Pin.OUT, value=1) # set pin high on creation
+ p6 = Pin(6, Pin.OUT, drive=Pin.DRIVE_3) # set maximum drive strength
Available Pins are from the following ranges (inclusive): 0-19, 21-23, 25-27, 32-39.
These correspond to the actual GPIO pin numbers of ESP32 chip. Note that many
@@ -167,6 +168,15 @@ end-user boards use their own adhoc pin numbering (marked e.g. D0, D1, ...).
For mapping between board logical pins and physical chip pins consult your board
documentation.
+Four drive strengths are supported, using the ``drive`` keyword argument to the
+``Pin()`` constructor or ``Pin.init()`` method, with different corresponding
+safe maximum source/sink currents and approximate internal driver resistances:
+
+ - ``Pin.DRIVE_0``: 5mA / 130 ohm
+ - ``Pin.DRIVE_1``: 10mA / 60 ohm
+ - ``Pin.DRIVE_2``: 20mA / 30 ohm (default strength if not configured)
+ - ``Pin.DRIVE_3``: 40mA / 15 ohm
+
Notes:
* Pins 1 and 3 are REPL UART TX and RX respectively