ams: use R_SUCCEED, R_THROW globally

This commit is contained in:
Michael Scire 2022-03-26 00:14:36 -07:00
parent e5b1739f65
commit dd78ede99f
370 changed files with 2107 additions and 2107 deletions

View file

@ -114,7 +114,7 @@ namespace ams::gpio::driver::board::nintendo::nx::impl {
/* Read the pad address to make sure our configuration takes. */
reg::Read(pad_address);
return ResultSuccess();
R_SUCCEED();
}
void DriverImpl::FinalizePad(Pad *pad) {
@ -143,7 +143,7 @@ namespace ams::gpio::driver::board::nintendo::nx::impl {
*out = Direction_Input;
}
return ResultSuccess();
R_SUCCEED();
}
@ -162,7 +162,7 @@ namespace ams::gpio::driver::board::nintendo::nx::impl {
/* Read the pad address to make sure our configuration takes. */
reg::Read(pad_address);
return ResultSuccess();
R_SUCCEED();
}
Result DriverImpl::GetValue(GpioValue *out, Pad *pad) const {
@ -183,7 +183,7 @@ namespace ams::gpio::driver::board::nintendo::nx::impl {
*out = GpioValue_Low;
}
return ResultSuccess();
R_SUCCEED();
}
Result DriverImpl::SetValue(Pad *pad, GpioValue value) {
@ -201,7 +201,7 @@ namespace ams::gpio::driver::board::nintendo::nx::impl {
/* Read the pad address to make sure our configuration takes. */
reg::Read(pad_address);
return ResultSuccess();
R_SUCCEED();
}
Result DriverImpl::GetInterruptMode(InterruptMode *out, Pad *pad) const {
@ -225,7 +225,7 @@ namespace ams::gpio::driver::board::nintendo::nx::impl {
AMS_UNREACHABLE_DEFAULT_CASE();
}
return ResultSuccess();
R_SUCCEED();
}
Result DriverImpl::SetInterruptMode(Pad *pad, InterruptMode mode) {
@ -251,7 +251,7 @@ namespace ams::gpio::driver::board::nintendo::nx::impl {
/* Read the pad address to make sure our configuration takes. */
reg::Read(pad_address);
return ResultSuccess();
R_SUCCEED();
}
Result DriverImpl::SetInterruptEnabled(Pad *pad, bool en) {

View file

@ -30,7 +30,7 @@ namespace ams::gpio::driver {
R_TRY(session->Open(pad, access_mode));
session_guard.Cancel();
return ResultSuccess();
R_SUCCEED();
}
}
@ -54,7 +54,7 @@ namespace ams::gpio::driver {
}
} R_END_TRY_CATCH;
return ResultSuccess();
R_SUCCEED();
}
void CloseSession(GpioPadSession *session) {
@ -77,7 +77,7 @@ namespace ams::gpio::driver {
/* Perform the call. */
R_TRY(pad.GetDriver().SafeCastTo<IGpioDriver>().SetDirection(std::addressof(pad), direction));
return ResultSuccess();
R_SUCCEED();
}
Result GetDirection(gpio::Direction *out, GpioPadSession *session) {
@ -95,7 +95,7 @@ namespace ams::gpio::driver {
/* Perform the call. */
R_TRY(pad.GetDriver().SafeCastTo<IGpioDriver>().GetDirection(out, std::addressof(pad)));
return ResultSuccess();
R_SUCCEED();
}
Result SetValue(GpioPadSession *session, gpio::GpioValue value) {
@ -113,7 +113,7 @@ namespace ams::gpio::driver {
/* Perform the call. */
R_TRY(pad.GetDriver().SafeCastTo<IGpioDriver>().SetValue(std::addressof(pad), value));
return ResultSuccess();
R_SUCCEED();
}
Result GetValue(gpio::GpioValue *out, GpioPadSession *session) {
@ -131,7 +131,7 @@ namespace ams::gpio::driver {
/* Perform the call. */
R_TRY(pad.GetDriver().SafeCastTo<IGpioDriver>().GetValue(out, std::addressof(pad)));
return ResultSuccess();
R_SUCCEED();
}
}

View file

@ -93,7 +93,7 @@ namespace ams::gpio::driver::impl {
Result RegisterDeviceCode(DeviceCode device_code, Pad *pad) {
AMS_ASSERT(pad != nullptr);
R_TRY(GetDeviceCodeEntryManager().Add(device_code, pad));
return ResultSuccess();
R_SUCCEED();
}
bool UnregisterDeviceCode(DeviceCode device_code) {
@ -120,7 +120,7 @@ namespace ams::gpio::driver::impl {
/* Set output. */
*out = device->SafeCastToPointer<Pad>();
return ResultSuccess();
R_SUCCEED();
}
Result FindPadByNumber(Pad **out, int pad_number) {
@ -145,7 +145,7 @@ namespace ams::gpio::driver::impl {
/* Check that we found the pad. */
R_UNLESS(found, ddsf::ResultDeviceCodeNotFound());
return ResultSuccess();
R_SUCCEED();
}
}

View file

@ -32,7 +32,7 @@ namespace ams::gpio::driver::impl {
/* We opened successfully. */
pad_guard.Cancel();
return ResultSuccess();
R_SUCCEED();
}
void PadSessionImpl::Close() {
@ -82,7 +82,7 @@ namespace ams::gpio::driver::impl {
/* We succeeded. */
hl_guard.Cancel();
ev_guard.Cancel();
return ResultSuccess();
R_SUCCEED();
}
void PadSessionImpl::UnbindInterrupt() {
@ -115,7 +115,7 @@ namespace ams::gpio::driver::impl {
Result PadSessionImpl::GetInterruptEnabled(bool *out) const {
*out = this->GetDevice().SafeCastTo<Pad>().IsInterruptEnabled();
return ResultSuccess();
R_SUCCEED();
}
Result PadSessionImpl::SetInterruptEnabled(bool en) {
@ -133,7 +133,7 @@ namespace ams::gpio::driver::impl {
R_TRY(this->UpdateDriverInterruptEnabled());
pad_guard.Cancel();
return ResultSuccess();
R_SUCCEED();
}
void PadSessionImpl::SignalInterruptBoundEvent() {