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) {
891891*/
892892/* **********************************************************************/
893893TwoWire *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 ();
898898}
899899
900900/* **********************************************************************/
Original file line number Diff line number Diff line change @@ -109,7 +109,8 @@ class I2cController {
109109 size_t GetScanDeviceCount ();
110110 bool
111111 IsDriverInitialized (wippersnapper_i2c_I2cDeviceDescriptor &device_descriptor);
112- TwoWire *GetI2cBus (bool is_alt_bus=false );
112+ TwoWire *GetI2cBus (bool is_alt_bus = false );
113+
113114private:
114115 I2cModel *_i2c_model; // /< Pointer to an I2C model object
115116 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() {
148148 if (!_rtc_ds3231->begin (WsV2._i2c_controller ->GetI2cBus ())) {
149149 WS_DEBUG_PRINTLN (" [SD] Error: Failed to initialize DS3231 RTC on WIRE" );
150150 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" );
152152 delete _rtc_ds3231;
153153 return false ;
154154 }
You can’t perform that action at this time.
0 commit comments