From 10c3836bc0ac0aa3051fa2787a4488c656b0cfe1 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Tue, 11 Jan 2022 11:08:47 -0600 Subject: [PATCH] feather esp32s2 tft: fix sharing of main display bus --- .../boards/adafruit_feather_esp32s2_tft/board.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/ports/espressif/boards/adafruit_feather_esp32s2_tft/board.c b/ports/espressif/boards/adafruit_feather_esp32s2_tft/board.c index 346be34886..68e4171948 100644 --- a/ports/espressif/boards/adafruit_feather_esp32s2_tft/board.c +++ b/ports/espressif/boards/adafruit_feather_esp32s2_tft/board.c @@ -31,6 +31,7 @@ #include "shared-bindings/microcontroller/Pin.h" #include "shared-module/displayio/__init__.h" #include "shared-module/displayio/mipi_constants.h" +#include "shared-bindings/board/__init__.h" displayio_fourwire_obj_t board_display_obj; @@ -81,17 +82,7 @@ void board_init(void) { gpio_set_direction(21, GPIO_MODE_DEF_OUTPUT); gpio_set_level(21, true); - busio_spi_obj_t *spi = &displays[0].fourwire_bus.inline_bus; - - common_hal_busio_spi_construct( - spi, - &pin_GPIO36, // CLK - &pin_GPIO35, // MOSI - NULL // MISO not connected - ); - - common_hal_busio_spi_never_reset(spi); - + busio_spi_obj_t *spi = common_hal_board_create_spi(); displayio_fourwire_obj_t *bus = &displays[0].fourwire_bus; bus->base.type = &displayio_fourwire_type;