Skip to content

Commit 8390c47

Browse files
committed
add board.STEMMA_I2C on QT PY RP2040
1 parent 0fb9709 commit 8390c47

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

ports/raspberrypi/boards/adafruit_qtpy_rp2040/mpconfigboard.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
#define DEFAULT_I2C_BUS_SCL (&pin_GPIO25)
88
#define DEFAULT_I2C_BUS_SDA (&pin_GPIO24)
99

10+
#define SECOND_I2C_BUS_SCL (&pin_GPIO23)
11+
#define SECOND_I2C_BUS_SDA (&pin_GPIO22)
12+
1013
#define DEFAULT_SPI_BUS_SCK (&pin_GPIO6)
1114
#define DEFAULT_SPI_BUS_MOSI (&pin_GPIO3)
1215
#define DEFAULT_SPI_BUS_MISO (&pin_GPIO4)

ports/raspberrypi/boards/adafruit_qtpy_rp2040/pins.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = {
4545
{ MP_ROM_QSTR(MP_QSTR_SCL1), MP_ROM_PTR(&pin_GPIO23) },
4646

4747
{ MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) },
48+
{ MP_ROM_QSTR(MP_QSTR_STEMMA_I2C), MP_ROM_PTR(&board_second_i2c_obj) },
4849
{ MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) },
4950
{ MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) },
5051
};

0 commit comments

Comments
 (0)