summaryrefslogtreecommitdiff
path: root/keyboards/matrix
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/matrix')
-rw-r--r--keyboards/matrix/m20add/config.h4
-rw-r--r--keyboards/matrix/m20add/m20add.c8
-rw-r--r--keyboards/matrix/noah/config.h4
3 files changed, 8 insertions, 8 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
diff --git a/keyboards/matrix/noah/config.h b/keyboards/matrix/noah/config.h
index f41cad94ce..e5fa4959c8 100644
--- a/keyboards/matrix/noah/config.h
+++ b/keyboards/matrix/noah/config.h
@@ -26,8 +26,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
#define PAL_MODE_STM32_ALTERNATE_OPENDRAIN (PAL_MODE_ALTERNATE(4) | PAL_STM32_OTYPE_OPENDRAIN)