File tree Expand file tree Collapse file tree 2 files changed +4
-12
lines changed
boards/adafruit_feather_esp32s3_tft Expand file tree Collapse file tree 2 files changed +4
-12
lines changed 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 ;
@@ -95,7 +89,9 @@ void board_init(void) {
95
89
display -> base .type = & displayio_display_type ;
96
90
97
91
// workaround as board_init() is called before reset_port() in main.c
92
+ #if CIRCUITPY_PWMIO
98
93
pwmout_reset ();
94
+ #endif
99
95
100
96
common_hal_displayio_display_construct (
101
97
display ,
Original file line number Diff line number Diff line change @@ -55,18 +55,14 @@ STATIC uint32_t calculate_duty_cycle(uint32_t frequency) {
55
55
56
56
void pwmout_reset (void ) {
57
57
for (size_t i = 0 ; i < LEDC_CHANNEL_MAX ; i ++ ) {
58
- if (reserved_channels [i ] != INDEX_EMPTY ) {
58
+ if (reserved_channels [i ] != INDEX_EMPTY && ! never_reset_chan [ i ] ) {
59
59
ledc_stop (LEDC_LOW_SPEED_MODE , i , 0 );
60
- }
61
- if (!never_reset_chan [i ]) {
62
60
reserved_channels [i ] = INDEX_EMPTY ;
63
61
}
64
62
}
65
63
for (size_t i = 0 ; i < LEDC_TIMER_MAX ; i ++ ) {
66
- if (reserved_timer_freq [i ]) {
64
+ if (reserved_timer_freq [i ] && ! never_reset_tim [ i ] ) {
67
65
ledc_timer_rst (LEDC_LOW_SPEED_MODE , i );
68
- }
69
- if (!never_reset_tim [i ]) {
70
66
reserved_timer_freq [i ] = 0 ;
71
67
varfreq_timers [i ] = false;
72
68
}
You can’t perform that action at this time.
0 commit comments