lewisxhe / XPowersLib

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

Charger voltage settings #2

Closed VovaN60 closed 1 year ago

VovaN60 commented 1 year 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 1 year ago

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