Skip to content

Commit 740f801

Browse files
committed
[NUCLEO_F103RB] Correction on I2C gpio configuration
1 parent 139f4fb commit 740f801

File tree

1 file changed

+2
-2
lines changed
  • libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F103RB

1 file changed

+2
-2
lines changed

libraries/mbed/targets/hal/TARGET_STM/TARGET_NUCLEO_F103RB/i2c_api.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,10 @@ void i2c_init(i2c_t *obj, PinName sda, PinName scl) {
7171
}
7272

7373
// Configure I2C pins
74-
pinmap_pinout(sda, PinMap_I2C_SDA);
7574
pinmap_pinout(scl, PinMap_I2C_SCL);
76-
pin_mode(sda, OpenDrain);
7775
pin_mode(scl, OpenDrain);
76+
pinmap_pinout(sda, PinMap_I2C_SDA);
77+
pin_mode(sda, OpenDrain);
7878

7979
// Reset to clear pending flags if any
8080
i2c_reset(obj);

0 commit comments

Comments
 (0)