From 36a27806d8a25996f740197f9b9386f8845995ee Mon Sep 17 00:00:00 2001 From: Rick Sorensen Date: Sun, 6 Mar 2022 19:20:37 -0600 Subject: [PATCH] pins.c: Modify and correct LED pin mappings and names for Xiao Added YELLOW_LED=LED=D13, BLUE1_LED=RX_LED, BLUE2_LED=TX_LED --- ports/atmel-samd/boards/seeeduino_xiao/pins.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/ports/atmel-samd/boards/seeeduino_xiao/pins.c b/ports/atmel-samd/boards/seeeduino_xiao/pins.c index 9dd92c8c40..c8cf968c00 100644 --- a/ports/atmel-samd/boards/seeeduino_xiao/pins.c +++ b/ports/atmel-samd/boards/seeeduino_xiao/pins.c @@ -29,7 +29,7 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_D8), MP_ROM_PTR(&pin_PA07) }, { MP_ROM_QSTR(MP_QSTR_D9), MP_ROM_PTR(&pin_PA05) }, { MP_ROM_QSTR(MP_QSTR_D10), MP_ROM_PTR(&pin_PA06) }, - { MP_ROM_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_PA17) }, + { MP_ROM_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_PA17) }, // yellow_led // UART pins { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_PB08) }, @@ -45,8 +45,16 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_PA08) }, // LED pins - { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_PA17) }, // status - { MP_ROM_QSTR(MP_QSTR_BLUE_LED), MP_ROM_PTR(&pin_PA17) }, + // duplicate names for test LED ... see D13 + { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_PA17) }, // + { MP_ROM_QSTR(MP_QSTR_YELLOW_LED), MP_ROM_PTR(&pin_PA17) }, + // 2 blue LEDs ... uart rx/tx indicator is default use + { MP_ROM_QSTR(MP_QSTR_RX_LED), MP_ROM_PTR(&pin_PA18) }, + { MP_ROM_QSTR(MP_QSTR_TX_LED), MP_ROM_PTR(&pin_PA19) }, + // create duplicate mappings with BLUE in name + { MP_ROM_QSTR(MP_QSTR_BLUE1_LED), MP_ROM_PTR(&pin_PA18) }, + { MP_ROM_QSTR(MP_QSTR_BLUE2_LED), MP_ROM_PTR(&pin_PA19) }, + // Comm objects { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) },