summaryrefslogtreecommitdiff
path: root/keyboards/ergodox_stm32
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/ergodox_stm32')
-rw-r--r--keyboards/ergodox_stm32/ergodox_stm32.c8
-rw-r--r--keyboards/ergodox_stm32/matrix.c4
2 files changed, 6 insertions, 6 deletions
diff --git a/keyboards/ergodox_stm32/ergodox_stm32.c b/keyboards/ergodox_stm32/ergodox_stm32.c
index 2a919506dc..99d51866f7 100644
--- a/keyboards/ergodox_stm32/ergodox_stm32.c
+++ b/keyboards/ergodox_stm32/ergodox_stm32.c
@@ -59,16 +59,16 @@ uint8_t init_mcp23017(void) {
uint8_t data[2];
data[0] = 0x0;
data[1] = 0b00111111;
- mcp23017_status = i2c_writeReg(I2C_ADDR, I2C_IODIRA, data, 2, 50000);
+ mcp23017_status = i2c_write_register(I2C_ADDR, I2C_IODIRA, data, 2, 50000);
if (mcp23017_status) goto out;
data[0] = 0xFFU;
- mcp23017_status = i2c_writeReg(I2C_ADDR, I2C_GPIOA, data, 1, 5000);
+ mcp23017_status = i2c_write_register(I2C_ADDR, I2C_GPIOA, data, 1, 5000);
if (mcp23017_status) goto out;
- mcp23017_status = i2c_writeReg(I2C_ADDR, I2C_GPPUB, data+1, 1, 2);
+ mcp23017_status = i2c_write_register(I2C_ADDR, I2C_GPPUB, data+1, 1, 2);
if (mcp23017_status) goto out;
out:
return mcp23017_status;
- // i2c_readReg(I2C_ADDR, );
+ // i2c_read_register(I2C_ADDR, );
}
diff --git a/keyboards/ergodox_stm32/matrix.c b/keyboards/ergodox_stm32/matrix.c
index 3eb35cd7bb..6acd2dda22 100644
--- a/keyboards/ergodox_stm32/matrix.c
+++ b/keyboards/ergodox_stm32/matrix.c
@@ -134,7 +134,7 @@ static matrix_row_t read_cols(uint8_t row) {
uint8_t data = 0xFF;
if (!mcp23017_status) {
uint8_t regAddr = I2C_GPIOB;
- mcp23017_status = i2c_readReg(I2C_ADDR, regAddr, &data, 1, 10);
+ mcp23017_status = i2c_read_register(I2C_ADDR, regAddr, &data, 1, 10);
}
if (mcp23017_status) {
return 0;
@@ -174,7 +174,7 @@ static void select_row(uint8_t row) {
if (row < MATRIX_ROWS_PER_SIDE) {
if (!mcp23017_status) {
uint8_t data = (0xFF & ~(1 << row));
- mcp23017_status = i2c_writeReg(I2C_ADDR, I2C_GPIOA, &data, 1, 10);
+ mcp23017_status = i2c_write_register(I2C_ADDR, I2C_GPIOA, &data, 1, 10);
}
} else {
GPIOB->BRR = 0x1 << (row+1);