From 6ff1a935b923b69d34d18e68af612297912c806b Mon Sep 17 00:00:00 2001 From: Aidan MacDonald Date: Tue, 30 Nov 2021 00:06:33 +0000 Subject: 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 --- firmware/powermgmt.c | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'firmware/powermgmt.c') 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); static int runcurrent(void); #endif -void battery_read_info(int *voltage, int *level) -{ - int millivolts = _battery_voltage(); - int percent; - - if (voltage) - *voltage = millivolts; - - if (level) { - percent = _battery_level(); - if (percent < 0) - percent = voltage_to_battery_level(millivolts); - *level = percent; - } -} - #if BATTERY_TYPES_COUNT > 1 void set_battery_type(int type) { -- cgit v1.2.3