summaryrefslogtreecommitdiff
path: root/keyboards/3w6
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/3w6
parente1f59a6efc793522155db35155f6fbdc0504d504 (diff)
i2c: rename read/write register functions (#22905)
Diffstat (limited to 'keyboards/3w6')
-rw-r--r--keyboards/3w6/rev1/matrix.c6
-rw-r--r--keyboards/3w6/rev2/keymaps/default_pimoroni/pimoroni_trackball.c2
-rw-r--r--keyboards/3w6/rev2/matrix.c6
3 files changed, 7 insertions, 7 deletions
diff --git a/keyboards/3w6/rev1/matrix.c b/keyboards/3w6/rev1/matrix.c
index 8bb6c77aaa..aa3e43fbe0 100644
--- a/keyboards/3w6/rev1/matrix.c
+++ b/keyboards/3w6/rev1/matrix.c
@@ -70,7 +70,7 @@ uint8_t init_tca9555(void) {
// This means: we will write on pins 0 to 2 on port 1. read rest
0b11111000,
};
- tca9555_status = i2c_writeReg(I2C_ADDR, IODIRA, conf, 2, I2C_TIMEOUT);
+ tca9555_status = i2c_write_register(I2C_ADDR, IODIRA, conf, 2, I2C_TIMEOUT);
return tca9555_status;
}
@@ -189,7 +189,7 @@ static matrix_row_t read_cols(uint8_t row) {
} else {
uint8_t data = 0;
uint8_t ports[2] = {0};
- tca9555_status = i2c_readReg(I2C_ADDR, IREGP0, ports, 2, I2C_TIMEOUT);
+ tca9555_status = i2c_read_register(I2C_ADDR, IREGP0, ports, 2, I2C_TIMEOUT);
if (tca9555_status) { // if there was an error
// do nothing
return 0;
@@ -252,7 +252,7 @@ static void select_row(uint8_t row) {
}
uint8_t ports[2] = {port0, port1};
- tca9555_status = i2c_writeReg(I2C_ADDR, OREGP0, ports, 2, I2C_TIMEOUT);
+ tca9555_status = i2c_write_register(I2C_ADDR, OREGP0, ports, 2, I2C_TIMEOUT);
// Select the desired row by writing a byte for the entire GPIOB bus where only the bit representing the row we want to select is a zero (write instruction) and every other bit is a one.
// Note that the row - MATRIX_ROWS_PER_SIDE reflects the fact that being on the right hand, the columns are numbered from MATRIX_ROWS_PER_SIDE to MATRIX_ROWS, but the pins we want to write to are indexed from zero up on the GPIOB bus.
}
diff --git a/keyboards/3w6/rev2/keymaps/default_pimoroni/pimoroni_trackball.c b/keyboards/3w6/rev2/keymaps/default_pimoroni/pimoroni_trackball.c
index a6661cdc07..35a85b5476 100644
--- a/keyboards/3w6/rev2/keymaps/default_pimoroni/pimoroni_trackball.c
+++ b/keyboards/3w6/rev2/keymaps/default_pimoroni/pimoroni_trackball.c
@@ -120,7 +120,7 @@ bool pointing_device_task(void) {
static uint16_t debounce_timer;
uint8_t state[5] = {};
if (timer_elapsed(i2c_timeout_timer) > I2C_WAITCHECK) {
- if (i2c_readReg(TRACKBALL_WRITE, 0x04, state, 5, I2C_TIMEOUT) == I2C_STATUS_SUCCESS) {
+ if (i2c_read_register(TRACKBALL_WRITE, 0x04, state, 5, I2C_TIMEOUT) == I2C_STATUS_SUCCESS) {
if (!state[4] && !debounce) {
if (scrolling) {
#ifdef PIMORONI_TRACKBALL_INVERT_X
diff --git a/keyboards/3w6/rev2/matrix.c b/keyboards/3w6/rev2/matrix.c
index 49cb09a9f8..da7a5344e5 100644
--- a/keyboards/3w6/rev2/matrix.c
+++ b/keyboards/3w6/rev2/matrix.c
@@ -70,7 +70,7 @@ uint8_t init_tca9555(void) {
// This means: we will write on pins 0 to 3 on port 1. read rest
0b11110000,
};
- tca9555_status = i2c_writeReg(I2C_ADDR, IODIRA, conf, 2, I2C_TIMEOUT);
+ tca9555_status = i2c_write_register(I2C_ADDR, IODIRA, conf, 2, I2C_TIMEOUT);
return tca9555_status;
}
@@ -189,7 +189,7 @@ static matrix_row_t read_cols(uint8_t row) {
} else {
uint8_t data = 0;
uint8_t port0 = 0;
- tca9555_status = i2c_readReg(I2C_ADDR, IREGP0, &port0, 1, I2C_TIMEOUT);
+ tca9555_status = i2c_read_register(I2C_ADDR, IREGP0, &port0, 1, I2C_TIMEOUT);
if (tca9555_status) { // if there was an error
// do nothing
return 0;
@@ -250,7 +250,7 @@ static void select_row(uint8_t row) {
default: break;
}
- tca9555_status = i2c_writeReg(I2C_ADDR, OREGP1, &port1, 1, I2C_TIMEOUT);
+ tca9555_status = i2c_write_register(I2C_ADDR, OREGP1, &port1, 1, I2C_TIMEOUT);
// Select the desired row by writing a byte for the entire GPIOB bus where only the bit representing the row we want to select is a zero (write instruction) and every other bit is a one.
// Note that the row - MATRIX_ROWS_PER_SIDE reflects the fact that being on the right hand, the columns are numbered from MATRIX_ROWS_PER_SIDE to MATRIX_ROWS, but the pins we want to write to are indexed from zero up on the GPIOB bus.
}