File tree Expand file tree Collapse file tree 3 files changed +7
-6
lines changed Expand file tree Collapse file tree 3 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -891,10 +891,10 @@ bool I2cController::ScanI2cBus(bool default_bus = true) {
891
891
*/
892
892
/* **********************************************************************/
893
893
TwoWire *I2cController::GetI2cBus (bool is_alt_bus) {
894
- if (is_alt_bus) {
895
- return _i2c_bus_alt->GetBus ();
896
- }
897
- return _i2c_bus_default->GetBus ();
894
+ if (is_alt_bus) {
895
+ return _i2c_bus_alt->GetBus ();
896
+ }
897
+ return _i2c_bus_default->GetBus ();
898
898
}
899
899
900
900
/* **********************************************************************/
Original file line number Diff line number Diff line change @@ -109,7 +109,8 @@ class I2cController {
109
109
size_t GetScanDeviceCount ();
110
110
bool
111
111
IsDriverInitialized (wippersnapper_i2c_I2cDeviceDescriptor &device_descriptor);
112
- TwoWire *GetI2cBus (bool is_alt_bus=false );
112
+ TwoWire *GetI2cBus (bool is_alt_bus = false );
113
+
113
114
private:
114
115
I2cModel *_i2c_model; // /< Pointer to an I2C model object
115
116
I2cHardware *_i2c_bus_default; // /< Pointer to the default I2C bus
Original file line number Diff line number Diff line change @@ -148,7 +148,7 @@ bool ws_sdcard::InitDS3231() {
148
148
if (!_rtc_ds3231->begin (WsV2._i2c_controller ->GetI2cBus ())) {
149
149
WS_DEBUG_PRINTLN (" [SD] Error: Failed to initialize DS3231 RTC on WIRE" );
150
150
if (!_rtc_ds3231->begin (WsV2._i2c_controller ->GetI2cBus (true ))) {
151
- WS_DEBUG_PRINTLN (" [SD] Error: Failed to initialize DS3231 RTC on WIRE1" );
151
+ WS_DEBUG_PRINTLN (" [SD] Error: Failed to initialize DS3231 RTC on WIRE1" );
152
152
delete _rtc_ds3231;
153
153
return false ;
154
154
}
You can’t perform that action at this time.
0 commit comments