Skip to content

Commit 38e1535

Browse files
authored
Update minitft_featherwing.py
set spi speed
1 parent d047cf8 commit 38e1535

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

adafruit_featherwing/minitft_featherwing.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,16 @@ 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+
spi.try_lock()
78+
spi.configure(baudrate=24000000)
79+
spi.unlock()
7880
self._ss.pin_mode(8, self._ss.OUTPUT)
79-
self._ss.digital_write(8, True) # Reset the Display via Seesaw
81+
self._ss.digital_write(8, True) # Reset the Display via Seesaw
82+
display_bus = displayio.FourWire(spi,
83+
command=board.D6,
84+
chip_select=board.D5)
8085
self.display = ST7735R(display_bus, width=160, height=80, colstart=24,
81-
rotation=270, bgr=True)
86+
rotation=270, bgr=True)
8287

8388
@property
8489
def backlight(self):

0 commit comments

Comments
 (0)