summaryrefslogtreecommitdiff
path: root/stmhal/i2c.c
diff options
context:
space:
mode:
Diffstat (limited to 'stmhal/i2c.c')
-rw-r--r--stmhal/i2c.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/stmhal/i2c.c b/stmhal/i2c.c
index 1909f8160..07269bce5 100644
--- a/stmhal/i2c.c
+++ b/stmhal/i2c.c
@@ -238,8 +238,8 @@ void i2c_init(I2C_HandleTypeDef *i2c) {
}
// init the GPIO lines
- mp_hal_gpio_set_af(scl_pin, &GPIO_InitStructure, AF_FN_I2C, i2c_unit);
- mp_hal_gpio_set_af(sda_pin, &GPIO_InitStructure, AF_FN_I2C, i2c_unit);
+ mp_hal_pin_set_af(scl_pin, &GPIO_InitStructure, AF_FN_I2C, i2c_unit);
+ mp_hal_pin_set_af(sda_pin, &GPIO_InitStructure, AF_FN_I2C, i2c_unit);
// init the I2C device
if (HAL_I2C_Init(i2c) != HAL_OK) {