Skip to content

Commit 9daccc0

Browse files
committed
Forbidden pins are now correctly "in use" on ESP
This removes duplicate code to make debug UART pins in use via never reset. It is done through forbidden pins automatically now. Fixes #8288
1 parent 2a5b938 commit 9daccc0

File tree

78 files changed

+16
-688
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+16
-688
lines changed

.gitmodules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,4 +340,4 @@
340340
url = https://github.com/bablokb/circuitpython-pcf85063a
341341
[submodule "frozen/Adafruit_CircuitPython_Wave"]
342342
path = frozen/Adafruit_CircuitPython_Wave
343-
url = http://github.com/adafruit/Adafruit_CircuitPython_Wave.git
343+
url = https://github.com/adafruit/Adafruit_CircuitPython_Wave.git

ports/espressif/boards/adafruit_funhouse/board.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,6 @@ uint8_t display_init_sequence[] = {
5050
};
5151

5252
void board_init(void) {
53-
// Debug UART
54-
#ifdef DEBUG
55-
common_hal_never_reset_pin(&pin_GPIO37);
56-
common_hal_never_reset_pin(&pin_GPIO38);
57-
#endif /* DEBUG */
58-
5953
displayio_fourwire_obj_t *bus = &allocate_display_bus()->fourwire_bus;
6054
busio_spi_obj_t *spi = &bus->inline_bus;
6155
common_hal_busio_spi_construct(spi, &pin_GPIO36, &pin_GPIO35, NULL, false);

ports/espressif/boards/adafruit_funhouse/pins.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = {
4444
{ MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO33) },
4545
{ MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO34) },
4646

47-
{ MP_OBJ_NEW_QSTR(MP_QSTR_DEBUG_TX), MP_ROM_PTR(&pin_GPIO37) },
48-
{ MP_OBJ_NEW_QSTR(MP_QSTR_DEBUG_RX), MP_ROM_PTR(&pin_GPIO38) },
47+
{ MP_OBJ_NEW_QSTR(MP_QSTR_DEBUG_TX), MP_ROM_PTR(&pin_GPIO43) },
48+
{ MP_OBJ_NEW_QSTR(MP_QSTR_DEBUG_RX), MP_ROM_PTR(&pin_GPIO44) },
4949

5050
{ MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) },
5151
{ MP_ROM_QSTR(MP_QSTR_STEMMA_I2C), MP_ROM_PTR(&board_i2c_obj) },

ports/espressif/boards/adafruit_magtag_2.9_grayscale/board.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -114,12 +114,6 @@ const uint8_t refresh_sequence[] = {
114114
};
115115

116116
void board_init(void) {
117-
// Debug UART
118-
#ifdef DEBUG
119-
common_hal_never_reset_pin(&pin_GPIO43);
120-
common_hal_never_reset_pin(&pin_GPIO44);
121-
#endif /* DEBUG */
122-
123117
displayio_fourwire_obj_t *bus = &allocate_display_bus()->fourwire_bus;
124118
busio_spi_obj_t *spi = &bus->inline_bus;
125119
common_hal_busio_spi_construct(spi, &pin_GPIO36, &pin_GPIO35, NULL, false);

ports/espressif/boards/adafruit_qtpy_esp32s3_4mbflash_2mbpsram/board.c

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,5 @@
2525
*/
2626

2727
#include "supervisor/board.h"
28-
#include "mpconfigboard.h"
29-
#include "shared-bindings/microcontroller/Pin.h"
30-
31-
void board_init(void) {
32-
// Debug UART
33-
#ifdef DEBUG
34-
common_hal_never_reset_pin(&pin_GPIO43);
35-
common_hal_never_reset_pin(&pin_GPIO44);
36-
#endif
37-
}
3828

3929
// Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here.

ports/espressif/boards/adafruit_qtpy_esp32s3_nopsram/board.c

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,5 @@
2525
*/
2626

2727
#include "supervisor/board.h"
28-
#include "mpconfigboard.h"
29-
#include "shared-bindings/microcontroller/Pin.h"
30-
31-
void board_init(void) {
32-
// Debug UART
33-
#ifdef DEBUG
34-
common_hal_never_reset_pin(&pin_GPIO43);
35-
common_hal_never_reset_pin(&pin_GPIO44);
36-
#endif
37-
}
3828

3929
// Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here.

ports/espressif/boards/ai_thinker_esp32-c3s-2m/board.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,6 @@
3232
#include "soc/usb_serial_jtag_struct.h"
3333

3434
void board_init(void) {
35-
// Debug UART
36-
#ifdef DEBUG
37-
common_hal_never_reset_pin(&pin_GPIO20);
38-
common_hal_never_reset_pin(&pin_GPIO21);
39-
#endif
40-
4135
// This board has LEDs connected to the USB pins
4236
USB_SERIAL_JTAG.conf0.usb_pad_enable = 0;
4337
USB_SERIAL_JTAG.conf0.dp_pullup = 0;

ports/espressif/boards/ai_thinker_esp32-c3s/board.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,6 @@
3232
#include "soc/usb_serial_jtag_struct.h"
3333

3434
void board_init(void) {
35-
// Debug UART
36-
#ifdef DEBUG
37-
common_hal_never_reset_pin(&pin_GPIO20);
38-
common_hal_never_reset_pin(&pin_GPIO21);
39-
#endif
40-
4135
// This board has LEDs connected to the USB pins
4236
USB_SERIAL_JTAG.conf0.usb_pad_enable = 0;
4337
USB_SERIAL_JTAG.conf0.dp_pullup = 0;

ports/espressif/boards/ai_thinker_esp_12k_nodemcu/board.c

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,5 @@
2525
*/
2626

2727
#include "supervisor/board.h"
28-
#include "mpconfigboard.h"
29-
#include "shared-bindings/microcontroller/Pin.h"
30-
31-
void board_init(void) {
32-
// Debug UART
33-
#ifdef DEBUG
34-
common_hal_never_reset_pin(&pin_GPIO43);
35-
common_hal_never_reset_pin(&pin_GPIO44);
36-
#endif /* DEBUG */
37-
}
3828

3929
// Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here.

ports/espressif/boards/artisense_rd00/board.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,6 @@
2929
#include "shared-bindings/microcontroller/Pin.h"
3030

3131
void board_init(void) {
32-
// Debug UART
33-
#ifdef DEBUG
34-
common_hal_never_reset_pin(&pin_GPIO43);
35-
common_hal_never_reset_pin(&pin_GPIO44);
36-
#endif /* DEBUG */
37-
3832
// Crystal
3933
common_hal_never_reset_pin(&pin_GPIO15);
4034
common_hal_never_reset_pin(&pin_GPIO16);

0 commit comments

Comments
 (0)