Skip to content

Commit

Permalink
Fix i2c_readReg16 (#14730)
Browse files Browse the repository at this point in the history
  • Loading branch information
zvecr authored Oct 7, 2021
1 parent b2a186c commit 951331c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion platforms/chibios/drivers/i2c_master.c
Original file line number Diff line number Diff line change
Expand Up @@ -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), &register_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);
}

Expand Down

0 comments on commit 951331c

Please sign in to comment.