Skip to content

Commit 477e59e

Browse files
authored
Merge pull request #57 from makermelissa/master
Reordered init sequence for MiniTFT for improved stability
2 parents 69e5d3a + 2e952dd commit 477e59e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

adafruit_featherwing/minitft_featherwing.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,14 +75,14 @@ def __init__(self, address=0x5E, i2c=None, spi=None, cs=None, dc=None):
7575
if dc is None:
7676
dc = board.D6
7777
self._ss = Seesaw(i2c, address)
78-
self._backlight = PWMOut(self._ss, 5)
79-
self._backlight.duty_cycle = 0
78+
self._ss.pin_mode_bulk(self._button_mask, self._ss.INPUT_PULLUP)
8079
self._ss.pin_mode(8, self._ss.OUTPUT)
8180
self._ss.digital_write(8, True) # Reset the Display via Seesaw
81+
self._backlight = PWMOut(self._ss, 5)
82+
self._backlight.duty_cycle = 0
8283
display_bus = displayio.FourWire(spi, command=dc, chip_select=cs)
8384
self.display = ST7735R(display_bus, width=160, height=80, colstart=24,
8485
rotation=270, bgr=True)
85-
self._ss.pin_mode_bulk(self._button_mask, self._ss.INPUT_PULLUP)
8686
#pylint: enable-msg=too-many-arguments
8787

8888
@property

0 commit comments

Comments
 (0)