Skip to content

Commit 473b7bb

Browse files
committed
Match API V2 #35
1 parent 2466a85 commit 473b7bb

File tree

3 files changed

+14
-42
lines changed

3 files changed

+14
-42
lines changed

src/components/i2c/controller.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -557,7 +557,7 @@ bool I2cController::Handle_I2cBusScan(pb_istream_t *stream) {
557557
// TODO: Print out what was scanned? or do this at the end
558558
}
559559

560-
// Case 2: Scan the alternative I2C bus
560+
// Case 2: Optionally scan the alternative I2C bus
561561
if (_i2c_model->GetI2cBusScanMsg()->scan_alt_bus) {
562562
// Is the alt bus initialized?
563563
if (_i2c_bus_alt == nullptr) {
@@ -587,13 +587,14 @@ bool I2cController::Handle_I2cBusScan(pb_istream_t *stream) {
587587
// TODO: Print out what was scanned? or do this at the end
588588
}
589589

590-
// Case 3: Do we have a MUX on the default bus?
590+
// Case 3: Optionally scan MUXes attached to I2C buses
591591
if (_i2c_model->GetI2cBusScanMsg()->i2c_mux_descriptors_count > 0) {
592592
// Iterate through the MUX descriptors, scanning each MUX
593+
for (int i = 0; i < _i2c_model->GetI2cBusScanMsg()->i2c_mux_descriptors_count; i++) {
594+
// []
595+
}
593596
}
594597

595-
// TODO Scan I2C Port 1 for Muxes
596-
// TODO Scan I2C Port 2 for Muxes
597598

598599
// TODO: Take scan_success into account here
599600
return true;

src/protos/i2c.pb.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@
99
PB_BIND(wippersnapper_i2c_I2cDeviceDescriptor, wippersnapper_i2c_I2cDeviceDescriptor, AUTO)
1010

1111

12-
PB_BIND(wippersnapper_i2c_I2cMuxDescriptor, wippersnapper_i2c_I2cMuxDescriptor, AUTO)
13-
14-
1512
PB_BIND(wippersnapper_i2c_I2cBusDescriptor, wippersnapper_i2c_I2cBusDescriptor, AUTO)
1613

1714

0 commit comments

Comments
 (0)