ams: use R_SUCCEED, R_THROW globally
This commit is contained in:
@@ -79,7 +79,7 @@ namespace ams::i2c::driver::impl {
|
||||
Result RegisterDeviceCode(DeviceCode device_code, I2cDeviceProperty *device) {
|
||||
AMS_ASSERT(device != nullptr);
|
||||
R_TRY(GetDeviceCodeEntryManager().Add(device_code, device));
|
||||
return ResultSuccess();
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
bool UnregisterDeviceCode(DeviceCode device_code) {
|
||||
@@ -96,7 +96,7 @@ namespace ams::i2c::driver::impl {
|
||||
|
||||
/* Set output. */
|
||||
*out = device->SafeCastToPointer<I2cDeviceProperty>();
|
||||
return ResultSuccess();
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
Result FindDeviceByBusIndexAndAddress(I2cDeviceProperty **out, i2c::I2cBus bus_index, u16 slave_address) {
|
||||
@@ -125,7 +125,7 @@ namespace ams::i2c::driver::impl {
|
||||
/* Check that we found the pad. */
|
||||
R_UNLESS(found, ddsf::ResultDeviceCodeNotFound());
|
||||
|
||||
return ResultSuccess();
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ namespace ams::i2c::driver::impl {
|
||||
|
||||
/* We're opened. */
|
||||
guard.Cancel();
|
||||
return ResultSuccess();
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
void I2cSessionImpl::Close() {
|
||||
@@ -83,7 +83,7 @@ namespace ams::i2c::driver::impl {
|
||||
/* Advance. */
|
||||
*cur_cmd += size;
|
||||
|
||||
return ResultSuccess();
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
Result I2cSessionImpl::ReceiveHandler(const u8 **cur_cmd, u8 **cur_dst) {
|
||||
@@ -102,7 +102,7 @@ namespace ams::i2c::driver::impl {
|
||||
/* Advance. */
|
||||
*cur_dst += size;
|
||||
|
||||
return ResultSuccess();
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
Result I2cSessionImpl::ExtensionHandler(const u8 **cur_cmd, u8 **cur_dst) {
|
||||
@@ -123,7 +123,7 @@ namespace ams::i2c::driver::impl {
|
||||
AMS_UNREACHABLE_DEFAULT_CASE();
|
||||
}
|
||||
|
||||
return ResultSuccess();
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
Result I2cSessionImpl::ExecuteTransactionWithRetry(void *dst, Command command, const void *src, size_t size, TransactionOption option) {
|
||||
@@ -152,7 +152,7 @@ namespace ams::i2c::driver::impl {
|
||||
}
|
||||
} R_END_TRY_CATCH;
|
||||
|
||||
return ResultSuccess();
|
||||
R_SUCCEED();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -193,13 +193,13 @@ namespace ams::i2c::driver::impl {
|
||||
}
|
||||
}
|
||||
|
||||
return ResultSuccess();
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
Result I2cSessionImpl::SetRetryPolicy(int mr, int interval_us) {
|
||||
m_max_retry_count = mr;
|
||||
m_retry_interval = TimeSpan::FromMicroSeconds(interval_us);
|
||||
return ResultSuccess();
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user