Skip to content

Commit 4874bde

Browse files
committed
stmhal/boards: For OLIMEX_E407, enable UART1 and fix I2C1 mapping.
UART1 can be used even if the switch is enabled. The schematics for this board make I2C1 available on PB8/PB9, even though it can also be mapped to PB6/PB7. See adafruit#2396 and adafruit#2427.
1 parent 8dd5960 commit 4874bde

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

stmhal/boards/OLIMEX_E407/mpconfigboard.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,8 @@
2323
#define MICROPY_HW_CLK_PLLQ (7)
2424

2525
// UART config
26-
#if MICROPY_HW_HAS_SWITCH == 0
2726
#define MICROPY_HW_UART1_PORT (GPIOB)
2827
#define MICROPY_HW_UART1_PINS (GPIO_PIN_6 | GPIO_PIN_7)
29-
#endif
3028

3129
#define MICROPY_HW_UART2_PORT (GPIOA)
3230
#define MICROPY_HW_UART2_PINS (GPIO_PIN_2 | GPIO_PIN_3)
@@ -50,8 +48,8 @@
5048
#define MICROPY_HW_UART6_PINS (GPIO_PIN_6 | GPIO_PIN_7)
5149

5250
// I2C busses
53-
#define MICROPY_HW_I2C1_SCL (pin_B6)
54-
#define MICROPY_HW_I2C1_SDA (pin_B7)
51+
#define MICROPY_HW_I2C1_SCL (pin_B8)
52+
#define MICROPY_HW_I2C1_SDA (pin_B9)
5553
#define MICROPY_HW_I2C2_SCL (pin_B10)
5654
#define MICROPY_HW_I2C2_SDA (pin_B11)
5755

0 commit comments

Comments
 (0)