mirror of
https://github.com/XorTroll/uLaunch
synced 2024-11-27 06:10:20 +00:00
25 lines
No EOL
507 B
C++
25 lines
No EOL
507 B
C++
#include <os/os_Misc.hpp>
|
|
|
|
namespace os
|
|
{
|
|
u32 GetBatteryLevel()
|
|
{
|
|
u32 lvl = 0;
|
|
psmGetBatteryChargePercentage(&lvl);
|
|
return lvl;
|
|
}
|
|
|
|
bool IsConsoleCharging()
|
|
{
|
|
ChargerType cht = ChargerType_None;
|
|
psmGetChargerType(&cht);
|
|
return (cht > ChargerType_None);
|
|
}
|
|
|
|
std::string GetFirmwareVersion()
|
|
{
|
|
SetSysFirmwareVersion fwver;
|
|
setsysGetFirmwareVersion(&fwver);
|
|
return std::string(fwver.display_version);
|
|
}
|
|
} |