File tree Expand file tree Collapse file tree 1 file changed +2
-11
lines changed
ports/espressif/boards/adafruit_feather_esp32s2_tft Expand file tree Collapse file tree 1 file changed +2
-11
lines changed Original file line number Diff line number Diff line change 31
31
#include "shared-bindings/microcontroller/Pin.h"
32
32
#include "shared-module/displayio/__init__.h"
33
33
#include "shared-module/displayio/mipi_constants.h"
34
+ #include "shared-bindings/board/__init__.h"
34
35
35
36
displayio_fourwire_obj_t board_display_obj ;
36
37
@@ -81,17 +82,7 @@ void board_init(void) {
81
82
gpio_set_direction (21 , GPIO_MODE_DEF_OUTPUT );
82
83
gpio_set_level (21 , true);
83
84
84
- busio_spi_obj_t * spi = & displays [0 ].fourwire_bus .inline_bus ;
85
-
86
- common_hal_busio_spi_construct (
87
- spi ,
88
- & pin_GPIO36 , // CLK
89
- & pin_GPIO35 , // MOSI
90
- NULL // MISO not connected
91
- );
92
-
93
- common_hal_busio_spi_never_reset (spi );
94
-
85
+ busio_spi_obj_t * spi = common_hal_board_create_spi ();
95
86
displayio_fourwire_obj_t * bus = & displays [0 ].fourwire_bus ;
96
87
bus -> base .type = & displayio_fourwire_type ;
97
88
You can’t perform that action at this time.
0 commit comments