strat: use m_ for member variables

This commit is contained in:
Michael Scire
2021-10-10 00:14:06 -07:00
parent ce28591ab2
commit a595c232b9
425 changed files with 8531 additions and 8484 deletions

View File

@@ -20,82 +20,82 @@ namespace ams::gpio {
class RemotePadSessionImpl {
private:
::GpioPadSession srv;
::GpioPadSession m_srv;
public:
RemotePadSessionImpl(::GpioPadSession &p) : srv(p) { /* ... */ }
RemotePadSessionImpl(::GpioPadSession &p) : m_srv(p) { /* ... */ }
~RemotePadSessionImpl() { ::gpioPadClose(std::addressof(this->srv)); }
~RemotePadSessionImpl() { ::gpioPadClose(std::addressof(m_srv)); }
public:
/* Actual commands. */
Result SetDirection(gpio::Direction direction) {
return ::gpioPadSetDirection(std::addressof(this->srv), static_cast<::GpioDirection>(static_cast<u32>(direction)));
return ::gpioPadSetDirection(std::addressof(m_srv), static_cast<::GpioDirection>(static_cast<u32>(direction)));
}
Result GetDirection(ams::sf::Out<gpio::Direction> out) {
static_assert(sizeof(gpio::Direction) == sizeof(::GpioDirection));
return ::gpioPadGetDirection(std::addressof(this->srv), reinterpret_cast<::GpioDirection *>(out.GetPointer()));
return ::gpioPadGetDirection(std::addressof(m_srv), reinterpret_cast<::GpioDirection *>(out.GetPointer()));
}
Result SetInterruptMode(gpio::InterruptMode mode) {
return ::gpioPadSetInterruptMode(std::addressof(this->srv), static_cast<::GpioInterruptMode>(static_cast<u32>(mode)));
return ::gpioPadSetInterruptMode(std::addressof(m_srv), static_cast<::GpioInterruptMode>(static_cast<u32>(mode)));
}
Result GetInterruptMode(ams::sf::Out<gpio::InterruptMode> out) {
static_assert(sizeof(gpio::InterruptMode) == sizeof(::GpioInterruptMode));
return ::gpioPadGetInterruptMode(std::addressof(this->srv), reinterpret_cast<::GpioInterruptMode *>(out.GetPointer()));
return ::gpioPadGetInterruptMode(std::addressof(m_srv), reinterpret_cast<::GpioInterruptMode *>(out.GetPointer()));
}
Result SetInterruptEnable(bool enable) {
return ::gpioPadSetInterruptEnable(std::addressof(this->srv), enable);
return ::gpioPadSetInterruptEnable(std::addressof(m_srv), enable);
}
Result GetInterruptEnable(ams::sf::Out<bool> out) {
return ::gpioPadGetInterruptEnable(std::addressof(this->srv), out.GetPointer());
return ::gpioPadGetInterruptEnable(std::addressof(m_srv), out.GetPointer());
}
Result GetInterruptStatus(ams::sf::Out<gpio::InterruptStatus> out) {
static_assert(sizeof(gpio::InterruptStatus) == sizeof(::GpioInterruptStatus));
return ::gpioPadGetInterruptStatus(std::addressof(this->srv), reinterpret_cast<::GpioInterruptStatus *>(out.GetPointer()));
return ::gpioPadGetInterruptStatus(std::addressof(m_srv), reinterpret_cast<::GpioInterruptStatus *>(out.GetPointer()));
}
Result ClearInterruptStatus() {
return ::gpioPadClearInterruptStatus(std::addressof(this->srv));
return ::gpioPadClearInterruptStatus(std::addressof(m_srv));
}
Result SetValue(gpio::GpioValue value) {
return ::gpioPadSetValue(std::addressof(this->srv), static_cast<::GpioValue>(static_cast<u32>(value)));
return ::gpioPadSetValue(std::addressof(m_srv), static_cast<::GpioValue>(static_cast<u32>(value)));
}
Result GetValue(ams::sf::Out<gpio::GpioValue> out) {
static_assert(sizeof(gpio::GpioValue) == sizeof(::GpioValue));
return ::gpioPadGetValue(std::addressof(this->srv), reinterpret_cast<::GpioValue *>(out.GetPointer()));
return ::gpioPadGetValue(std::addressof(m_srv), reinterpret_cast<::GpioValue *>(out.GetPointer()));
}
Result BindInterrupt(ams::sf::OutCopyHandle out) {
::Event ev;
R_TRY(::gpioPadBindInterrupt(std::addressof(this->srv), std::addressof(ev)));
R_TRY(::gpioPadBindInterrupt(std::addressof(m_srv), std::addressof(ev)));
out.SetValue(ev.revent, true);
return ResultSuccess();
}
Result UnbindInterrupt() {
return ::gpioPadUnbindInterrupt(std::addressof(this->srv));
return ::gpioPadUnbindInterrupt(std::addressof(m_srv));
}
Result SetDebounceEnabled(bool enable) {
return ::gpioPadSetDebounceEnabled(std::addressof(this->srv), enable);
return ::gpioPadSetDebounceEnabled(std::addressof(m_srv), enable);
}
Result GetDebounceEnabled(ams::sf::Out<bool> out) {
return ::gpioPadGetDebounceEnabled(std::addressof(this->srv), out.GetPointer());
return ::gpioPadGetDebounceEnabled(std::addressof(m_srv), out.GetPointer());
}
Result SetDebounceTime(s32 ms) {
return ::gpioPadSetDebounceTime(std::addressof(this->srv), ms);
return ::gpioPadSetDebounceTime(std::addressof(m_srv), ms);
}
Result GetDebounceTime(ams::sf::Out<s32> out) {
return ::gpioPadGetDebounceTime(std::addressof(this->srv), out.GetPointer());
return ::gpioPadGetDebounceTime(std::addressof(m_srv), out.GetPointer());
}
Result SetValueForSleepState(gpio::GpioValue value) {