Simplify I2C and SPI code (#237)

This commit is contained in:
Ken Van Hoeylandt
2025-02-26 17:47:19 +01:00
committed by GitHub
parent b85ef7a2e7
commit 83a82be901
16 changed files with 46 additions and 133 deletions
@@ -239,7 +239,7 @@ void I2cScannerApp::onScanTimer() {
for (uint8_t address = 0; address < 128; ++address) {
if (hal::i2c::masterHasDeviceAtAddress(port, address, 10 / portTICK_PERIOD_MS)) {
TT_LOG_I(TAG, "Found device at address %d", address);
TT_LOG_I(TAG, "Found device at address 0x%02X", address);
if (!shouldStopScanTimer()) {
addAddressToList(address);
} else {
@@ -40,7 +40,7 @@ static void show(lv_obj_t* parent, const hal::i2c::Configuration& configuration)
// On-off switch
if (configuration.canReinit) {
if (configuration.isMutable) {
auto* state_switch = lv_switch_create(card);
lv_obj_align(state_switch, LV_ALIGN_TOP_RIGHT, 0, 0);