added SCL and SDA

This commit is contained in:
Tirtharaj Sinha 2023-09-06 22:47:34 +05:30
parent 0c0b927843
commit 1eb8822feb
2 changed files with 11 additions and 1 deletions

View File

@ -33,3 +33,6 @@
#define DEFAULT_UART_BUS_RX (&pin_GPIO44)
#define DEFAULT_UART_BUS_TX (&pin_GPIO43)
#define DEFAULT_I2C_BUS_SCL (&pin_GPIO18)
#define DEFAULT_I2C_BUS_SDA (&pin_GPIO17)

View File

@ -38,7 +38,14 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = {
{ MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO11) },
{ MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO12) },
{ MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) },
{ MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO18) },
{ MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO17) },
{ MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) },
};
MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table);