boot: refactor battery checking to use new powctl apis

This commit is contained in:
Michael Scire
2020-11-08 04:16:50 -08:00
parent cd7d7894f1
commit e93c3cbf58
44 changed files with 1426 additions and 1554 deletions

View File

@@ -15,12 +15,21 @@
*/
#pragma once
#include <stratosphere.hpp>
#include "boot_display.hpp"
namespace ams::boot {
/* Battery Display utilities. */
void ShowLowBatteryIcon();
void StartShowChargingIcon(size_t battery_percentage, bool wait);
void StartShowChargingIcon(int battery_percentage, bool wait);
void EndShowChargingIcon();
inline void StartShowChargingIcon(int battery_percentage) {
return StartShowChargingIcon(battery_percentage, true);
}
inline void StartShowLowBatteryChargingIcon() {
return StartShowChargingIcon(1, false);
}
}