mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-06-03 08:08:39 -04:00
ams: use R_SUCCEED, R_THROW globally
This commit is contained in:
parent
e5b1739f65
commit
dd78ede99f
370 changed files with 2107 additions and 2107 deletions
|
@ -144,7 +144,7 @@ namespace ams {
|
|||
Result OpenSession(ClkRstSession *out, DeviceCode device_code) {
|
||||
/* Get the relevant definition. */
|
||||
out->_session = const_cast<ClkRstDefinition *>(GetDefinition(device_code));
|
||||
return ResultSuccess();
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
void CloseSession(ClkRstSession *session) {
|
||||
|
@ -188,21 +188,21 @@ namespace ams {
|
|||
/* Set clock. */
|
||||
SetClockEnabled(GetDefinition(module), en);
|
||||
|
||||
return ResultSuccess();
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
Result SetClockRate(Module module, ClockHz hz) {
|
||||
/* Set the clock rate. */
|
||||
SetClockRate(GetDefinition(module), hz);
|
||||
|
||||
return ResultSuccess();
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
Result SetReset(Module module, bool en) {
|
||||
/* Set reset. */
|
||||
SetResetEnabled(GetDefinition(module), en);
|
||||
|
||||
return ResultSuccess();
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -27,7 +27,7 @@ namespace ams::regulator {
|
|||
|
||||
Result OpenSession(RegulatorSession *out, DeviceCode device_code) {
|
||||
AMS_UNUSED(out, device_code);
|
||||
return ResultSuccess();
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
void CloseSession(RegulatorSession *session) {
|
||||
|
@ -41,12 +41,12 @@ namespace ams::regulator {
|
|||
|
||||
Result SetVoltageEnabled(RegulatorSession *session, bool enabled) {
|
||||
AMS_UNUSED(session, enabled);
|
||||
return ResultSuccess();
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
Result SetVoltageValue(RegulatorSession *session, u32 micro_volts) {
|
||||
AMS_UNUSED(session, micro_volts);
|
||||
return ResultSuccess();
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -42,7 +42,7 @@ namespace ams::boot {
|
|||
R_TRY(powctl::IsBatteryPresent(std::addressof(present), s_battery_session));
|
||||
|
||||
*out = !present;
|
||||
return ResultSuccess();
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
Result GetChargePercentage(float *out) {
|
||||
|
|
|
@ -58,7 +58,7 @@ namespace ams::boot {
|
|||
/* Set configuration to charge battery. */
|
||||
R_TRY(powctl::SetChargerChargerConfiguration(m_charger_session, powctl::ChargerConfiguration_ChargeBattery));
|
||||
|
||||
return ResultSuccess();
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
Result GetChargeCurrentState(powctl::ChargeCurrentState *out) {
|
||||
|
@ -107,7 +107,7 @@ namespace ams::boot {
|
|||
case powctl::ChargerStatus_ChargeTerminationDone: *out = boot::ChargerStatus_ChargeTerminationDone; break;
|
||||
}
|
||||
|
||||
return ResultSuccess();
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
Result GetBatteryCompensation(int *out) {
|
||||
|
|
|
@ -31,7 +31,7 @@ namespace ams::boot {
|
|||
u8 power_status;
|
||||
R_TRY(this->GetPowerStatus(std::addressof(power_status)));
|
||||
*out = (power_status & 0x02) != 0;
|
||||
return ResultSuccess();
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
Result PmicDriver::GetOnOffIrq(u8 *out) {
|
||||
|
@ -53,7 +53,7 @@ namespace ams::boot {
|
|||
u8 on_off_irq;
|
||||
R_TRY(this->GetOnOffIrq(std::addressof(on_off_irq)));
|
||||
*out = (on_off_irq & 0x08) != 0;
|
||||
return ResultSuccess();
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
void PmicDriver::ShutdownSystem(bool reboot) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue