Merge develop into main (#161)
- Fix CoreS3 boot failure (I2C now returns bool instead of err_result_t) - Flashing scripts now erase before flashing (to ensure it's a clean install) - M5Stack Core2 and CoreS3: Experimental SPI speed increase
This commit is contained in:
committed by
GitHub
parent
ceec04b34c
commit
431fa84ffb
@@ -175,7 +175,7 @@ void CoreS3Display::setGammaCurve(uint8_t index) {
|
||||
void CoreS3Display::setBacklightDuty(uint8_t backlightDuty) {
|
||||
const uint8_t voltage = 20 + ((8 * backlightDuty) / 255); // [0b00000, 0b11100] - under 20 is too dark
|
||||
// TODO: Refactor to use Axp2102 class with https://github.com/m5stack/M5Unified/blob/b8cfec7fed046242da7f7b8024a4e92004a51ff7/src/utility/AXP2101_Class.cpp#L42
|
||||
if (tt::hal::i2c::masterWrite(I2C_NUM_0, AXP2101_ADDRESS, 0x99, &voltage, 1, 1000) != ESP_OK) {
|
||||
if (!tt::hal::i2c::masterWrite(I2C_NUM_0, AXP2101_ADDRESS, 0x99, &voltage, 1, 1000)) {
|
||||
TT_LOG_E(TAG, "Failed to set display backlight voltage");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user