i2c: rename read/write register functions (#22905)
This commit is contained in:
parent
e1f59a6efc
commit
a522b1f156
44 changed files with 184 additions and 170 deletions
|
@ -134,7 +134,7 @@ static matrix_row_t read_cols(uint8_t row) {
|
|||
uint8_t data = 0xFF;
|
||||
if (!mcp23017_status) {
|
||||
uint8_t regAddr = I2C_GPIOB;
|
||||
mcp23017_status = i2c_readReg(I2C_ADDR, regAddr, &data, 1, 10);
|
||||
mcp23017_status = i2c_read_register(I2C_ADDR, regAddr, &data, 1, 10);
|
||||
}
|
||||
if (mcp23017_status) {
|
||||
return 0;
|
||||
|
@ -174,7 +174,7 @@ static void select_row(uint8_t row) {
|
|||
if (row < MATRIX_ROWS_PER_SIDE) {
|
||||
if (!mcp23017_status) {
|
||||
uint8_t data = (0xFF & ~(1 << row));
|
||||
mcp23017_status = i2c_writeReg(I2C_ADDR, I2C_GPIOA, &data, 1, 10);
|
||||
mcp23017_status = i2c_write_register(I2C_ADDR, I2C_GPIOA, &data, 1, 10);
|
||||
}
|
||||
} else {
|
||||
GPIOB->BRR = 0x1 << (row+1);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue