rev 2.0 updates
This commit is contained in:
@@ -711,9 +711,9 @@ bool BQ27441::writeExtendedData(uint8_t classID, uint8_t offset, uint8_t * data,
|
||||
int16_t BQ27441::i2cReadBytes(uint8_t subAddress, uint8_t * dest, uint8_t count)
|
||||
{
|
||||
int16_t timeout = BQ72441_I2C_TIMEOUT;
|
||||
xSemaphoreTake(i2c0_mutex, portMAX_DELAY);
|
||||
xSemaphoreTake(main_i2c_mutex, portMAX_DELAY);
|
||||
i2c_master_write_read_device(BQ72441_I2C_NUM, _deviceAddress, &subAddress, 1, dest, count, timeout);
|
||||
xSemaphoreGive(i2c0_mutex);
|
||||
xSemaphoreGive(main_i2c_mutex);
|
||||
return timeout;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user