summaryrefslogtreecommitdiff
path: root/drivers/chibios/i2c_master.h
diff options
context:
space:
mode:
authorJoel Challis <git@zvecr.com>2020-07-25 22:50:56 +0100
committerDrashna Jael're <drashna@live.com>2020-08-08 22:52:26 -0700
commitcd0523e7d4b6d6252762cf834d7e7ded88f20da5 (patch)
tree90d5e6b0f49335f142cf3002234bd80bf4d7a051 /drivers/chibios/i2c_master.h
parent215fdc39fdf465f51844dbda25c9b1f3b41486b7 (diff)
Enable OLED support for Teensy 3.2/LC (#7591)
* I2C_TIMEOUT is not defined on arm teensy * Work round teensy having different ChibiOS config options * Stash OLED conf files * update comment * update comment * Remove stm32 alias to allow teensy alt mode format code according to conventions [skip ci]
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 ec36b31eb7..1b08d33ee6 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