File tree Expand file tree Collapse file tree 12 files changed +6
-56
lines changed
adafruit_feather_esp32s3_tft
waveshare_esp32_s2_pico_lcd Expand file tree Collapse file tree 12 files changed +6
-56
lines changed Original file line number Diff line number Diff line change @@ -967,15 +967,15 @@ int __attribute__((used)) main(void) {
967
967
safe_mode = NO_CIRCUITPY ;
968
968
}
969
969
970
- // displays init after filesystem, since they could share the flash SPI
971
- board_init ();
972
-
973
970
// Reset everything and prep MicroPython to run boot.py.
974
971
reset_port ();
975
972
// Port-independent devices, like CIRCUITPY_BLEIO_HCI.
976
973
reset_devices ();
977
974
reset_board ();
978
975
976
+ // displays init after filesystem, since they could share the flash SPI
977
+ board_init ();
978
+
979
979
// This is first time we are running CircuitPython after a reset or power-up.
980
980
supervisor_set_run_reason (RUN_REASON_STARTUP );
981
981
Original file line number Diff line number Diff line change @@ -63,9 +63,6 @@ void board_init(void) {
63
63
0 , // Polarity
64
64
0 ); // Phase
65
65
66
- // workaround as board_init() is called before reset_port() in main.c
67
- pwmout_reset ();
68
-
69
66
displayio_display_obj_t * display = & displays [0 ].display ;
70
67
display -> base .type = & displayio_display_type ;
71
68
common_hal_displayio_display_construct (
Original file line number Diff line number Diff line change @@ -71,12 +71,6 @@ uint8_t display_init_sequence[] = {
71
71
72
72
73
73
void board_init (void ) {
74
- // THIS SHOULD BE HANDLED BY espressif_board_reset_pin_number(), but it is not working.
75
- // TEMPORARY FIX UNTIL IT'S DIAGNOSED.
76
- common_hal_never_reset_pin (& pin_GPIO21 );
77
- gpio_set_direction (21 , GPIO_MODE_DEF_OUTPUT );
78
- gpio_set_level (21 , true);
79
-
80
74
busio_spi_obj_t * spi = common_hal_board_create_spi (0 );
81
75
displayio_fourwire_obj_t * bus = & displays [0 ].fourwire_bus ;
82
76
bus -> base .type = & displayio_fourwire_type ;
@@ -94,9 +88,6 @@ void board_init(void) {
94
88
displayio_display_obj_t * display = & displays [0 ].display ;
95
89
display -> base .type = & displayio_display_type ;
96
90
97
- // workaround as board_init() is called before reset_port() in main.c
98
- pwmout_reset ();
99
-
100
91
common_hal_displayio_display_construct (
101
92
display ,
102
93
bus ,
@@ -127,8 +118,6 @@ void board_init(void) {
127
118
false, // SH1107_addressing
128
119
50000 // backlight pwm frequency
129
120
);
130
-
131
- common_hal_never_reset_pin (& pin_GPIO45 ); // backlight pin
132
121
}
133
122
134
123
bool espressif_board_reset_pin_number (gpio_num_t pin_number ) {
Original file line number Diff line number Diff line change @@ -71,9 +71,6 @@ void board_init(void) {
71
71
0 , // Polarity
72
72
0 ); // Phase
73
73
74
- // workaround as board_init() is called before reset_port() in main.c
75
- pwmout_reset ();
76
-
77
74
displayio_display_obj_t * display = & displays [0 ].display ;
78
75
display -> base .type = & displayio_display_type ;
79
76
common_hal_displayio_display_construct (
Original file line number Diff line number Diff line change @@ -87,9 +87,6 @@ void board_init(void) {
87
87
displayio_display_obj_t * display = & displays [0 ].display ;
88
88
display -> base .type = & displayio_display_type ;
89
89
90
- // workaround as board_init() is called before reset_port() in main.c
91
- pwmout_reset ();
92
-
93
90
common_hal_displayio_display_construct (
94
91
display ,
95
92
bus ,
@@ -120,9 +117,6 @@ void board_init(void) {
120
117
false, // SH1107_addressing
121
118
50000 // backlight pwm frequency
122
119
);
123
-
124
- common_hal_never_reset_pin (& pin_GPIO48 ); // backlight pin
125
- // Debug UART
126
120
}
127
121
128
122
// Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here.
Original file line number Diff line number Diff line change @@ -88,9 +88,6 @@ void board_init(void) {
88
88
displayio_display_obj_t * display = & displays [0 ].display ;
89
89
display -> base .type = & displayio_display_type ;
90
90
91
- // workaround as board_init() is called before reset_port() in main.c
92
- pwmout_reset ();
93
-
94
91
common_hal_displayio_display_construct (
95
92
display ,
96
93
bus ,
@@ -121,8 +118,6 @@ void board_init(void) {
121
118
false, // SH1107_addressing
122
119
50000 // backlight pwm frequency
123
120
);
124
-
125
- common_hal_never_reset_pin (& pin_GPIO45 ); // backlight pin
126
121
}
127
122
128
123
bool espressif_board_reset_pin_number (gpio_num_t pin_number ) {
Original file line number Diff line number Diff line change @@ -93,9 +93,6 @@ static void display_init(void) {
93
93
displayio_display_obj_t * display = & displays [0 ].display ;
94
94
display -> base .type = & displayio_display_type ;
95
95
96
- // workaround as board_init() is called before reset_port() in main.c
97
- pwmout_reset ();
98
-
99
96
common_hal_displayio_display_construct (
100
97
display ,
101
98
bus ,
@@ -126,8 +123,6 @@ static void display_init(void) {
126
123
false, // SH1107_addressing
127
124
50000 // backlight pwm frequency
128
125
);
129
-
130
- common_hal_never_reset_pin (& pin_GPIO38 ); // backlight pin
131
126
}
132
127
133
128
void board_init (void ) {
Original file line number Diff line number Diff line change @@ -93,9 +93,6 @@ static void display_init(void) {
93
93
displayio_display_obj_t * display = & displays [0 ].display ;
94
94
display -> base .type = & displayio_display_type ;
95
95
96
- // workaround as board_init() is called before reset_port() in main.c
97
- pwmout_reset ();
98
-
99
96
common_hal_displayio_display_construct (
100
97
display ,
101
98
bus ,
@@ -126,8 +123,6 @@ static void display_init(void) {
126
123
false, // SH1107_addressing
127
124
50000 // backlight pwm frequency
128
125
);
129
-
130
- common_hal_never_reset_pin (& pin_GPIO33 ); // backlight pin
131
126
}
132
127
133
128
void board_init (void ) {
Original file line number Diff line number Diff line change @@ -172,9 +172,6 @@ void board_init(void) {
172
172
0 // phase
173
173
);
174
174
175
- // workaround as board_init() is called before reset_port() in main.c
176
- pwmout_reset ();
177
-
178
175
displayio_display_obj_t * display = & displays [0 ].display ;
179
176
display -> base .type = & displayio_display_type ;
180
177
common_hal_displayio_display_construct (
Original file line number Diff line number Diff line change @@ -92,9 +92,6 @@ static void display_init(void) {
92
92
displayio_display_obj_t * display = & displays [0 ].display ;
93
93
display -> base .type = & displayio_display_type ;
94
94
95
- // workaround as board_init() is called before reset_port() in main.c
96
- pwmout_reset ();
97
-
98
95
common_hal_displayio_display_construct (
99
96
display ,
100
97
bus ,
@@ -125,8 +122,6 @@ static void display_init(void) {
125
122
false, // SH1107_addressing
126
123
50000 // backlight pwm frequency
127
124
);
128
-
129
- common_hal_never_reset_pin (& pin_GPIO45 ); // backlight pin
130
125
}
131
126
132
127
You can’t perform that action at this time.
0 commit comments