diff options
author | Ryan <[email protected]> | 2024-03-27 23:41:53 +1100 |
---|---|---|
committer | GitHub <[email protected]> | 2024-03-27 12:41:53 +0000 |
commit | 01be746fc41d7c0860df379849b5fa79ed6c5587 (patch) | |
tree | 54d28e566092a9718e1d17e4b717303704ab951e /keyboards/gboards/georgi | |
parent | 148d66fc9f46b9186ec16e8b33f63bf267b7bb82 (diff) | |
download | qmk_firmware-01be746fc41d7c0860df379849b5fa79ed6c5587.tar.gz qmk_firmware-01be746fc41d7c0860df379849b5fa79ed6c5587.zip |
Update I2C API usage in keyboard code (#23360)
Diffstat (limited to 'keyboards/gboards/georgi')
-rw-r--r-- | keyboards/gboards/georgi/georgi.c | 4 | ||||
-rw-r--r-- | keyboards/gboards/georgi/matrix.c | 4 |
2 files changed, 4 insertions, 4 deletions
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 { |