Skip to content

Commit 781b4ef

Browse files
authored
Merge pull request #39 from hexthat/patch-1
Update minitft_featherwing.py
2 parents d047cf8 + d7b087c commit 781b4ef

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

adafruit_featherwing/minitft_featherwing.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,18 @@ def __init__(self, address=0x5E, i2c=None, spi=None):
7474
self._backlight.duty_cycle = 0
7575
self._ss.pin_mode_bulk(self._button_mask, self._ss.INPUT_PULLUP)
7676
displayio.release_displays()
77-
display_bus = displayio.FourWire(spi, command=board.D6, chip_select=board.D5)
77+
while not spi.try_lock():
78+
pass
79+
spi.configure(baudrate=24000000)
80+
spi.unlock()
7881
self._ss.pin_mode(8, self._ss.OUTPUT)
79-
self._ss.digital_write(8, True) # Reset the Display via Seesaw
82+
self._ss.digital_write(8, True) # Reset the Display via Seesaw
83+
display_bus = displayio.FourWire(spi,
84+
command=board.D6,
85+
chip_select=board.D5)
8086
self.display = ST7735R(display_bus, width=160, height=80, colstart=24,
8187
rotation=270, bgr=True)
88+
self._ss.pin_mode_bulk(self._button_mask, self._ss.INPUT_PULLUP)
8289

8390
@property
8491
def backlight(self):

0 commit comments

Comments
 (0)