We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bc51bc5 commit e66adeaCopy full SHA for e66adea
variants/mkrvidor/variant.cpp
@@ -177,7 +177,10 @@ static inline void enable_battery_charging() {
177
pinPeripheral(PIN_WIRE_SDA, g_APinDescription[PIN_WIRE_SDA].ulPinType);
178
pinPeripheral(PIN_WIRE_SCL, g_APinDescription[PIN_WIRE_SCL].ulPinType);
179
180
- PERIPH_WIRE.startTransmissionWIRE( PMIC_ADDRESS, WIRE_WRITE_FLAG );
+ bool ret = PERIPH_WIRE.startTransmissionWIRE( PMIC_ADDRESS, WIRE_WRITE_FLAG );
181
+ if (!ret) {
182
+ return;
183
+ }
184
PERIPH_WIRE.sendDataMasterWIRE(PMIC_REG01);
185
PERIPH_WIRE.sendDataMasterWIRE(0x1B); // Charge Battery + Minimum System Voltage 3.5V
186
PERIPH_WIRE.prepareCommandBitsWire(WIRE_MASTER_ACT_STOP);
0 commit comments