- 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. |
||
|---|---|---|
| .. | ||
| variant.cpp | ||
| variant.h | ||