lewisxhe / XPowersLib

Arduino,CircuitPython,Micropython, esp-idf library for x-powers power management series
MIT License
77 stars 24 forks source link

Charger voltage settings #2

Closed VovaN60 closed 2 years ago

VovaN60 commented 2 years ago

Hello Dear,

Thanks alot for your work. I think the structure should start with 1 and not with 0 according to the datasheet. 000 is 'reserved' Kindly check if i am right or wrong. This the following changes the charger outputs a proper voltage. typedef enum __xpowers_axp2101_chg_vol { XPOWERS_AXP2101_CHG_VOL_4V = 1, XPOWERS_AXP2101_CHG_VOL_4V1, XPOWERS_AXP2101_CHG_VOL_4V2, XPOWERS_AXP2101_CHG_VOL_4V35, XPOWERS_AXP2101_CHG_VOL_4V4, XPOWERS_AXP2101_CHG_VOL_MAX } xpowers_axp2101_chg_vol_t;

lewisxhe commented 2 years ago

Yes, you are correct, maybe I neglected when I changed the parameter, I will fix it right away.