File tree Expand file tree Collapse file tree 1 file changed +3
-12
lines changed
ports/espressif/boards/waveshare_esp32_c6_lcd_1_47 Expand file tree Collapse file tree 1 file changed +3
-12
lines changed Original file line number Diff line number Diff line change 11
11
#include "shared-bindings/fourwire/FourWire.h"
12
12
#include "shared-module/displayio/__init__.h"
13
13
#include "shared-module/displayio/mipi_constants.h"
14
+ #include "shared-bindings/board/__init__.h"
14
15
15
16
#define DELAY 0x80
16
17
@@ -40,18 +41,8 @@ uint8_t display_init_sequence[] = {
40
41
};
41
42
42
43
static void display_init (void ) {
44
+ busio_spi_obj_t * spi = common_hal_board_create_spi (0 );
43
45
fourwire_fourwire_obj_t * bus = & allocate_display_bus ()-> fourwire_bus ;
44
- busio_spi_obj_t * spi = & bus -> inline_bus ;
45
-
46
- common_hal_busio_spi_construct (
47
- spi ,
48
- & pin_GPIO7 , // CLK
49
- & pin_GPIO6 , // MOSI
50
- NULL , // MISO not connected
51
- false); // Not half-duplex
52
-
53
- common_hal_busio_spi_never_reset (spi );
54
-
55
46
bus -> base .type = & fourwire_fourwire_type ;
56
47
57
48
common_hal_fourwire_fourwire_construct (
@@ -73,7 +64,7 @@ static void display_init(void) {
73
64
bus ,
74
65
172 , // width (after rotation)
75
66
320 , // height (after rotation)
76
- 34 , // column start
67
+ 34 , // column start
77
68
0 , // row start
78
69
0 , // rotation
79
70
16 , // color depth
You can’t perform that action at this time.
0 commit comments