From 19b6c5c802f4e9af39d84003661b91524f61721c Mon Sep 17 00:00:00 2001 From: ladyada Date: Wed, 16 Jan 2019 01:49:12 -0500 Subject: [PATCH] more pins! --- ports/atmel-samd/boards/pyportal/pins.c | 30 ++++++++++++++++++++----- 1 file changed, 25 insertions(+), 5 deletions(-) diff --git a/ports/atmel-samd/boards/pyportal/pins.c b/ports/atmel-samd/boards/pyportal/pins.c index 7d4bc2a46a..ddb8fa08a2 100644 --- a/ports/atmel-samd/boards/pyportal/pins.c +++ b/ports/atmel-samd/boards/pyportal/pins.c @@ -8,8 +8,20 @@ // microcontroller.pin. STATIC const mp_map_elem_t board_global_dict_table[] = { { MP_OBJ_NEW_QSTR(MP_QSTR_AUDIO_OUT), (mp_obj_t)&pin_PA02 }, + { MP_OBJ_NEW_QSTR(MP_QSTR_A0), (mp_obj_t)&pin_PA02 }, // analog out/in + // STEMMA connectors + { MP_OBJ_NEW_QSTR(MP_QSTR_A1), (mp_obj_t)&pin_PB02 }, // SDA + { MP_OBJ_NEW_QSTR(MP_QSTR_A2), (mp_obj_t)&pin_PB03 }, // SCL + { MP_OBJ_NEW_QSTR(MP_QSTR_A3), (mp_obj_t)&pin_PB00 }, // D3 + { MP_OBJ_NEW_QSTR(MP_QSTR_D3), (mp_obj_t)&pin_PB00 }, // D3 + { MP_OBJ_NEW_QSTR(MP_QSTR_A4), (mp_obj_t)&pin_PB01 }, // D4 + { MP_OBJ_NEW_QSTR(MP_QSTR_D4), (mp_obj_t)&pin_PB01 }, // D4 + + // Indicator LED { MP_OBJ_NEW_QSTR(MP_QSTR_D13), (mp_obj_t)&pin_PA27 }, + { MP_OBJ_NEW_QSTR(MP_QSTR_L), (mp_obj_t)&pin_PA27 }, + { MP_OBJ_NEW_QSTR(MP_QSTR_NEOPIXEL), (mp_obj_t)&pin_PB22 }, // LCD pins { MP_OBJ_NEW_QSTR(MP_QSTR_TFT_RESET), (mp_obj_t)&pin_PA00 }, @@ -40,18 +52,26 @@ STATIC const mp_map_elem_t board_global_dict_table[] = { { MP_OBJ_NEW_QSTR(MP_QSTR_ESP_GPIO0), (mp_obj_t)&pin_PB15 }, { MP_OBJ_NEW_QSTR(MP_QSTR_ESP_RESET), (mp_obj_t)&pin_PB16 }, + // UART + { MP_OBJ_NEW_QSTR(MP_QSTR_TX), (mp_obj_t)&pin_PB12 }, + { MP_OBJ_NEW_QSTR(MP_QSTR_RX), (mp_obj_t)&pin_PB13 }, + + // SPI + { MP_OBJ_NEW_QSTR(MP_QSTR_MOSI), (mp_obj_t)&pin_PA12 }, + { MP_OBJ_NEW_QSTR(MP_QSTR_SCK), (mp_obj_t)&pin_PA13 }, + { MP_OBJ_NEW_QSTR(MP_QSTR_MISO), (mp_obj_t)&pin_PA14 }, + + // I2C + { MP_OBJ_NEW_QSTR(MP_QSTR_SDA), (mp_obj_t)&pin_PB02 }, + { MP_OBJ_NEW_QSTR(MP_QSTR_SCL), (mp_obj_t)&pin_PB03 }, // SD Card - { MP_OBJ_NEW_QSTR(MP_QSTR_SD_MOSI), (mp_obj_t)&pin_PA12 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_SD_SCK), (mp_obj_t)&pin_PA13 }, { MP_OBJ_NEW_QSTR(MP_QSTR_SD_CS), (mp_obj_t)&pin_PB30 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_SD_MISO), (mp_obj_t)&pin_PA14 }, { MP_OBJ_NEW_QSTR(MP_QSTR_SD_CARD_DETECT), (mp_obj_t)&pin_PA01 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_NEOPIXEL), (mp_obj_t)&pin_PB22 }, - { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) }, + { MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) }, { MP_ROM_QSTR(MP_QSTR_DISPLAY), MP_ROM_PTR(&board_display_obj)} };