Adafruit_nRF52_Arduino/variants/particle_xenon
Montvydas Klumbys 4b609ef91e Xenon board can tell when it is getting powered through the USB rather than a battery and when a battery is being charged. Added required pins inside variant files and they work as specified:
- When PIN_PWD is HIGH, Xenon is being powered through the USB
- When PIN_CHG is LOW, a battery attached to Xenon is being charged
Note though that prior to using these pins it is neccessary to specify pinMode(PIN_CHG, INPUT) and pinMode(PIN_PWR, INPUT) due to how they're being implemented in hardware. Using these two pins 3 states of power can be deduced:
- hasUsbPower = digitalRead(PIN_PWR);
- isCharging = (hasUsbPower && !digitalRead(PIN_CHG));
- onBatteryPower = !hasUsbPower;

Added the missing LED1 initialisation.

BUTTON_FRESET pin number assignment was fixed.
2020-04-13 19:12:11 +02:00
..
variant.cpp Xenon board can tell when it is getting powered through the USB rather than a battery and when a battery is being charged. Added required pins inside variant files and they work as specified: 2020-04-13 19:12:11 +02:00
variant.h Xenon board can tell when it is getting powered through the USB rather than a battery and when a battery is being charged. Added required pins inside variant files and they work as specified: 2020-04-13 19:12:11 +02:00