summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Hogg <me@jonathanhogg.com>2022-03-10 13:00:30 +0000
committerDamien George <damien@micropython.org>2022-03-21 23:59:48 +1100
commit3b9de192be8177abd07c18cf58468939c4c5fd5d (patch)
tree1252b60c46a9c54158a88a4c0a451fdc4f3c7e35
parent21d0599bd10aa567e3fdee5e39da1fe9a9f816e6 (diff)
esp32/boards/UM_TINYPICO: Remove use of PULL_HOLD.
Change APA102 power handling to not use the (now removed) PULL_HOLD constant.
-rw-r--r--ports/esp32/boards/UM_TINYPICO/modules/tinypico.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/ports/esp32/boards/UM_TINYPICO/modules/tinypico.py b/ports/esp32/boards/UM_TINYPICO/modules/tinypico.py
index 04b274bb5..954507884 100644
--- a/ports/esp32/boards/UM_TINYPICO/modules/tinypico.py
+++ b/ports/esp32/boards/UM_TINYPICO/modules/tinypico.py
@@ -83,10 +83,9 @@ def set_dotstar_power(state):
"""Set the power for the on-board Dotstar to allow no current draw when not needed."""
# Set the power pin to the inverse of state
if state:
- Pin(DOTSTAR_PWR, Pin.OUT, None) # Break the PULL_HOLD on the pin
- Pin(DOTSTAR_PWR).value(False) # Set the pin to LOW to enable the Transistor
+ Pin(DOTSTAR_PWR, Pin.OUT, None, value=0) # Drive output to LOW to enable transistor
else:
- Pin(13, Pin.IN, Pin.PULL_HOLD) # Set PULL_HOLD on the pin to allow the 3V3 pull-up to work
+ Pin(DOTSTAR_PWR, Pin.IN, None) # Disable output, external pull-up will disable transistor
Pin(
DOTSTAR_CLK, Pin.OUT if state else Pin.IN