aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/chibios/i2c_master.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/chibios/i2c_master.h')
-rw-r--r--drivers/chibios/i2c_master.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/chibios/i2c_master.h b/drivers/chibios/i2c_master.h
index 3d3891289..b3e234e16 100644
--- a/drivers/chibios/i2c_master.h
+++ b/drivers/chibios/i2c_master.h
@@ -81,7 +81,14 @@
# define I2C_DRIVER I2CD1
#endif
-#ifndef USE_GPIOV1
+#ifdef USE_GPIOV1
+# ifndef I2C1_SCL_PAL_MODE
+# define I2C1_SCL_PAL_MODE PAL_MODE_STM32_ALTERNATE_OPENDRAIN
+# endif
+# ifndef I2C1_SDA_PAL_MODE
+# define I2C1_SDA_PAL_MODE PAL_MODE_STM32_ALTERNATE_OPENDRAIN
+# endif
+#else
// The default PAL alternate modes are used to signal that the pins are used for I2C
# ifndef I2C1_SCL_PAL_MODE
# define I2C1_SCL_PAL_MODE 4