mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-05-27 05:04:10 -04:00
boot: finish implementing CheckBatteryCharge
This commit is contained in:
parent
7c36a827da
commit
3cc79f4e11
5 changed files with 270 additions and 5 deletions
|
@ -57,6 +57,16 @@ Result PmicDriver::GetNvErc(u8 *out) {
|
|||
return Boot::ReadI2cRegister(this->i2c_session, out, sizeof(*out), &addr, sizeof(addr));
|
||||
}
|
||||
|
||||
Result PmicDriver::GetPowerButtonPressed(bool *out) {
|
||||
u8 power_intr;
|
||||
Result rc = this->GetPowerIntr(&power_intr);
|
||||
if (R_FAILED(rc)) {
|
||||
return rc;
|
||||
}
|
||||
*out = (power_intr & 0x08) != 0;
|
||||
return ResultSuccess;
|
||||
}
|
||||
|
||||
Result PmicDriver::ShutdownSystem(bool reboot) {
|
||||
/* TODO: Implement this. */
|
||||
std::abort();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue