We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent dc1df78 commit 7bae1feCopy full SHA for 7bae1fe
src/DriverPins.h
@@ -182,7 +182,7 @@ struct PinsI2C : public I2CConfig {
182
this->sda = sda;
183
this->port = 0;
184
this->frequency = frequency;
185
- this->p_wire = &wire;
+ this->p_wire = wire;
186
this->set_active = active;
187
this->address = address;
188
}
src/Platforms/API_I2C_Arduino.cpp
@@ -9,8 +9,11 @@
9
10
11
error_t i2c_bus_create(struct I2CConfig *config) {
12
+ assert(config!=nullptr);
13
I2CConfig &pins = *config;
14
TwoWire *p_wire = (TwoWire*) pins.p_wire;
15
+ assert(p_wire != nullptr);
16
+
17
// if no pins are defined, just call begin
18
if (pins.scl == -1 || pins.sda == -1) {
19
AD_LOGI("setting up I2C w/o pins");
0 commit comments