summaryrefslogtreecommitdiffstats
path: root/drivers/arm/i2c_master.c
diff options
context:
space:
mode:
authoryulei <yuleiz@gmail.com>2019-12-13 09:20:04 +0800
committerDrashna Jaelre <drashna@live.com>2019-12-12 17:20:04 -0800
commita037cedfdc0bdb5737586ab4b4ef7086e53029b7 (patch)
treef80062c92eb354ea4b4281af9d95a06b23ad37f5 /drivers/arm/i2c_master.c
parentdf78593b1ba800223c049f3f61df6ad4bf4abe7c (diff)
fixed I2C driver support for stm32f4 (#7526)
* correct i2c driver for stm32f4 * update pin mode definitions * update macro definition
Diffstat (limited to 'drivers/arm/i2c_master.c')
-rw-r--r--drivers/arm/i2c_master.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/arm/i2c_master.c b/drivers/arm/i2c_master.c
index 2a43ba2393..b9eff0ad2e 100644
--- a/drivers/arm/i2c_master.c
+++ b/drivers/arm/i2c_master.c
@@ -62,7 +62,7 @@ __attribute__((weak)) void i2c_init(void) {
palSetPadMode(I2C1_SDA_BANK, I2C1_SDA, PAL_MODE_INPUT);
chThdSleepMilliseconds(10);
-#ifdef USE_I2CV1
+#if defined(USE_GPIOV1)
palSetPadMode(I2C1_SCL_BANK, I2C1_SCL, PAL_MODE_STM32_ALTERNATE_OPENDRAIN);
palSetPadMode(I2C1_SDA_BANK, I2C1_SDA, PAL_MODE_STM32_ALTERNATE_OPENDRAIN);
#else