diff options
author | Joel Challis <git@zvecr.com> | 2021-09-12 15:41:33 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-12 15:41:33 +0100 |
commit | 0fa217a5b7cdd035105387fd31c506fda4cfb945 (patch) | |
tree | 1ba0df8f6cb8462fcc3517f7a090ad7c72123038 /keyboards/matrix/m20add | |
parent | bb841087bbd47b0be6dffafa8a4f7a361867f71d (diff) |
Align ChibiOS I2C defs with other drivers (#14399)
* Align ChibiOS I2C defs with other drivers
* Update keyboards/xelus/valor_frl_tkl/config.h
Co-authored-by: Ryan <fauxpark@gmail.com>
Co-authored-by: Ryan <fauxpark@gmail.com>
Diffstat (limited to 'keyboards/matrix/m20add')
-rw-r--r-- | keyboards/matrix/m20add/config.h | 4 | ||||
-rw-r--r-- | keyboards/matrix/m20add/m20add.c | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/keyboards/matrix/m20add/config.h b/keyboards/matrix/m20add/config.h index 3df5d78d55..5d615dbad6 100644 --- a/keyboards/matrix/m20add/config.h +++ b/keyboards/matrix/m20add/config.h @@ -82,8 +82,8 @@ #define DEBOUNCE 5 // i2c setting -#define I2C1_SCL 8 -#define I2C1_SDA 9 +#define I2C1_SCL_PIN B8 +#define I2C1_SDA_PIN B9 #define I2C1_CLOCK_SPEED 400000 #define I2C1_DUTY_CYCLE FAST_DUTY_CYCLE_2 diff --git a/keyboards/matrix/m20add/m20add.c b/keyboards/matrix/m20add/m20add.c index b38dad27cd..21f4f9b1ba 100644 --- a/keyboards/matrix/m20add/m20add.c +++ b/keyboards/matrix/m20add/m20add.c @@ -64,12 +64,12 @@ void i2c_init(void) } // Try releasing special pins for a short time - palSetPadMode(I2C1_SCL_BANK, I2C1_SCL, PAL_MODE_INPUT); - palSetPadMode(I2C1_SDA_BANK, I2C1_SDA, PAL_MODE_INPUT); + palSetLineMode(I2C1_SCL_PIN, PAL_MODE_INPUT); + palSetLineMode(I2C1_SDA_PIN, PAL_MODE_INPUT); chThdSleepMilliseconds(10); - palSetPadMode(I2C1_SCL_BANK, I2C1_SCL, PAL_MODE_ALTERNATE(I2C1_SCL_PAL_MODE) | PAL_STM32_OTYPE_OPENDRAIN); - palSetPadMode(I2C1_SDA_BANK, I2C1_SDA, PAL_MODE_ALTERNATE(I2C1_SDA_PAL_MODE) | PAL_STM32_OTYPE_OPENDRAIN); + palSetLineMode(I2C1_SCL_PIN, PAL_MODE_ALTERNATE(I2C1_SCL_PAL_MODE) | PAL_STM32_OTYPE_OPENDRAIN); + palSetLineMode(I2C1_SDA_PIN, PAL_MODE_ALTERNATE(I2C1_SDA_PAL_MODE) | PAL_STM32_OTYPE_OPENDRAIN); } #define REBOOT_MAGIC 0x41544B42 |