summaryrefslogtreecommitdiff
path: root/keyboards/handwired/dactyl
diff options
context:
space:
mode:
authorRyan <fauxpark@gmail.com>2024-01-16 13:26:40 +1100
committerGitHub <noreply@github.com>2024-01-16 02:26:40 +0000
commita522b1f15627c69f94cbc814968be5a63519b8e3 (patch)
tree2a6ea5f05d6d728230294dd4a298e0343a22be9d /keyboards/handwired/dactyl
parente1f59a6efc793522155db35155f6fbdc0504d504 (diff)
i2c: rename read/write register functions (#22905)
Diffstat (limited to 'keyboards/handwired/dactyl')
-rw-r--r--keyboards/handwired/dactyl/matrix.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/keyboards/handwired/dactyl/matrix.c b/keyboards/handwired/dactyl/matrix.c
index d87fe4cbd1..140f4236c1 100644
--- a/keyboards/handwired/dactyl/matrix.c
+++ b/keyboards/handwired/dactyl/matrix.c
@@ -216,10 +216,10 @@ void init_expander(void) {
#endif
- expander_status = i2c_writeReg(I2C_ADDR, IODIRA, direction, 2, I2C_TIMEOUT);
+ expander_status = i2c_write_register(I2C_ADDR, IODIRA, direction, 2, I2C_TIMEOUT);
if (expander_status) return;
- expander_status = i2c_writeReg(I2C_ADDR, GPPUA, pullup, 2, I2C_TIMEOUT);
+ expander_status = i2c_write_register(I2C_ADDR, GPPUA, pullup, 2, I2C_TIMEOUT);
}
uint8_t matrix_scan(void)
@@ -333,7 +333,7 @@ static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row)
// Read columns from expander, unless it's in an error state
if (! expander_status) {
uint8_t state = 0;
- expander_status = i2c_readReg(I2C_ADDR, EXPANDER_COL_REGISTER, &state, 1, I2C_TIMEOUT);
+ expander_status = i2c_read_register(I2C_ADDR, EXPANDER_COL_REGISTER, &state, 1, I2C_TIMEOUT);
if (! expander_status) {
current_matrix[current_row] |= (~state) & expander_input_pin_mask;
}
@@ -359,7 +359,7 @@ static void select_row(uint8_t row) {
// set active row low : 0
// set other rows hi-Z : 1
uint8_t port = 0xFF & ~(1<<row);
- expander_status = i2c_writeReg(I2C_ADDR, EXPANDER_ROW_REGISTER, &port, 1, I2C_TIMEOUT);
+ expander_status = i2c_write_register(I2C_ADDR, EXPANDER_ROW_REGISTER, &port, 1, I2C_TIMEOUT);
}
// select on teensy
@@ -415,7 +415,7 @@ static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col)
return false;
}
- expander_status = i2c_readReg(I2C_ADDR, EXPANDER_ROW_REGISTER, &column_state, 1, I2C_TIMEOUT);
+ expander_status = i2c_read_register(I2C_ADDR, EXPANDER_ROW_REGISTER, &column_state, 1, I2C_TIMEOUT);
column_state = ~column_state;
} else {
@@ -460,7 +460,7 @@ static void select_col(uint8_t col)
// set active col low : 0
// set other cols hi-Z : 1
uint8_t port = 0xFF & ~(1<<col);
- expander_status = i2c_writeReg(I2C_ADDR, EXPANDER_COL_REGISTER, &port, 1, I2C_TIMEOUT);
+ expander_status = i2c_write_register(I2C_ADDR, EXPANDER_COL_REGISTER, &port, 1, I2C_TIMEOUT);
}
} else {
// select on teensy