1
0
Fork 0
forked from forks/qmk_firmware

Fix i2c received value in georgi and bajjak (#24113)

This commit is contained in:
Yue Wu 2024-07-13 20:43:52 +08:00 committed by GitHub
parent 7b5d7907df
commit 6dfd7ed46f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 1 deletions

View file

@ -146,7 +146,7 @@ static matrix_row_t read_cols(uint8_t row) {
// reading GPIOB (column port) since in mcp23018's sequential mode // reading GPIOB (column port) since in mcp23018's sequential mode
// it is addressed directly after writing to GPIOA in select_row() // it is addressed directly after writing to GPIOA in select_row()
mcp23018_status = i2c_receive(I2C_ADDR, &data, 1, BAJJAK_EZ_I2C_TIMEOUT); mcp23018_status = i2c_receive(I2C_ADDR, &data, 1, BAJJAK_EZ_I2C_TIMEOUT);
return data; return ~data;
} }
} else { } else {
/* read from teensy /* read from teensy

View file

@ -255,6 +255,7 @@ static matrix_row_t read_cols(uint8_t row)
} else { } else {
uint8_t data = 0; uint8_t data = 0;
mcp23018_status = i2c_read_register(I2C_ADDR, GPIOB, &data, 1, ERGODOX_EZ_I2C_TIMEOUT); mcp23018_status = i2c_read_register(I2C_ADDR, GPIOB, &data, 1, ERGODOX_EZ_I2C_TIMEOUT);
data = ~data;
#ifdef DEBUG_MATRIX #ifdef DEBUG_MATRIX
if (data != 0x00) xprintf("I2C: %d\n", data); if (data != 0x00) xprintf("I2C: %d\n", data);