File tree Expand file tree Collapse file tree 2 files changed +9
-11
lines changed Expand file tree Collapse file tree 2 files changed +9
-11
lines changed Original file line number Diff line number Diff line change @@ -201,21 +201,14 @@ static inline void disable_battery_charging() {}
201201#endif
202202
203203void initVariant () {
204-
205- pinMode (32 , OUTPUT);
206- digitalWrite (32 , LOW);
207- pinMode (32 , INPUT);
208- if (analogRead (32 ) < 800 ) {
204+ pinMode (ADC_BATTERY, INPUT_PULLDOWN);
205+ if (analogRead (ADC_BATTERY) < 800 ) {
209206 disable_battery_charging ();
210207 }
211208
212209 // Workaround for RTS not being controlled correctly
213- pinMode (28 , OUTPUT);
214- digitalWrite (28 , LOW);
215- pinMode (31 , OUTPUT);
216- digitalWrite (31 , HIGH);
217- delay (100 );
218- digitalWrite (31 , LOW);
210+ pinMode (GSM_RTS, OUTPUT);
211+ digitalWrite (GSM_RTS, LOW);
219212}
220213
221214// Serial1
Original file line number Diff line number Diff line change 6363//Battery
6464#define ADC_BATTERY (32u)
6565
66+ //GSM
67+ #define GSM_RTS (28u)
68+ #define GSM_CTS (29u)
69+ #define GSM_RESETN (31u)
70+
6671// LEDs
6772// ----
6873#define PIN_LED (6u)
You can’t perform that action at this time.
0 commit comments