1
0
Fork 0

Update I2C API usage in keyboard code (#23360)

This commit is contained in:
Ryan 2024-03-27 23:41:53 +11:00 committed by GitHub
parent 148d66fc9f
commit 01be746fc4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
20 changed files with 42 additions and 42 deletions

View file

@ -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