mirror of
https://github.com/Keychron/qmk_firmware.git
synced 2024-12-24 02:05:01 +06:00
Fix i2c_readReg16 (#14730)
This commit is contained in:
parent
b2a186cf92
commit
951331cd8d
@ -137,7 +137,7 @@ i2c_status_t i2c_readReg16(uint8_t devaddr, uint16_t regaddr, uint8_t* data, uin
|
||||
i2c_address = devaddr;
|
||||
i2cStart(&I2C_DRIVER, &i2cconfig);
|
||||
uint8_t register_packet[2] = {regaddr >> 8, regaddr & 0xFF};
|
||||
msg_t status = i2cMasterTransmitTimeout(&I2C_DRIVER, (i2c_address >> 1), ®ister_packet, 2, data, length, TIME_MS2I(timeout));
|
||||
msg_t status = i2cMasterTransmitTimeout(&I2C_DRIVER, (i2c_address >> 1), register_packet, 2, data, length, TIME_MS2I(timeout));
|
||||
return chibios_to_qmk(&status);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user