8000 docs/esp32/quickref: Document GPIO drive strength. · micropython/micropython@ed15d7b · GitHub
[go: up one dir, main page]

Skip to content

Commit ed15d7b

Browse files
committed
docs/esp32/quickref: Document GPIO drive strength.
Add brief documentation of the new `drive` keyword argument.
1 parent 5153341 commit ed15d7b

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

docs/esp32/quickref.rst

Lines changed: 10 additions & 0 deletions
< 6625 td data-grid-cell-id="diff-c175499d852d6b788735a5e714554ae0f098637cfe57e5c7f3e02ae6e9f5d0cf-169-176-0" data-selected="false" role="gridcell" style="background-color:var(--diffBlob-additionNum-bgColor, var(--diffBlob-addition-bgColor-num));text-align:center" tabindex="-1" valign="top" class="focusable-grid-cell diff-line-number position-relative left-side">
Original file line numberDiff line numberDiff line change
@@ -160,13 +160,23 @@ Use the :ref:`machine.Pin <machine.Pin>` class::
160160

161161
p4 = Pin(4, Pin.IN, Pin.PULL_UP) # enable internal pull-up resistor
162162
p5 = Pin(5, Pin.OUT, value=1) # set pin high on creation
163+
p6 = Pin(6, Pin.OUT, drive=Pin.DRIVE_HIGH) # set maximum drive strength
163164

164165
Available Pins are from the following ranges (inclusive): 0-19, 21-23, 25-27, 32-39.
165166
These correspond to the actual GPIO pin numbers of ESP32 chip. Note that many
166167
end-user boards use their own adhoc pin numbering (marked e.g. D0, D1, ...).
167168
For mapping between board logical pins and physical chip pins consult your board
168169
documentation.
169170

171+
Four drive strengths are supported, using the ``drive`` keyword argument to the
172+
``Pin()`` constructor or ``Pin.init()`` method, with different corresponding
173+
safe maximum source/sink currents and approximate internal driver resistances:
174+
175+
- ``Pin.DRIVE_WEAK``: 5mA / 130 ohm
176+
- ``Pin.DRIVE_LOW``: 10mA / 60 ohm
177+
- ``Pin.DRIVE_MED``: 20mA / 30 ohm
178+
- ``Pin.DRIVE_HIGH``: 40mA / 15 ohm
179+
170180
Notes:
171181

172182
* Pins 1 and 3 are REPL UART TX and RX respectively

0 commit comments

Comments
 (0)
0