ESP32C6: USB not in board.json `features` but GPIO pins are disabled anyway
Description
IMHO the default value for MICROPY_HW_ESP_USB_SERIAL_JTAG should be "is the USB feature turned on in the board.json file".
An even better default might be "micropython checks the EFuse flags and enables the pins iff these flags are set".
The relevant efuse bits are DIS_PAD_JTAG and DIS_USB_JTAG, see tech manual 9.2.4 "JTAG Signal Source Control" page 378/379.
Code Size
No response
Implementation
I would like to sponsor development of this feature
Code of Conduct
Yes, I agree
esp32/machine_pin: fix ESP32C3 build with IDFv4.4.1
The build for the ESP32C3 was broken with IDFv4.4.1 due to some constants no longer being defined.
../machine_pin.c: In function 'machine_pin_obj_init_helper':
../machine_pin.c:293:29: error: 'USB_DEVICE_CONF0_REG' undeclared
../machine_pin.c:293:51: error: 'USB_DEVICE_USB_PAD_ENABLE' undeclared
Constants in question were used to make the pins normally used by JTAG available as general GPIO pins.
espressif/esp-idf@b25fb1 removed said constants, and also showcases which constants can now be used instead.
EDIT: Previously typed 4.4, but of course that should be 4.4.1. :)