Skip to content

Commit 9fc3e4d

Browse files
committed
still debugging mux inclusion
1 parent fbfcc08 commit 9fc3e4d

File tree

2 files changed

+5
-19
lines changed

2 files changed

+5
-19
lines changed

src/Wippersnapper_demo.ino.cpp

Lines changed: 0 additions & 19 deletions
This file was deleted.

src/components/i2c/controller.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -572,15 +572,19 @@ bool I2cController::InitMux(const char *name, uint32_t address,
572572
bool is_alt_bus) {
573573
if (is_alt_bus) {
574574
if (!_i2c_bus_alt->HasMux()) {
575+
WS_DEBUG_PRINTLN("[i2c] Initializing MUX driver on alt bus...");
575576
if (!_i2c_bus_alt->AddMuxToBus(address, name)) {
576577
return false;
577578
}
579+
WS_DEBUG_PRINTLN("OK!");
578580
}
579581
} else {
580582
if (!_i2c_bus_default->HasMux()) {
583+
WS_DEBUG_PRINTLN("[i2c] Initializing MUX driver on default bus...");
581584
if (!_i2c_bus_default->AddMuxToBus(address, name)) {
582585
return false;
583586
}
587+
WS_DEBUG_PRINTLN("OK!");
584588
}
585589
}
586590
// TODO [Online]: Publish back out to IO here!
@@ -911,6 +915,7 @@ void I2cController::ConfigureMuxChannel(uint32_t mux_channel, bool is_alt_bus) {
911915
_i2c_bus_alt->SelectMuxChannel(mux_channel);
912916
return;
913917
}
918+
WS_DEBUG_PRINTLN("[i2c] ConfigureMuxChannel() normal bus");
914919
_i2c_bus_default->ClearMuxChannel(); // sanity-check
915920
_i2c_bus_default->SelectMuxChannel(mux_channel);
916921
}

0 commit comments

Comments
 (0)