From f707fa107ade84102536f3feb4300b0fa8a6f9e0 Mon Sep 17 00:00:00 2001 From: ZodiusInfuser Date: Thu, 5 Aug 2021 15:00:47 +0100 Subject: [PATCH] Tweaks to Interstate75 pinout --- .../pimoroni_interstate75/mpconfigboard.h | 26 +++++++++++++++++++ .../boards/pimoroni_interstate75/pins.c | 12 +++++---- 2 files changed, 33 insertions(+), 5 deletions(-) diff --git a/ports/raspberrypi/boards/pimoroni_interstate75/mpconfigboard.h b/ports/raspberrypi/boards/pimoroni_interstate75/mpconfigboard.h index 968f69ad7e..1ce8e1e7e1 100644 --- a/ports/raspberrypi/boards/pimoroni_interstate75/mpconfigboard.h +++ b/ports/raspberrypi/boards/pimoroni_interstate75/mpconfigboard.h @@ -1,13 +1,39 @@ #define MICROPY_HW_BOARD_NAME "Pimoroni Interstate 75" #define MICROPY_HW_MCU_NAME "rp2040" +#define MICROPY_HW_R0 (&pin_GPIO0) +#define MICROPY_HW_G0 (&pin_GPIO1) +#define MICROPY_HW_B0 (&pin_GPIO2) +#define MICROPY_HW_R1 (&pin_GPIO3) +#define MICROPY_HW_G1 (&pin_GPIO4) +#define MICROPY_HW_B1 (&pin_GPIO5) + +#define MICROPY_HW_ROW_A (&pin_GPIO6) +#define MICROPY_HW_ROW_B (&pin_GPIO7) +#define MICROPY_HW_ROW_C (&pin_GPIO8) +#define MICROPY_HW_ROW_D (&pin_GPIO9) +#define MICROPY_HW_ROW_E (&pin_GPIO10) + +#define MICROPY_HW_CLK (&pin_GPIO11) +#define MICROPY_HW_LAT (&pin_GPIO12) +#define MICROPY_HW_OE (&pin_GPIO13) + +#define MICROPY_HW_SW_A (&pin_GPIO14) + #define CIRCUITPY_RGB_STATUS_INVERTED_PWM #define CIRCUITPY_RGB_STATUS_R (&pin_GPIO16) #define CIRCUITPY_RGB_STATUS_G (&pin_GPIO17) #define CIRCUITPY_RGB_STATUS_B (&pin_GPIO18) +#define MICROPY_HW_I2C_INT (&pin_GPIO19) + +#define DEFAULT_I2C_BUS_SCL (&pin_GPIO21) +#define DEFAULT_I2C_BUS_SDA (&pin_GPIO20) + #define MICROPY_HW_USER_SW (&pin_GPIO23) +#define MICROPY_HW_CURRENT_SENSE (&pin_GPIO29) + // These pins are unconnected #define IGNORE_PIN_GPIO15 1 #define IGNORE_PIN_GPIO22 1 diff --git a/ports/raspberrypi/boards/pimoroni_interstate75/pins.c b/ports/raspberrypi/boards/pimoroni_interstate75/pins.c index db20e6ea52..6e3e1a57b7 100644 --- a/ports/raspberrypi/boards/pimoroni_interstate75/pins.c +++ b/ports/raspberrypi/boards/pimoroni_interstate75/pins.c @@ -14,19 +14,22 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_ROW_D), MP_ROM_PTR(&pin_GPIO9) }, { MP_ROM_QSTR(MP_QSTR_ROW_E), MP_ROM_PTR(&pin_GPIO10) }, - { MP_ROM_QSTR(MP_QSTR_LED_CLK), MP_ROM_PTR(&pin_GPIO11) }, - { MP_ROM_QSTR(MP_QSTR_LED_STB), MP_ROM_PTR(&pin_GPIO12) }, - { MP_ROM_QSTR(MP_QSTR_LED_OE), MP_ROM_PTR(&pin_GPIO13) }, + { MP_ROM_QSTR(MP_QSTR_CLK), MP_ROM_PTR(&pin_GPIO11) }, + { MP_ROM_QSTR(MP_QSTR_LAT), MP_ROM_PTR(&pin_GPIO12) }, + { MP_ROM_QSTR(MP_QSTR_OE), MP_ROM_PTR(&pin_GPIO13) }, { MP_ROM_QSTR(MP_QSTR_SW_A), MP_ROM_PTR(&pin_GPIO14) }, { MP_ROM_QSTR(MP_QSTR_LED_R), MP_ROM_PTR(&pin_GPIO16) }, { MP_ROM_QSTR(MP_QSTR_LED_G), MP_ROM_PTR(&pin_GPIO17) }, { MP_ROM_QSTR(MP_QSTR_LED_B), MP_ROM_PTR(&pin_GPIO18) }, - + { MP_ROM_QSTR(MP_QSTR_INT), MP_ROM_PTR(&pin_GPIO19) }, + { MP_ROM_QSTR(MP_QSTR_GP19), MP_ROM_PTR(&pin_GPIO19) }, { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO20) }, + { MP_ROM_QSTR(MP_QSTR_GP20), MP_ROM_PTR(&pin_GPIO20) }, { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO21) }, + { MP_ROM_QSTR(MP_QSTR_GP21), MP_ROM_PTR(&pin_GPIO21) }, { MP_ROM_QSTR(MP_QSTR_USER_SW), MP_ROM_PTR(&pin_GPIO23) }, @@ -42,7 +45,6 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_GP28), MP_ROM_PTR(&pin_GPIO28) }, { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_GPIO28) }, - { MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_GPIO29) }, { MP_ROM_QSTR(MP_QSTR_CURRENT_SENSE), MP_ROM_PTR(&pin_GPIO29) }, { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) },