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 f9c8150 commit a00bd84Copy full SHA for a00bd84
variants/mkrgsm1400/variant.cpp
@@ -216,18 +216,19 @@ static inline void disable_battery_charging() {}
216
#endif
217
218
void initVariant() {
219
- set_pmic_safe_defaults();
+ pinMode(32, INPUT_PULLDOWN);
220
+ if (analogRead(32) < 800) {
221
+ disable_battery_charging();
222
+ } else {
223
+ set_pmic_safe_defaults();
224
+ }
225
// Workaround for RTS not being controlled correctly
226
pinMode(28, OUTPUT);
227
digitalWrite(28, LOW);
228
pinMode(31, OUTPUT);
229
digitalWrite(31, HIGH);
230
delay(100);
231
digitalWrite(31, LOW);
- pinMode(32, INPUT_PULLDOWN);
- if (analogRead(32) < 800) {
- disable_battery_charging();
- }
232
}
233
234
// Serial1
0 commit comments