summaryrefslogtreecommitdiff
path: root/keyboards/yiancardesigns
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/yiancardesigns
parente1f59a6efc793522155db35155f6fbdc0504d504 (diff)
i2c: rename read/write register functions (#22905)
Diffstat (limited to 'keyboards/yiancardesigns')
-rw-r--r--keyboards/yiancardesigns/barleycorn/matrix.c6
-rw-r--r--keyboards/yiancardesigns/gingham/gingham.c4
-rw-r--r--keyboards/yiancardesigns/gingham/matrix.c10
-rw-r--r--keyboards/yiancardesigns/seigaiha/matrix.c6
-rw-r--r--keyboards/yiancardesigns/seigaiha/seigaiha.c2
5 files changed, 14 insertions, 14 deletions
diff --git a/keyboards/yiancardesigns/barleycorn/matrix.c b/keyboards/yiancardesigns/barleycorn/matrix.c
index 99366d6098..9ef2926566 100644
--- a/keyboards/yiancardesigns/barleycorn/matrix.c
+++ b/keyboards/yiancardesigns/barleycorn/matrix.c
@@ -42,9 +42,9 @@ static void init_pins(void) {
unselect_rows();
// Set I/O
uint8_t send_data[2] = { 0xFF, 0x03};
- i2c_writeReg((PORT_EXPANDER_ADDRESS << 1), 0x00, &send_data[0], 2, 20);
+ i2c_write_register((PORT_EXPANDER_ADDRESS << 1), 0x00, &send_data[0], 2, 20);
// Set Pull-up
- i2c_writeReg((PORT_EXPANDER_ADDRESS << 1), 0x0C, &send_data[0], 2, 20);
+ i2c_write_register((PORT_EXPANDER_ADDRESS << 1), 0x0C, &send_data[0], 2, 20);
for (uint8_t x = 0; x < MATRIX_COLS; x++) {
if ( x < 8 ) {
@@ -75,7 +75,7 @@ static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row)
matrix_io_delay();
uint8_t port_expander_col_buffer[2];
- i2c_readReg((PORT_EXPANDER_ADDRESS << 1), 0x12, &port_expander_col_buffer[0], 2, 20);
+ i2c_read_register((PORT_EXPANDER_ADDRESS << 1), 0x12, &port_expander_col_buffer[0], 2, 20);
// For each col...
for(uint8_t col_index = 0; col_index < MATRIX_COLS; col_index++) {
diff --git a/keyboards/yiancardesigns/gingham/gingham.c b/keyboards/yiancardesigns/gingham/gingham.c
index 496ae35705..f34d4d7cfd 100644
--- a/keyboards/yiancardesigns/gingham/gingham.c
+++ b/keyboards/yiancardesigns/gingham/gingham.c
@@ -22,7 +22,7 @@ void matrix_init_kb(void) {
// Due to the way the port expander is setup both LEDs are already outputs. This is set n matrix.copy
//Turn the red LED on as power indicator.
send_data = 0x10;
- i2c_writeReg((PORT_EXPANDER_ADDRESS << 1), 0x09, &send_data, 1, 20);
+ i2c_write_register((PORT_EXPANDER_ADDRESS << 1), 0x09, &send_data, 1, 20);
matrix_init_user();
}
@@ -31,7 +31,7 @@ bool led_update_kb(led_t led_state) {
bool res = led_update_user(led_state);
if(res) {
send_data = led_state.caps_lock ? 0x18 : 0x10;
- i2c_writeReg((PORT_EXPANDER_ADDRESS << 1), 0x09, &send_data, 1, 20);
+ i2c_write_register((PORT_EXPANDER_ADDRESS << 1), 0x09, &send_data, 1, 20);
}
return res;
}
diff --git a/keyboards/yiancardesigns/gingham/matrix.c b/keyboards/yiancardesigns/gingham/matrix.c
index 47c8830565..d17518b494 100644
--- a/keyboards/yiancardesigns/gingham/matrix.c
+++ b/keyboards/yiancardesigns/gingham/matrix.c
@@ -42,9 +42,9 @@ static void init_pins(void) {
unselect_rows();
// Set I/O
uint8_t send_data = 0x07;
- i2c_writeReg((PORT_EXPANDER_ADDRESS << 1), 0x00, &send_data, 1, 20);
+ i2c_write_register((PORT_EXPANDER_ADDRESS << 1), 0x00, &send_data, 1, 20);
// Set Pull-up
- i2c_writeReg((PORT_EXPANDER_ADDRESS << 1), 0x06, &send_data, 1, 20);
+ i2c_write_register((PORT_EXPANDER_ADDRESS << 1), 0x06, &send_data, 1, 20);
for (uint8_t x = 0; x < MATRIX_COLS; x++) {
if ( (x > 0) && (x < 12) ) {
@@ -80,15 +80,15 @@ static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row)
// Select the col pin to read (active low)
switch (col_index) {
case 0 :
- i2c_readReg((PORT_EXPANDER_ADDRESS << 1), 0x09, &pin_state, 1, 20);
+ i2c_read_register((PORT_EXPANDER_ADDRESS << 1), 0x09, &pin_state, 1, 20);
pin_state = pin_state & 0x01;
break;
case 12 :
- i2c_readReg((PORT_EXPANDER_ADDRESS << 1), 0x09, &pin_state, 1, 20);
+ i2c_read_register((PORT_EXPANDER_ADDRESS << 1), 0x09, &pin_state, 1, 20);
pin_state = pin_state & (1 << 2);
break;
case 13 :
- i2c_readReg((PORT_EXPANDER_ADDRESS << 1), 0x09, &pin_state, 1, 20);
+ i2c_read_register((PORT_EXPANDER_ADDRESS << 1), 0x09, &pin_state, 1, 20);
pin_state = pin_state & (1 << 1);
break;
default :
diff --git a/keyboards/yiancardesigns/seigaiha/matrix.c b/keyboards/yiancardesigns/seigaiha/matrix.c
index 212b8015f0..55ee239db4 100644
--- a/keyboards/yiancardesigns/seigaiha/matrix.c
+++ b/keyboards/yiancardesigns/seigaiha/matrix.c
@@ -42,9 +42,9 @@ static void init_pins(void) {
unselect_rows();
// Set I/O
uint8_t send_data = 0x1F;
- i2c_writeReg((PORT_EXPANDER_ADDRESS << 1), 0x00, &send_data, 1, 20);
+ i2c_write_register((PORT_EXPANDER_ADDRESS << 1), 0x00, &send_data, 1, 20);
// Set Pull-up
- i2c_writeReg((PORT_EXPANDER_ADDRESS << 1), 0x06, &send_data, 1, 20);
+ i2c_write_register((PORT_EXPANDER_ADDRESS << 1), 0x06, &send_data, 1, 20);
for (uint8_t x = 0; x < MATRIX_COLS; x++) {
if ( x < 10 ) {
@@ -75,7 +75,7 @@ static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row)
matrix_io_delay();
uint8_t port_expander_col_buffer;
- i2c_readReg((PORT_EXPANDER_ADDRESS << 1), 0x09, &port_expander_col_buffer, 1, 20);
+ i2c_read_register((PORT_EXPANDER_ADDRESS << 1), 0x09, &port_expander_col_buffer, 1, 20);
// For each col...
for(uint8_t col_index = 0; col_index < MATRIX_COLS; col_index++) {
diff --git a/keyboards/yiancardesigns/seigaiha/seigaiha.c b/keyboards/yiancardesigns/seigaiha/seigaiha.c
index 7a39637b91..03d420f053 100644
--- a/keyboards/yiancardesigns/seigaiha/seigaiha.c
+++ b/keyboards/yiancardesigns/seigaiha/seigaiha.c
@@ -26,7 +26,7 @@ void led_update_ports(led_t led_state) {
} else {
send_data &= ~(1 << 5);
}
- i2c_writeReg((PORT_EXPANDER_ADDRESS << 1), 0x0A, &send_data, 1, 20);
+ i2c_write_register((PORT_EXPANDER_ADDRESS << 1), 0x0A, &send_data, 1, 20);
}
__attribute__((weak)) layer_state_t layer_state_set_user(layer_state_t state) {