File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff 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
164165Available Pins are from the following ranges (inclusive): 0-19, 21-23, 25-27, 32-39.
165166These correspond to the actual GPIO pin numbers of ESP32 chip. Note that many
166167end-user boards use their own adhoc pin numbering (marked e.g. D0, D1, ...).
167168For mapping between board logical pins and physical chip pins consult your board
168169documentation.
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+
170180Notes:
171181
172182* Pins 1 and 3 are REPL UART TX and RX respectively
You can’t perform that action at this time.
0 commit comments