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

@ -79,7 +79,7 @@ i2c_status_t usb7206_read_reg(struct USB7206* self, uint32_t addr, uint8_t* data
uint16_t read = 0x0006; // Buffer address 6 to skip header
uint8_t data_with_buffer_length[length];
status = i2c_readReg16((self->addr << 1), read, data_with_buffer_length, length, I2C_TIMEOUT);
status = i2c_read_register16((self->addr << 1), read, data_with_buffer_length, length, I2C_TIMEOUT);
for (uint16_t i = 0; i < (length - 1) && status >= 0; i++) {
data[i] = data_with_buffer_length[i+1];