Skip to content

Commit 91380f1

Browse files
authored
Update to use new display construct.
1 parent 22665a1 commit 91380f1

File tree

1 file changed

+3
-3
lines changed
  • ports/raspberrypi/boards/lilygo_t_display_rp2040

1 file changed

+3
-3
lines changed

ports/raspberrypi/boards/lilygo_t_display_rp2040/board.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@ uint8_t display_init_sequence[] = {
6666
};
6767

6868
static void display_init(void) {
69-
busio_spi_obj_t *spi = &displays[0].fourwire_bus.inline_bus;
69+
displayio_fourwire_obj_t *bus = &allocate_display_bus()->fourwire_bus;
70+
busio_spi_obj_t *spi = &bus->inline_bus;
7071

7172
common_hal_busio_spi_construct(
7273
spi,
@@ -77,7 +78,6 @@ static void display_init(void) {
7778

7879
common_hal_busio_spi_never_reset(spi);
7980

80-
displayio_fourwire_obj_t *bus = &displays[0].fourwire_bus;
8181
bus->base.type = &displayio_fourwire_type;
8282

8383
common_hal_displayio_fourwire_construct(
@@ -91,7 +91,7 @@ static void display_init(void) {
9191
0 // phase
9292
);
9393

94-
displayio_display_obj_t *display = &displays[0].display;
94+
displayio_display_obj_t *display = &allocate_display()->display;
9595
display->base.type = &displayio_display_type;
9696

9797
common_hal_displayio_display_construct(

0 commit comments

Comments
 (0)