Closed trunneml closed 2 years ago
To set the voltage of DCDC2 register 23H needs to be used, not 25H (see https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/docs/datasheet/core/AXP192_datasheet_cn.pdf). This PR will fix #82.
Also DCDC2 only has a range of 700mV to 2275 mV (6Bits). To prevent miss calculations for an out range value I added a helper method, that is used for LDO and DCDC voltage settings calculations.
I rebased my PR to the latest master.
To set the voltage of DCDC2 register 23H needs to be used, not 25H (see https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/docs/datasheet/core/AXP192_datasheet_cn.pdf). This PR will fix #82.
Also DCDC2 only has a range of 700mV to 2275 mV (6Bits). To prevent miss calculations for an out range value I added a helper method, that is used for LDO and DCDC voltage settings calculations.