mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-06 21:25:03 -05:00
erosqnative: hw4 units prefer egauge battery percentage
Use AXP2101's egauge battery percent level if available (hw4 units). If not available (_battery_level() will return -1 on hw1-hw3 units), fall back to voltage battery level. Also fix logic in axp2101_battery_status() Change-Id: Ic300418532dae6f7772fff8bf5e2b32516f3b973
This commit is contained in:
parent
f566f63b63
commit
96463d855f
6 changed files with 43 additions and 8 deletions
|
|
@ -204,6 +204,9 @@
|
|||
* use the charging hardware. */
|
||||
|
||||
/* CONFIG_BATTERY_MEASURE bits */
|
||||
/* If both VOLTAGE_MEASURE and PERCENTAGE_MEASURE are defined,
|
||||
* _battery_level() (percentage) will be preferred, unless _battery_level()
|
||||
* returns -1, then voltage will be used from _voltage_level(). */
|
||||
#define VOLTAGE_MEASURE 1 /* Target can report battery voltage
|
||||
* Usually native ports */
|
||||
#define PERCENTAGE_MEASURE 2 /* Target can report remaining capacity in %
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue