lewisxhe / AXP202X_Library

Arduino & ESP-IDF libraries written for AXP19x, 20x
MIT License
91 stars 40 forks source link

Use of setChargeControlCur() disables charging #16

Closed DooMMasteR closed 4 years ago

DooMMasteR commented 4 years ago

I use a TTGO T-BEAM rev1.0 and when I use setChargeControlCur() with any of the enum values, it will not charge. enableChargeing(true) reenables charging, but still, the set current does not apply and it seems ti be charging at about 400mA.

DooMMasteR commented 4 years ago

ok, damn, it somehow works now, still, since setChargeControlCur() does not set the 7th bit in the AXP202_CHARGE1 charging will not be enabled after use, a call to enableChargeing(true) is necessary.

DooMMasteR commented 4 years ago

I will try to make a PR with some documentation (stuff like limitation and such) as e.g. anything above 500 mA needs a call to limitingOff() to allow out of base USB power delivery.