diff options
Diffstat (limited to 'drivers/chibios/i2c_master.h')
| -rw-r--r-- | drivers/chibios/i2c_master.h | 9 |
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 @@ | |||
| 81 | # define I2C_DRIVER I2CD1 | 81 | # define I2C_DRIVER I2CD1 |
| 82 | #endif | 82 | #endif |
| 83 | 83 | ||
| 84 | #ifndef USE_GPIOV1 | 84 | #ifdef USE_GPIOV1 |
| 85 | # ifndef I2C1_SCL_PAL_MODE | ||
| 86 | # define I2C1_SCL_PAL_MODE PAL_MODE_STM32_ALTERNATE_OPENDRAIN | ||
| 87 | # endif | ||
| 88 | # ifndef I2C1_SDA_PAL_MODE | ||
| 89 | # define I2C1_SDA_PAL_MODE PAL_MODE_STM32_ALTERNATE_OPENDRAIN | ||
| 90 | # endif | ||
| 91 | #else | ||
| 85 | // The default PAL alternate modes are used to signal that the pins are used for I2C | 92 | // The default PAL alternate modes are used to signal that the pins are used for I2C |
| 86 | # ifndef I2C1_SCL_PAL_MODE | 93 | # ifndef I2C1_SCL_PAL_MODE |
| 87 | # define I2C1_SCL_PAL_MODE 4 | 94 | # define I2C1_SCL_PAL_MODE 4 |
