Changes to Pin Mappings

This commit is contained in:
Patrick 2022-04-12 20:05:41 -07:00
parent b37236f83f
commit a3070f6c2a
5 changed files with 28 additions and 13 deletions

View File

@ -31,8 +31,8 @@
void board_init(void) {
// Debug UART
#ifdef DEBUG
common_hal_never_reset_pin(&pin_GPIO43);
common_hal_never_reset_pin(&pin_GPIO44);
common_hal_never_reset_pin(&pin_GPIO20);
common_hal_never_reset_pin(&pin_GPIO21);
#endif /* DEBUG */
}

View File

@ -42,3 +42,7 @@
#define DEFAULT_UART_BUS_RX (&pin_GPIO20)
#define DEFAULT_UART_BUS_TX (&pin_GPIO21)
// // Serial over UART
#define CIRCUITPY_DEBUG_UART_RX DEFAULT_UART_BUS_RX
#define CIRCUITPY_DEBUG_UART_TX DEFAULT_UART_BUS_TX

View File

@ -1,7 +1,7 @@
USB_VID = 0x303A
USB_PID = 0x80F5
USB_PRODUCT = "C3 Mini"
USB_MANUFACTURER = "Lolin"
USB_PRODUCT = "Lolin C3 Mini"
USB_MANUFACTURER = "Wemos"
IDF_TARGET = esp32c3

View File

@ -7,25 +7,32 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = {
// From Wemos C3 Mini Schematic
// https://www.wemos.cc/en/latest/_static/files/sch_c3_mini_v1.0.0.pdf
// Starting on Left side going counterclockwise
// And MP Config
// MP Config
// https://github.com/micropython/micropython/blob/master/ports/esp32/boards/LOLIN_C3_MINI
// C3 Data Sheet
// https://www.espressif.com/sites/default/files/documentation/esp32-c3_datasheet_en.pdf
// 1: LAN_IN
// 2: VDD3P3
// 3: VDD3P3
{ MP_ROM_QSTR(MP_QSTR_BUTTON), MP_ROM_PTR(&pin_GPIO0) },// Reset Button
{ MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_GPIO0) }, // 4: GPIO0/32K_P/A0
{ MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_GPIO1) }, // 5: GPIO1/32K_N/A1
{ MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_GPIO2) }, // 6: GPIO2/A2/FSPIQ
{ MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_GPIO2) }, // mpboardconfig.h
// 7: CHIP_EN
{ MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_GPIO3) }, // 8: GPIO3/A3
{ MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_GPIO3) }, // mpboardconfig.h
{ MP_ROM_QSTR(MP_QSTR_A4), MP_ROM_PTR(&pin_GPIO4) }, // 9: GPIO4/A4/FSPIHD/MTMS
{ MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_GPIO4) }, // mpboardconfig.h
{ MP_ROM_QSTR(MP_QSTR_IO5), MP_ROM_PTR(&pin_GPIO5) }, // 10: GPIO5/A2_0/FSPIWP/MTDI
{ MP_ROM_QSTR(MP_QSTR_A5), MP_ROM_PTR(&pin_GPIO5) }, // Board screen has A5, Schematic has A2_0 (huh?)
// 11: VDD3P3_RTC
// 11: VDD3P3_RTC: Input power supply for RTC
{ MP_ROM_QSTR(MP_QSTR_IO6), MP_ROM_PTR(&pin_GPIO6) }, // 12: GPIO6/FSPICLK/MTCK
{ MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_GPIO7) }, // mpboardconfig.h
{ MP_ROM_QSTR(MP_QSTR_IO7), MP_ROM_PTR(&pin_GPIO7) }, // 13: GPIO7/FSPID/MTD0
@ -34,24 +41,29 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = {
{ MP_ROM_QSTR(MP_QSTR_IO9), MP_ROM_PTR(&pin_GPIO9) }, // 15: GPIO9
{ MP_ROM_QSTR(MP_QSTR_IO10), MP_ROM_PTR(&pin_GPIO10) }, // 16: GPIO10/FSPICS0
{ MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO10) }, // mpboardconfig.h
// 17: VDD3P3_CPJ
// 17: VDD3P3_CPU: Input power supply for CPU IO
// 18: VDD_SPI
// Ports of embedded flash for ESP32-C3FH4
// 19: SPIHD
// 20: SPIWP
// 21: SPICSO
// 22: SPICLK
// 23: SPID
// 24: SPIQ
// Used for USB 25: GPIO18/D-
// Used for USB 26: GPIO19/D+
// 25: GPIO18/D-: Used for USB
// 26: GPIO19/D+: Used for USB
{ MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO20) }, // 27: GPIO20/U0RXD
{ MP_ROM_QSTR(MP_QSTR_IO20), MP_ROM_PTR(&pin_GPIO20) },
{ MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO21) }, // 28: GPIO21/U0TXD
{ MP_ROM_QSTR(MP_QSTR_IO21), MP_ROM_PTR(&pin_GPIO21) },
// 29: XTAL_N
// 30: XTAL_P
// 31: VDDA
// 32: VDDA
{ MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) },// board singleton implicit from schematic/shield standard
};
MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table);

View File

@ -1,6 +1,5 @@
# CONFIG_ESP32S2_SPIRAM_SUPPORT is not set
#
# LWIP
#
CONFIG_LWIP_LOCAL_HOSTNAME="LC3Mini"
CONFIG_LWIP_LOCAL_HOSTNAME="lolin-c3-mini"
# end of LWIP