I2C driver cleanup (#21273)

* remove i2c_start and i2c_stop from i2c drivers

* remove static i2c_address variable from chibios i2c driver
This commit is contained in:
David Hoelscher 2024-01-17 07:05:38 -06:00 committed by GitHub
parent 2b0965944d
commit e9bd7d7ad3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
49 changed files with 280 additions and 603 deletions

View file

@ -114,7 +114,7 @@ uint8_t matrix_scan(void)
#ifdef RIGHT_HALF
uint8_t data = 0x7F;
// Receive the columns from right half
i2c_receive(I2C_ADDR_WRITE, &data, 1, MCP23018_I2C_TIMEOUT);
i2c_receive(I2C_ADDR, &data, 1, MCP23018_I2C_TIMEOUT);
cols |= ((~(data) & 0x7F) << 7);
#endif
@ -162,7 +162,7 @@ static void matrix_select_row(uint8_t row)
//Set the remote row on port A
txdata[0] = GPIOA;
txdata[1] = 0xFF & ~(1<<row);
mcp23018_status = i2c_transmit(I2C_ADDR_WRITE, (uint8_t *)txdata, 2, MCP23018_I2C_TIMEOUT);
mcp23018_status = i2c_transmit(I2C_ADDR, (uint8_t *)txdata, 2, MCP23018_I2C_TIMEOUT);
#endif
// select other half