diff options
-rw-r--r-- | keyboards/bajjak/bajjak.c | 6 | ||||
-rw-r--r-- | keyboards/bajjak/matrix.c | 2 | ||||
-rw-r--r-- | keyboards/dc01/left/matrix.c | 2 | ||||
-rw-r--r-- | keyboards/ergodox_ez/ergodox_ez.c | 6 | ||||
-rw-r--r-- | keyboards/ergodox_ez/matrix.c | 2 | ||||
-rw-r--r-- | keyboards/ferris/0_2/matrix.c | 8 | ||||
-rw-r--r-- | keyboards/gboards/ergotaco/ergotaco.c | 4 | ||||
-rw-r--r-- | keyboards/gboards/ergotaco/matrix.c | 4 | ||||
-rw-r--r-- | keyboards/gboards/georgi/georgi.c | 4 | ||||
-rw-r--r-- | keyboards/gboards/georgi/matrix.c | 4 | ||||
-rw-r--r-- | keyboards/gboards/gergo/gergo.c | 4 | ||||
-rw-r--r-- | keyboards/gboards/gergo/matrix.c | 4 | ||||
-rw-r--r-- | keyboards/gboards/gergoplex/gergoplex.c | 4 | ||||
-rw-r--r-- | keyboards/gboards/gergoplex/matrix.c | 2 | ||||
-rw-r--r-- | keyboards/handwired/frenchdev/frenchdev.c | 4 | ||||
-rw-r--r-- | keyboards/handwired/frenchdev/matrix.c | 6 | ||||
-rw-r--r-- | keyboards/handwired/pterodactyl/matrix.c | 10 | ||||
-rw-r--r-- | keyboards/hotdox/left.c | 4 | ||||
-rw-r--r-- | keyboards/system76/launch_1/usb_mux.c | 2 | ||||
-rw-r--r-- | platforms/chibios/drivers/i2c_master.c | 2 |
20 files changed, 42 insertions, 42 deletions
diff --git a/keyboards/bajjak/bajjak.c b/keyboards/bajjak/bajjak.c index e6102e817b..6689a6ba2c 100644 --- a/keyboards/bajjak/bajjak.c +++ b/keyboards/bajjak/bajjak.c @@ -138,14 +138,14 @@ uint8_t init_mcp23018(void) { // - input : input : 1 // - driving : output : 0 uint8_t data[] = {0b00000000, 0b00111111}; - mcp23018_status = i2c_writeReg(I2C_ADDR, IODIRA, data, 2, BAJJAK_EZ_I2C_TIMEOUT); + mcp23018_status = i2c_write_register(I2C_ADDR, IODIRA, data, 2, BAJJAK_EZ_I2C_TIMEOUT); if (!mcp23018_status) { // set pull-up // - unused : on : 1 // - input : on : 1 // - driving : off : 0 - mcp23018_status = i2c_writeReg(I2C_ADDR, IODIRA, data, 2, BAJJAK_EZ_I2C_TIMEOUT); + mcp23018_status = i2c_write_register(I2C_ADDR, IODIRA, data, 2, BAJJAK_EZ_I2C_TIMEOUT); } #ifdef LEFT_LEDS @@ -172,7 +172,7 @@ uint8_t bajjak_left_leds_update(void) { uint8_t data[2]; data[0] = 0b11111111 & ~(bajjak_left_led_1<<LEFT_LED_1_SHIFT); data[1] = 0b11111111 & ~(bajjak_left_led_2<<LEFT_LED_2_SHIFT); - mcp23018_status = i2c_writeReg(I2C_ADDR, OLATA, data, 2, BAJJAK_EZ_I2C_TIMEOUT); + mcp23018_status = i2c_write_register(I2C_ADDR, OLATA, data, 2, BAJJAK_EZ_I2C_TIMEOUT); return mcp23018_status; } diff --git a/keyboards/bajjak/matrix.c b/keyboards/bajjak/matrix.c index 424bc29e4e..b0d1ab531f 100644 --- a/keyboards/bajjak/matrix.c +++ b/keyboards/bajjak/matrix.c @@ -192,7 +192,7 @@ static void select_row(uint8_t row) { // set other rows hi-Z : 1 uint8_t data; data = 0xFF & ~(1 << row); - mcp23018_status = i2c_writeReg(I2C_ADDR, GPIOA, &data, 1, BAJJAK_EZ_I2C_TIMEOUT); + mcp23018_status = i2c_write_register(I2C_ADDR, GPIOA, &data, 1, BAJJAK_EZ_I2C_TIMEOUT); } } else { diff --git a/keyboards/dc01/left/matrix.c b/keyboards/dc01/left/matrix.c index fd21d4333b..39e5be5a1d 100644 --- a/keyboards/dc01/left/matrix.c +++ b/keyboards/dc01/left/matrix.c @@ -388,7 +388,7 @@ static void unselect_cols(void) // Complete rows from other modules over i2c i2c_status_t i2c_transaction(uint8_t address, uint32_t mask, uint8_t col_offset) { uint8_t data[MATRIX_ROWS + 1]; - i2c_status_t status = i2c_readReg(address, 0x01, data, (MATRIX_ROWS + 1), 5); + i2c_status_t status = i2c_read_register(address, 0x01, data, (MATRIX_ROWS + 1), 5); for (uint8_t i = 0; i < (MATRIX_ROWS) && status >= 0; i++) { //assemble slave matrix in main matrix matrix[i] &= mask; //mask bits to keep diff --git a/keyboards/ergodox_ez/ergodox_ez.c b/keyboards/ergodox_ez/ergodox_ez.c index 3d6272ae66..5270738f86 100644 --- a/keyboards/ergodox_ez/ergodox_ez.c +++ b/keyboards/ergodox_ez/ergodox_ez.c @@ -156,14 +156,14 @@ uint8_t init_mcp23018(void) { // - input : input : 1 // - driving : output : 0 uint8_t data[] = {0b00000000, 0b00111111}; - mcp23018_status = i2c_writeReg(I2C_ADDR, IODIRA, data, 2, ERGODOX_EZ_I2C_TIMEOUT); + mcp23018_status = i2c_write_register(I2C_ADDR, IODIRA, data, 2, ERGODOX_EZ_I2C_TIMEOUT); if (!mcp23018_status) { // set pull-up // - unused : on : 1 // - input : on : 1 // - driving : off : 0 - mcp23018_status = i2c_writeReg(I2C_ADDR, GPPUA, data, 2, ERGODOX_EZ_I2C_TIMEOUT); + mcp23018_status = i2c_write_register(I2C_ADDR, GPPUA, data, 2, ERGODOX_EZ_I2C_TIMEOUT); } #ifdef LEFT_LEDS @@ -191,7 +191,7 @@ uint8_t ergodox_left_leds_update(void) { uint8_t data[2]; data[0] = 0b11111111 & ~(ergodox_left_led_3 << LEFT_LED_3_SHIFT); data[1] = 0b11111111 & ~(ergodox_left_led_2 << LEFT_LED_2_SHIFT) & ~(ergodox_left_led_1 << LEFT_LED_1_SHIFT); - mcp23018_status = i2c_writeReg(I2C_ADDR, OLATA, data, 2, ERGODOX_EZ_I2C_TIMEOUT); + mcp23018_status = i2c_write_register(I2C_ADDR, OLATA, data, 2, ERGODOX_EZ_I2C_TIMEOUT); return mcp23018_status; } diff --git a/keyboards/ergodox_ez/matrix.c b/keyboards/ergodox_ez/matrix.c index 28bee05779..9013c0785f 100644 --- a/keyboards/ergodox_ez/matrix.c +++ b/keyboards/ergodox_ez/matrix.c @@ -193,7 +193,7 @@ static void select_row(uint8_t row) { // set other rows hi-Z : 1 uint8_t data; data = 0xFF & ~(1 << row); - mcp23018_status = i2c_writeReg(I2C_ADDR, GPIOA, &data, 1, ERGODOX_EZ_I2C_TIMEOUT); + mcp23018_status = i2c_write_register(I2C_ADDR, GPIOA, &data, 1, ERGODOX_EZ_I2C_TIMEOUT); } } else { // select on teensy diff --git a/keyboards/ferris/0_2/matrix.c b/keyboards/ferris/0_2/matrix.c index cf26385f4c..41b100b659 100644 --- a/keyboards/ferris/0_2/matrix.c +++ b/keyboards/ferris/0_2/matrix.c @@ -77,7 +77,7 @@ uint8_t init_mcp23017(void) { // This means: we will write to the pins 0-4 on GPIOB (in select_rows) uint8_t buf[] = {0b11111111, 0b11110000}; print("before transmit\n"); - mcp23017_status = i2c_writeReg(I2C_ADDR, IODIRA, buf, sizeof(buf), MCP23017_I2C_TIMEOUT) + mcp23017_status = i2c_write_register(I2C_ADDR, IODIRA, buf, sizeof(buf), MCP23017_I2C_TIMEOUT); uprintf("after transmit %i\n", mcp23017_status); if (!mcp23017_status) { // set pull-up @@ -86,7 +86,7 @@ uint8_t init_mcp23017(void) { // - driving : off : 0 // This means: we will read all the bits on GPIOA // This means: we will write to the pins 0-4 on GPIOB (in select_rows) - mcp23017_status = i2c_writeReg(I2C_ADDR, GPPUA, buf, sizeof(buf), MCP23017_I2C_TIMEOUT) + mcp23017_status = i2c_write_register(I2C_ADDR, GPPUA, buf, sizeof(buf), MCP23017_I2C_TIMEOUT); uprintf("after transmit2 %i\n", mcp23017_status); } return mcp23017_status; @@ -191,7 +191,7 @@ static matrix_row_t read_cols(uint8_t row) { // The return value is a row as represented in the generic matrix code were the rightmost bits represent the lower columns and zeroes represent non-depressed keys while ones represent depressed keys. // Since the pins connected to eact columns are sequential, and counting from zero up (col 5 -> GPIOA0, col 6 -> GPIOA1 and so on), the only transformation needed is a bitwise not to swap all zeroes and ones. uint8_t data[] = {0}; - mcp23017_status = i2c_readReg(I2C_ADDR, MCP23017_GPIOA, data, sizeof(data), MCP23017_I2C_TIMEOUT); + mcp23017_status = i2c_read_register(I2C_ADDR, MCP23017_GPIOA, data, sizeof(data), MCP23017_I2C_TIMEOUT); return ~data[0]; } } @@ -237,7 +237,7 @@ static void select_row(uint8_t row) { // 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. uint8_t buf[] = {0xFF & ~(1 << (row - MATRIX_ROWS_PER_SIDE))}; - mcp23017_status = i2c_writeReg(I2C_ADDR, MCP23017_GPIOB, buf, sizeof(buf), MCP23017_I2C_TIMEOUT); + mcp23017_status = i2c_write_register(I2C_ADDR, MCP23017_GPIOB, buf, sizeof(buf), MCP23017_I2C_TIMEOUT); } } } diff --git a/keyboards/gboards/ergotaco/ergotaco.c b/keyboards/gboards/ergotaco/ergotaco.c index 694e07f031..6795dfde4f 100644 --- a/keyboards/gboards/ergotaco/ergotaco.c +++ b/keyboards/gboards/ergotaco/ergotaco.c @@ -50,14 +50,14 @@ uint8_t init_mcp23018(void) { // - input : input : 1 // - driving : output : 0 uint8_t data[] = {0b00000000, 0b00111111}; - mcp23018_status = i2c_writeReg(I2C_ADDR, IODIRA, data, sizeof(data), ERGODOX_EZ_I2C_TIMEOUT); + mcp23018_status = i2c_write_register(I2C_ADDR, IODIRA, data, sizeof(data), ERGODOX_EZ_I2C_TIMEOUT); if (!mcp23018_status) { // set pull-up // - unused : on : 1 // - input : on : 1 // - driving : off : 0 - mcp23018_status = i2c_writeReg(I2C_ADDR, GPPUA, data, sizeof(data), ERGODOX_EZ_I2C_TIMEOUT); + mcp23018_status = i2c_write_register(I2C_ADDR, GPPUA, data, sizeof(data), ERGODOX_EZ_I2C_TIMEOUT); } // SREG=sreg_prev; diff --git a/keyboards/gboards/ergotaco/matrix.c b/keyboards/gboards/ergotaco/matrix.c index 3c49f2802e..40299f958e 100644 --- a/keyboards/gboards/ergotaco/matrix.c +++ b/keyboards/gboards/ergotaco/matrix.c @@ -234,7 +234,7 @@ static matrix_row_t read_cols(uint8_t row) return 0; } else { uint8_t data = 0; - mcp23018_status = i2c_readReg(I2C_ADDR, GPIOB, &data, 1, ERGODOX_EZ_I2C_TIMEOUT); + mcp23018_status = i2c_read_register(I2C_ADDR, GPIOB, &data, 1, ERGODOX_EZ_I2C_TIMEOUT); data = (~((uint8_t)data) >> 2) & 0x01 ; #ifdef DEBUG_MATRIX if (data != 0x00) xprintf("I2C: %d\n", data); @@ -268,7 +268,7 @@ static void select_row(uint8_t row) // Read using bitmask } else { // set active row low : 0 // set other rows hi-Z : 1 uint8_t data = ~(1<<row); - mcp23018_status = i2c_writeReg(I2C_ADDR, GPIOA, &data, 1, ERGODOX_EZ_I2C_TIMEOUT); + mcp23018_status = i2c_write_register(I2C_ADDR, GPIOA, &data, 1, ERGODOX_EZ_I2C_TIMEOUT); } } else { // Output low(DDR:1, PORT:0) to select diff --git a/keyboards/gboards/georgi/georgi.c b/keyboards/gboards/georgi/georgi.c index 745e8ab35d..44b7067b47 100644 --- a/keyboards/gboards/georgi/georgi.c +++ b/keyboards/gboards/georgi/georgi.c @@ -46,14 +46,14 @@ uint8_t init_mcp23018(void) { // - input : input : 1 // - driving : output : 0 uint8_t data[] = {0b10000000, 0b11111111}; - mcp23018_status = i2c_writeReg(I2C_ADDR, IODIRA, data, 2, ERGODOX_EZ_I2C_TIMEOUT); + mcp23018_status = i2c_write_register(I2C_ADDR, IODIRA, data, 2, ERGODOX_EZ_I2C_TIMEOUT); if (!mcp23018_status) { // set pull-up // - unused : on : 1 // - input : on : 1 // - driving : off : 0 - mcp23018_status = i2c_writeReg(I2C_ADDR, GPPUA, data, 2, ERGODOX_EZ_I2C_TIMEOUT); + mcp23018_status = i2c_write_register(I2C_ADDR, GPPUA, data, 2, ERGODOX_EZ_I2C_TIMEOUT); } // SREG=sreg_prev; diff --git a/keyboards/gboards/georgi/matrix.c b/keyboards/gboards/georgi/matrix.c index d1151ae80e..00c17a3e44 100644 --- a/keyboards/gboards/georgi/matrix.c +++ b/keyboards/gboards/georgi/matrix.c @@ -254,7 +254,7 @@ static matrix_row_t read_cols(uint8_t row) return 0; } else { uint8_t data = 0; - mcp23018_status = i2c_readReg(I2C_ADDR, GPIOB, &data, 1, ERGODOX_EZ_I2C_TIMEOUT); + mcp23018_status = i2c_read_register(I2C_ADDR, GPIOB, &data, 1, ERGODOX_EZ_I2C_TIMEOUT); #ifdef DEBUG_MATRIX if (data != 0x00) xprintf("I2C: %d\n", data); @@ -298,7 +298,7 @@ static void select_row(uint8_t row) if (mcp23018_status) { // do nothing on error } else { // set active row low : 0 // set other rows hi-Z : 1 uint8_t data = 0xFF & ~(1<<row); - mcp23018_status = i2c_writeReg(I2C_ADDR, GPIOA, &data, 1, ERGODOX_EZ_I2C_TIMEOUT); + mcp23018_status = i2c_write_register(I2C_ADDR, GPIOA, &data, 1, ERGODOX_EZ_I2C_TIMEOUT); } } else { diff --git a/keyboards/gboards/gergo/gergo.c b/keyboards/gboards/gergo/gergo.c index 41d383d408..fa73c4b42f 100644 --- a/keyboards/gboards/gergo/gergo.c +++ b/keyboards/gboards/gergo/gergo.c @@ -44,14 +44,14 @@ uint8_t init_mcp23018(void) { // - input : input : 1 // - driving : output : 0 uint8_t data[] = {0b10000000, 0b11111111}; - mcp23018_status = i2c_writeReg(I2C_ADDR, IODIRA, data, sizeof(data), I2C_TIMEOUT); + mcp23018_status = i2c_write_register(I2C_ADDR, IODIRA, data, sizeof(data), I2C_TIMEOUT); if (!mcp23018_status) { // set pull-up // - unused : on : 1 // - input : on : 1 // - driving : off : 0 - mcp23018_status = i2c_writeReg(I2C_ADDR, GPPUA, data, sizeof(data), I2C_TIMEOUT); + mcp23018_status = i2c_write_register(I2C_ADDR, GPPUA, data, sizeof(data), I2C_TIMEOUT); } // SREG=sreg_prev; diff --git a/keyboards/gboards/gergo/matrix.c b/keyboards/gboards/gergo/matrix.c index b4885361fb..1fa80a58a0 100644 --- a/keyboards/gboards/gergo/matrix.c +++ b/keyboards/gboards/gergo/matrix.c @@ -297,7 +297,7 @@ static matrix_row_t read_cols(uint8_t row) { return 0; } else { uint8_t data = 0; - mcp23018_status = i2c_readReg(I2C_ADDR, GPIOB, &data, 1, I2C_TIMEOUT); + mcp23018_status = i2c_read_register(I2C_ADDR, GPIOB, &data, 1, I2C_TIMEOUT); #ifdef DEBUG_MATRIX if (~data != 0x00) xprintf("I2C: %d\n", ~data); @@ -344,7 +344,7 @@ static void select_row(uint8_t row) if (mcp23018_status) { // do nothing on error } else { // set active row low : 0 // set other rows hi-Z : 1 uint8_t data = 0xFF & ~(1<<row); - mcp23018_status = i2c_writeReg(I2C_ADDR, GPIOA, &data, 1, I2C_TIMEOUT); + mcp23018_status = i2c_write_register(I2C_ADDR, GPIOA, &data, 1, I2C_TIMEOUT); } } else { // Output low(DDR:1, PORT:0) to select diff --git a/keyboards/gboards/gergoplex/gergoplex.c b/keyboards/gboards/gergoplex/gergoplex.c index b621201c16..b5844125bb 100644 --- a/keyboards/gboards/gergoplex/gergoplex.c +++ b/keyboards/gboards/gergoplex/gergoplex.c @@ -40,14 +40,14 @@ uint8_t init_mcp23018(void) { // - input : input : 1 // - driving : output : 0 uint8_t data[] = {0b11000001, 0b11111111}; - mcp23018_status = i2c_writeReg(I2C_ADDR, IODIRA, data, sizeof(data), I2C_TIMEOUT); + mcp23018_status = i2c_write_register(I2C_ADDR, IODIRA, data, sizeof(data), I2C_TIMEOUT); if (!mcp23018_status) { // set pull-up // - unused : on : 1 // - input : on : 1 // - driving : off : 0 - mcp23018_status = i2c_writeReg(I2C_ADDR, GPPUA, data, sizeof(data), I2C_TIMEOUT); + mcp23018_status = i2c_write_register(I2C_ADDR, GPPUA, data, sizeof(data), I2C_TIMEOUT); } return mcp23018_status; diff --git a/keyboards/gboards/gergoplex/matrix.c b/keyboards/gboards/gergoplex/matrix.c index 9437b24377..9abe9a83b3 100644 --- a/keyboards/gboards/gergoplex/matrix.c +++ b/keyboards/gboards/gergoplex/matrix.c @@ -207,7 +207,7 @@ static void select_row(uint8_t row) { } else { // set active row low : 0 // set other rows hi-Z : 1 uint8_t data; data = 0xFF & ~(1 << (row + 1)); - mcp23018_status = i2c_writeReg(I2C_ADDR, GPIOA, &data, 1, I2C_TIMEOUT); + mcp23018_status = i2c_write_register(I2C_ADDR, GPIOA, &data, 1, I2C_TIMEOUT); } } else { diff --git a/keyboards/handwired/frenchdev/frenchdev.c b/keyboards/handwired/frenchdev/frenchdev.c index 65f1ccce4b..818c395c8e 100644 --- a/keyboards/handwired/frenchdev/frenchdev.c +++ b/keyboards/handwired/frenchdev/frenchdev.c @@ -84,14 +84,14 @@ uint8_t init_mcp23018(void) { // - input : input : 1 // - driving : output : 0 uint8_t data[] = {0b00000000, 0b00111111}; - mcp23018_status = i2c_writeReg(I2C_ADDR, IODIRA, data, sizeof(data), I2C_TIMEOUT); + mcp23018_status = i2c_write_register(I2C_ADDR, IODIRA, data, sizeof(data), I2C_TIMEOUT); if (!mcp23018_status) { // set pull-up // - unused : on : 1 // - input : on : 1 // - driving : off : 0 - mcp23018_status = i2c_writeReg(I2C_ADDR, GPPUA, data, sizeof(data), I2C_TIMEOUT); + mcp23018_status = i2c_write_register(I2C_ADDR, GPPUA, data, sizeof(data), I2C_TIMEOUT); } // SREG=sreg_prev; diff --git a/keyboards/handwired/frenchdev/matrix.c b/keyboards/handwired/frenchdev/matrix.c index af7c8b5444..68ec8e0801 100644 --- a/keyboards/handwired/frenchdev/matrix.c +++ b/keyboards/handwired/frenchdev/matrix.c @@ -224,7 +224,7 @@ static matrix_row_t read_cols(uint8_t row) return 0; } else { uint8_t data = 0; - mcp23018_status = i2c_readReg(I2C_ADDR, GPIOB, &data, 1, I2C_TIMEOUT); + mcp23018_status = i2c_read_register(I2C_ADDR, GPIOB, &data, 1, I2C_TIMEOUT); return ~data; } @@ -259,7 +259,7 @@ static void unselect_rows(void) // set all rows hi-Z : 1 uint8_t data; data = 0xFF & ~(0<<8); - mcp23018_status = i2c_writeReg(I2C_ADDR, GPIOA, &data, 1, I2C_TIMEOUT); + mcp23018_status = i2c_write_register(I2C_ADDR, GPIOA, &data, 1, I2C_TIMEOUT); } @@ -283,7 +283,7 @@ static void select_row(uint8_t row) // set active row low : 0 // set other rows hi-Z : 1 uint8_t data = 0xFF & ~(1<<row) & ~(0<<8); - mcp23018_status = i2c_writeReg(I2C_ADDR, GPIOA, &data, 1, I2C_TIMEOUT); + mcp23018_status = i2c_write_register(I2C_ADDR, GPIOA, &data, 1, I2C_TIMEOUT); } } else { // select on teensy diff --git a/keyboards/handwired/pterodactyl/matrix.c b/keyboards/handwired/pterodactyl/matrix.c index 0dff65eda6..54da26a7d4 100644 --- a/keyboards/handwired/pterodactyl/matrix.c +++ b/keyboards/handwired/pterodactyl/matrix.c @@ -182,14 +182,14 @@ void init_expander(void) { uint8_t data[] = { expander_input_pin_mask, 0}; # endif #endif - expander_status = i2c_writeReg(I2C_ADDR, IODIRA, data, sizeof(data), I2C_TIMEOUT); + expander_status = i2c_write_register(I2C_ADDR, IODIRA, data, sizeof(data), I2C_TIMEOUT); if (!expander_status) { // set pull-up // - unused : off : 0 // - input : on : 1 // - driving : off : 0 - expander_status = i2c_writeReg(I2C_ADDR, GPPUA, data, sizeof(data), I2C_TIMEOUT); + expander_status = i2c_write_register(I2C_ADDR, GPPUA, data, sizeof(data), I2C_TIMEOUT); } } @@ -305,7 +305,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 data; - i2c_readReg(I2C_ADDR, EXPANDER_COL_REGISTER, &data, 1, I2C_TIMEOUT); + i2c_read_register(I2C_ADDR, EXPANDER_COL_REGISTER, &data, 1, I2C_TIMEOUT); current_matrix[current_row] |= (~data) & expander_input_pin_mask; } @@ -329,7 +329,7 @@ static void select_row(uint8_t row) { // set active row low : 0 // set other rows hi-Z : 1 uint8_t data = 0xFF & ~(1<<row); - i2c_writeReg(I2C_ADDR, EXPANDER_ROW_REGISTER, &data, 1, I2C_TIMEOUT); + i2c_write_register(I2C_ADDR, EXPANDER_ROW_REGISTER, &data, 1, I2C_TIMEOUT); } // select on teensy @@ -385,7 +385,7 @@ static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col) return false; } - i2c_writeReg(I2C_ADDR, EXPANDER_ROW_REGISTER, &column_state, 1, I2C_TIMEOUT); + i2c_write_register(I2C_ADDR, EXPANDER_ROW_REGISTER, &column_state, 1, I2C_TIMEOUT); column_state = ~column_state; } else { for (uint8_t current_row = 0; current_row < MATRIX_ROWS; current_row++) { diff --git a/keyboards/hotdox/left.c b/keyboards/hotdox/left.c index f963ecdae7..5196fb3115 100644 --- a/keyboards/hotdox/left.c +++ b/keyboards/hotdox/left.c @@ -99,7 +99,7 @@ i2c_status_t left_write(uint8_t reg, uint8_t data) i2c_status_t ret; - ret = i2c_writeReg(I2C_ADDR, reg, &data, sizeof(data), HOTDOX_I2C_TIMEOUT); + ret = i2c_write_register(I2C_ADDR, reg, &data, sizeof(data), HOTDOX_I2C_TIMEOUT); return ret; } @@ -112,7 +112,7 @@ i2c_status_t left_read(uint8_t reg, uint8_t *data) } i2c_status_t ret = 0; - ret = i2c_readReg(I2C_ADDR, reg, data, 1, HOTDOX_I2C_TIMEOUT); + ret = i2c_read_register(I2C_ADDR, reg, data, 1, HOTDOX_I2C_TIMEOUT); return ret; } diff --git a/keyboards/system76/launch_1/usb_mux.c b/keyboards/system76/launch_1/usb_mux.c index dd51b7c4b2..7ce1da07aa 100644 --- a/keyboards/system76/launch_1/usb_mux.c +++ b/keyboards/system76/launch_1/usb_mux.c @@ -79,7 +79,7 @@ i2c_status_t usb7206_read_reg(struct USB7206* self, uint32_t addr, uint8_t* data uint16_t read = 0x0006; // Buffer address 6 to skip header uint8_t data_with_buffer_length[length]; - status = i2c_readReg16((self->addr << 1), read, data_with_buffer_length, length, I2C_TIMEOUT); + status = i2c_read_register16((self->addr << 1), read, data_with_buffer_length, length, I2C_TIMEOUT); for (uint16_t i = 0; i < (length - 1) && status >= 0; i++) { data[i] = data_with_buffer_length[i+1]; diff --git a/platforms/chibios/drivers/i2c_master.c b/platforms/chibios/drivers/i2c_master.c index ad11d850dd..0d5fb1e985 100644 --- a/platforms/chibios/drivers/i2c_master.c +++ b/platforms/chibios/drivers/i2c_master.c @@ -206,5 +206,5 @@ __attribute__((weak)) i2c_status_t i2c_ping_address(uint8_t address, uint16_t ti // Best effort instead tries reading register 0 which will either succeed or timeout. // This approach may produce false negative results for I2C devices that do not respond to a register 0 read request. uint8_t data = 0; - return i2c_readReg(address, 0, &data, sizeof(data), timeout); + return i2c_read_register(address, 0, &data, sizeof(data), timeout); }
\ No newline at end of file |