diff options
Diffstat (limited to 'board/spring/led.c')
-rw-r--r-- | board/spring/led.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/board/spring/led.c b/board/spring/led.c index 4338911237..cbb1fd9ab9 100644 --- a/board/spring/led.c +++ b/board/spring/led.c @@ -6,6 +6,7 @@ */ #include "battery.h" +#include "battery_smart.h" #include "common.h" #include "driver/led/lp5562.h" #include "extpower.h" @@ -70,6 +71,14 @@ static int set_led_color(enum led_state_t state) return rv; } +/** + * Directly read state of charge (0-100) of battery. + */ +static int battery_state_of_charge(int *percent) +{ + return sb_read(SB_RELATIVE_STATE_OF_CHARGE, percent); +} + /*****************************************************************************/ /* Host commands */ |