Skip to content

Commit 65b295c

Browse files
authored
Merge pull request #3865 from djix123/stm32f411ce_i2c
Add default I2C pins for STM32F411CE
2 parents f226f4a + aaa3c61 commit 65b295c

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

ports/stm/boards/stm32f411ce_blackpill/mpconfigboard.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@
4242
// #define SPI_FLASH_SCK_PIN (&pin_PA05)
4343
// #define SPI_FLASH_CS_PIN (&pin_PA04)
4444

45+
#define DEFAULT_I2C_BUS_SCL (&pin_PB06)
46+
#define DEFAULT_I2C_BUS_SDA (&pin_PB07)
47+
4548
#define CIRCUITPY_AUTORELOAD_DELAY_MS (500)
4649

4750
#define BOARD_FLASH_SIZE (FLASH_SIZE - 0x2000 - 0xC000)

ports/stm/boards/stm32f411ce_blackpill/pins.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,10 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = {
3535
{ MP_ROM_QSTR(MP_QSTR_C14), MP_ROM_PTR(&pin_PC14) },
3636
{ MP_ROM_QSTR(MP_QSTR_C13), MP_ROM_PTR(&pin_PC13) },
3737
{ MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_PC13) },
38+
39+
{ MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_PB07) },
40+
{ MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_PB06) },
41+
42+
{ MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) },
3843
};
3944
MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table);

0 commit comments

Comments
 (0)