Add mutexes for I2C access in multiple drivers and update cursor handling in char_lcd and wires. Adjust task stack sizes for better resource management.
This commit is contained in:
@@ -729,7 +729,9 @@ uint16_t BQ27441::i2cWriteBytes(uint8_t subAddress, uint8_t * src, uint8_t count
|
||||
w_buff[i+1] = src[i];
|
||||
}
|
||||
|
||||
xSemaphoreTake(main_i2c_mutex, portMAX_DELAY);
|
||||
esp_err_t ret = i2c_master_write_to_device(BQ72441_I2C_NUM, _deviceAddress, src, count+1, timeout);
|
||||
xSemaphoreGive(main_i2c_mutex);
|
||||
|
||||
return ret == ESP_OK;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user