diff options
author | Aidan MacDonald <amachronic@protonmail.com> | 2021-11-30 00:06:33 +0000 |
---|---|---|
committer | Aidan MacDonald <amachronic@protonmail.com> | 2021-12-05 14:18:32 -0500 |
commit | 6ff1a935b923b69d34d18e68af612297912c806b (patch) | |
tree | 6026d07765d9235118c039ce2afa4d5560d29950 /firmware/powermgmt.c | |
parent | d93a3cac50d966227e9c9d77391bf47b2a858fb1 (diff) | |
download | rockbox-6ff1a935b923b69d34d18e68af612297912c806b.tar.gz rockbox-6ff1a935b923b69d34d18e68af612297912c806b.zip |
powermgmt: Remove an unnecessary function
Remove battery_read_info() which is a simple wrapper
function only used by debug screens. Use the polling
functions directly to save a bit of code size.
Change-Id: I2919f78105bab186f6933dc1823f9fa67fe74f3e
Diffstat (limited to 'firmware/powermgmt.c')
-rw-r--r-- | firmware/powermgmt.c | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/firmware/powermgmt.c b/firmware/powermgmt.c index 8e47b19721..313486889e 100644 --- a/firmware/powermgmt.c +++ b/firmware/powermgmt.c | |||
@@ -145,22 +145,6 @@ static void battery_status_update(void); | |||
145 | static int runcurrent(void); | 145 | static int runcurrent(void); |
146 | #endif | 146 | #endif |
147 | 147 | ||
148 | void battery_read_info(int *voltage, int *level) | ||
149 | { | ||
150 | int millivolts = _battery_voltage(); | ||
151 | int percent; | ||
152 | |||
153 | if (voltage) | ||
154 | *voltage = millivolts; | ||
155 | |||
156 | if (level) { | ||
157 | percent = _battery_level(); | ||
158 | if (percent < 0) | ||
159 | percent = voltage_to_battery_level(millivolts); | ||
160 | *level = percent; | ||
161 | } | ||
162 | } | ||
163 | |||
164 | #if BATTERY_TYPES_COUNT > 1 | 148 | #if BATTERY_TYPES_COUNT > 1 |
165 | void set_battery_type(int type) | 149 | void set_battery_type(int type) |
166 | { | 150 | { |