From 9b4e4a219052696fbca00983bcbade7be902180a Mon Sep 17 00:00:00 2001 From: hexkyz Date: Thu, 17 Sep 2026 19:40:17 +0100 Subject: [PATCH] gpio: update for 23.0.0 --- .../gpio/sf/gpio_sf_i_manager.hpp | 24 +++++------ .../gpio/sf/gpio_sf_i_pad_session.hpp | 42 ++++++++++--------- .../source/gpio/gpio_client_api.cpp | 10 ++--- .../source/gpio/gpio_remote_manager_impl.cpp | 4 +- .../source/gpio/gpio_remote_manager_impl.hpp | 20 ++++----- .../gpio/gpio_remote_pad_session_impl.hpp | 27 +++++++++++- .../gpio/server/gpio_server_manager_impl.cpp | 22 +++++----- .../gpio/server/gpio_server_manager_impl.hpp | 20 ++++----- .../server/gpio_server_pad_session_impl.hpp | 39 ++++++++++++++++- 9 files changed, 135 insertions(+), 73 deletions(-) diff --git a/libraries/libstratosphere/include/stratosphere/gpio/sf/gpio_sf_i_manager.hpp b/libraries/libstratosphere/include/stratosphere/gpio/sf/gpio_sf_i_manager.hpp index 077885fc8..fee82ffe8 100644 --- a/libraries/libstratosphere/include/stratosphere/gpio/sf/gpio_sf_i_manager.hpp +++ b/libraries/libstratosphere/include/stratosphere/gpio/sf/gpio_sf_i_manager.hpp @@ -21,17 +21,17 @@ #include #include -#define AMS_GPIO_I_MANAGER_INTERFACE_INFO(C, H) \ - AMS_SF_METHOD_INFO(C, H, 0, Result, OpenSessionForDev, (ams::sf::Out> out, s32 pad_descriptor), (out, pad_descriptor) ) \ - AMS_SF_METHOD_INFO(C, H, 1, Result, OpenSession, (ams::sf::Out> out, gpio::GpioPadName pad_name), (out, pad_name) ) \ - AMS_SF_METHOD_INFO(C, H, 2, Result, OpenSessionForTest, (ams::sf::Out> out, gpio::GpioPadName pad_name), (out, pad_name) ) \ - AMS_SF_METHOD_INFO(C, H, 3, Result, IsWakeEventActive, (ams::sf::Out out, gpio::GpioPadName pad_name), (out, pad_name), hos::Version_Min, hos::Version_6_2_0) \ - AMS_SF_METHOD_INFO(C, H, 4, Result, GetWakeEventActiveFlagSet, (ams::sf::Out out), (out), hos::Version_Min, hos::Version_6_2_0) \ - AMS_SF_METHOD_INFO(C, H, 5, Result, SetWakeEventActiveFlagSetForDebug, (gpio::GpioPadName pad_name, bool is_enabled), (pad_name, is_enabled), hos::Version_Min, hos::Version_6_2_0) \ - AMS_SF_METHOD_INFO(C, H, 6, Result, SetWakePinDebugMode, (s32 mode), (mode) ) \ - AMS_SF_METHOD_INFO(C, H, 7, Result, OpenSession2, (ams::sf::Out> out, DeviceCode device_code, ddsf::AccessMode access_mode), (out, device_code, access_mode), hos::Version_5_0_0 ) \ - AMS_SF_METHOD_INFO(C, H, 8, Result, IsWakeEventActive2, (ams::sf::Out out, DeviceCode device_code), (out, device_code), hos::Version_5_0_0 ) \ - AMS_SF_METHOD_INFO(C, H, 9, Result, SetWakeEventActiveFlagSetForDebug2, (DeviceCode device_code, bool is_enabled), (device_code, is_enabled), hos::Version_5_0_0 ) \ - AMS_SF_METHOD_INFO(C, H, 10, Result, SetRetryValues, (u32 arg0, u32 arg1), (arg0, arg1), hos::Version_6_0_0 ) +#define AMS_GPIO_I_MANAGER_INTERFACE_INFO(C, H) \ + AMS_SF_METHOD_INFO(C, H, 0, Result, OpenSessionForDevDeprecated, (ams::sf::Out> out, s32 pad_descriptor), (out, pad_descriptor)) \ + AMS_SF_METHOD_INFO(C, H, 1, Result, OpenSessionDeprecated, (ams::sf::Out> out, gpio::GpioPadName pad_name), (out, pad_name)) \ + AMS_SF_METHOD_INFO(C, H, 2, Result, OpenSessionForTestDeprecated, (ams::sf::Out> out, gpio::GpioPadName pad_name), (out, pad_name)) \ + AMS_SF_METHOD_INFO(C, H, 3, Result, IsWakeEventActiveDeprecated, (ams::sf::Out out, gpio::GpioPadName pad_name), (out, pad_name), hos::Version_1_0_0, hos::Version_6_2_0) \ + AMS_SF_METHOD_INFO(C, H, 4, Result, GetWakeEventActiveFlagSetDeprecated, (ams::sf::Out out), (out), hos::Version_1_0_0, hos::Version_6_2_0) \ + AMS_SF_METHOD_INFO(C, H, 5, Result, SetWakeEventActiveFlagSetForDebugDeprecated, (gpio::GpioPadName pad_name, bool is_enabled), (pad_name, is_enabled), hos::Version_1_0_0, hos::Version_6_2_0) \ + AMS_SF_METHOD_INFO(C, H, 6, Result, SetWakePinDebugMode, (s32 mode), (mode)) \ + AMS_SF_METHOD_INFO(C, H, 7, Result, OpenSession, (ams::sf::Out> out, DeviceCode device_code, ddsf::AccessMode access_mode), (out, device_code, access_mode), hos::Version_5_0_0) \ + AMS_SF_METHOD_INFO(C, H, 8, Result, IsWakeEventActive, (ams::sf::Out out, DeviceCode device_code), (out, device_code), hos::Version_5_0_0) \ + AMS_SF_METHOD_INFO(C, H, 9, Result, SetWakeEventActiveFlagSetForDebug, (DeviceCode device_code, bool is_enabled), (device_code, is_enabled), hos::Version_5_0_0) \ + AMS_SF_METHOD_INFO(C, H, 10, Result, DumpStateForDebug, (u32 arg0, u32 arg1), (arg0, arg1), hos::Version_6_0_0) AMS_SF_DEFINE_INTERFACE(ams::gpio::sf, IManager, AMS_GPIO_I_MANAGER_INTERFACE_INFO, 0xD219501E) diff --git a/libraries/libstratosphere/include/stratosphere/gpio/sf/gpio_sf_i_pad_session.hpp b/libraries/libstratosphere/include/stratosphere/gpio/sf/gpio_sf_i_pad_session.hpp index 9c0fb619e..eaf055b1d 100644 --- a/libraries/libstratosphere/include/stratosphere/gpio/sf/gpio_sf_i_pad_session.hpp +++ b/libraries/libstratosphere/include/stratosphere/gpio/sf/gpio_sf_i_pad_session.hpp @@ -18,24 +18,28 @@ #include #include -#define AMS_GPIO_I_PAD_SESSION_INTERFACE_INFO(C, H) \ - AMS_SF_METHOD_INFO(C, H, 0, Result, SetDirection, (gpio::Direction direction), (direction) ) \ - AMS_SF_METHOD_INFO(C, H, 1, Result, GetDirection, (ams::sf::Out out), (out) ) \ - AMS_SF_METHOD_INFO(C, H, 2, Result, SetInterruptMode, (gpio::InterruptMode mode), (mode) ) \ - AMS_SF_METHOD_INFO(C, H, 3, Result, GetInterruptMode, (ams::sf::Out out), (out) ) \ - AMS_SF_METHOD_INFO(C, H, 4, Result, SetInterruptEnable, (bool enable), (enable) ) \ - AMS_SF_METHOD_INFO(C, H, 5, Result, GetInterruptEnable, (ams::sf::Out out), (out) ) \ - AMS_SF_METHOD_INFO(C, H, 6, Result, GetInterruptStatus, (ams::sf::Out out), (out) ) \ - AMS_SF_METHOD_INFO(C, H, 7, Result, ClearInterruptStatus, (), () ) \ - AMS_SF_METHOD_INFO(C, H, 8, Result, SetValue, (gpio::GpioValue value), (value) ) \ - AMS_SF_METHOD_INFO(C, H, 9, Result, GetValue, (ams::sf::Out out), (out) ) \ - AMS_SF_METHOD_INFO(C, H, 10, Result, BindInterrupt, (ams::sf::OutCopyHandle out), (out) ) \ - AMS_SF_METHOD_INFO(C, H, 11, Result, UnbindInterrupt, (), () ) \ - AMS_SF_METHOD_INFO(C, H, 12, Result, SetDebounceEnabled, (bool enable), (enable) ) \ - AMS_SF_METHOD_INFO(C, H, 13, Result, GetDebounceEnabled, (ams::sf::Out out), (out) ) \ - AMS_SF_METHOD_INFO(C, H, 14, Result, SetDebounceTime, (s32 ms), (ms) ) \ - AMS_SF_METHOD_INFO(C, H, 15, Result, GetDebounceTime, (ams::sf::Out out), (out) ) \ - AMS_SF_METHOD_INFO(C, H, 16, Result, SetValueForSleepState, (gpio::GpioValue value), (value), hos::Version_4_0_0) \ - AMS_SF_METHOD_INFO(C, H, 16, Result, GetValueForSleepState, (ams::sf::Out out), (out), hos::Version_6_0_0) +#define AMS_GPIO_I_PAD_SESSION_INTERFACE_INFO(C, H) \ + AMS_SF_METHOD_INFO(C, H, 0, Result, SetDirectionDeprecated, (gpio::Direction direction), (direction)) \ + AMS_SF_METHOD_INFO(C, H, 1, Result, GetDirection, (ams::sf::Out out), (out)) \ + AMS_SF_METHOD_INFO(C, H, 2, Result, SetInterruptMode, (gpio::InterruptMode mode), (mode)) \ + AMS_SF_METHOD_INFO(C, H, 3, Result, GetInterruptMode, (ams::sf::Out out), (out)) \ + AMS_SF_METHOD_INFO(C, H, 4, Result, SetInterruptEnable, (bool enable), (enable)) \ + AMS_SF_METHOD_INFO(C, H, 5, Result, GetInterruptEnable, (ams::sf::Out out), (out)) \ + AMS_SF_METHOD_INFO(C, H, 6, Result, GetInterruptStatus, (ams::sf::Out out), (out), hos::Version_1_0_0, hos::Version_16_1_0) \ + AMS_SF_METHOD_INFO(C, H, 7, Result, ClearInterruptStatus, (), (), hos::Version_1_0_0, hos::Version_16_1_0) \ + AMS_SF_METHOD_INFO(C, H, 8, Result, SetValue, (gpio::GpioValue value), (value)) \ + AMS_SF_METHOD_INFO(C, H, 9, Result, GetValue, (ams::sf::Out out), (out)) \ + AMS_SF_METHOD_INFO(C, H, 10, Result, BindInterrupt, (ams::sf::OutCopyHandle out), (out)) \ + AMS_SF_METHOD_INFO(C, H, 11, Result, UnbindInterrupt, (), ()) \ + AMS_SF_METHOD_INFO(C, H, 12, Result, SetDebounceEnabled, (bool enable), (enable)) \ + AMS_SF_METHOD_INFO(C, H, 13, Result, GetDebounceEnabled, (ams::sf::Out out), (out)) \ + AMS_SF_METHOD_INFO(C, H, 14, Result, SetDebounceTime, (s32 ms), (ms)) \ + AMS_SF_METHOD_INFO(C, H, 15, Result, GetDebounceTime, (ams::sf::Out out), (out)) \ + AMS_SF_METHOD_INFO(C, H, 16, Result, SetValueForSleepState, (gpio::GpioValue value), (value), hos::Version_4_0_0) \ + AMS_SF_METHOD_INFO(C, H, 17, Result, GetMaxDebounceTime, (ams::sf::Out out), (out), hos::Version_6_0_0) \ + AMS_SF_METHOD_INFO(C, H, 18, Result, SetDirectionInput, (), (), hos::Version_12_0_0) \ + AMS_SF_METHOD_INFO(C, H, 19, Result, SetDirectionOutput, (gpio::GpioValue value), (value), hos::Version_12_0_0) \ + AMS_SF_METHOD_INFO(C, H, 20, Result, SetUnknownEnabled, (bool enable), (enable), hos::Version_23_0_0) \ + AMS_SF_METHOD_INFO(C, H, 21, Result, GetUnknownEnabled, (ams::sf::Out out), (out), hos::Version_23_0_0) AMS_SF_DEFINE_INTERFACE(ams::gpio::sf, IPadSession, AMS_GPIO_I_PAD_SESSION_INTERFACE_INFO, 0x7448A8A7) diff --git a/libraries/libstratosphere/source/gpio/gpio_client_api.cpp b/libraries/libstratosphere/source/gpio/gpio_client_api.cpp index ce51b8cef..8da47933d 100644 --- a/libraries/libstratosphere/source/gpio/gpio_client_api.cpp +++ b/libraries/libstratosphere/source/gpio/gpio_client_api.cpp @@ -81,9 +81,9 @@ namespace ams::gpio { ams::sf::SharedPointer session; { if (hos::GetVersion() >= hos::Version_7_0_0) { - R_TRY(g_manager->OpenSession2(std::addressof(session), device_code, ddsf::AccessMode_ReadWrite)); + R_TRY(g_manager->OpenSession(std::addressof(session), device_code, ddsf::AccessMode_ReadWrite)); } else { - R_TRY(g_manager->OpenSession(std::addressof(session), ConvertToGpioPadName(device_code))); + R_TRY(g_manager->OpenSessionDeprecated(std::addressof(session), ConvertToGpioPadName(device_code))); } } @@ -110,9 +110,9 @@ namespace ams::gpio { Result IsWakeEventActive(bool *out_is_active, ams::DeviceCode device_code) { if (hos::GetVersion() >= hos::Version_7_0_0) { - R_TRY(g_manager->IsWakeEventActive2(out_is_active, device_code)); + R_TRY(g_manager->IsWakeEventActive(out_is_active, device_code)); } else { - R_TRY(g_manager->IsWakeEventActive(out_is_active, ConvertToGpioPadName(device_code))); + R_TRY(g_manager->IsWakeEventActiveDeprecated(out_is_active, ConvertToGpioPadName(device_code))); } R_SUCCEED(); @@ -125,7 +125,7 @@ namespace ams::gpio { } void SetDirection(GpioPadSession *session, Direction direction) { - R_ABORT_UNLESS(GetInterface(session)->SetDirection(direction)); + R_ABORT_UNLESS(GetInterface(session)->SetDirectionDeprecated(direction)); } GpioValue GetValue(GpioPadSession *session) { diff --git a/libraries/libstratosphere/source/gpio/gpio_remote_manager_impl.cpp b/libraries/libstratosphere/source/gpio/gpio_remote_manager_impl.cpp index 72da31d0e..968c2769a 100644 --- a/libraries/libstratosphere/source/gpio/gpio_remote_manager_impl.cpp +++ b/libraries/libstratosphere/source/gpio/gpio_remote_manager_impl.cpp @@ -34,7 +34,7 @@ namespace ams::gpio { } - Result RemoteManagerImpl::OpenSession(ams::sf::Out> out, gpio::GpioPadName pad_name) { + Result RemoteManagerImpl::OpenSessionDeprecated(ams::sf::Out> out, gpio::GpioPadName pad_name) { ::GpioPadSession p; R_TRY(::gpioOpenSession(std::addressof(p), static_cast<::GpioPadName>(static_cast(pad_name)))); @@ -42,7 +42,7 @@ namespace ams::gpio { R_SUCCEED(); } - Result RemoteManagerImpl::OpenSession2(ams::sf::Out> out, DeviceCode device_code, ddsf::AccessMode access_mode) { + Result RemoteManagerImpl::OpenSession(ams::sf::Out> out, DeviceCode device_code, ddsf::AccessMode access_mode) { ::GpioPadSession p; R_TRY(::gpioOpenSession2(std::addressof(p), device_code.GetInternalValue(), access_mode)); diff --git a/libraries/libstratosphere/source/gpio/gpio_remote_manager_impl.hpp b/libraries/libstratosphere/source/gpio/gpio_remote_manager_impl.hpp index bd6e47fcd..ec3ad8c6c 100644 --- a/libraries/libstratosphere/source/gpio/gpio_remote_manager_impl.hpp +++ b/libraries/libstratosphere/source/gpio/gpio_remote_manager_impl.hpp @@ -27,31 +27,31 @@ namespace ams::gpio { ~RemoteManagerImpl() { /* ... */ } public: /* Actual commands. */ - Result OpenSessionForDev(ams::sf::Out> out, s32 pad_descriptor) { + Result OpenSessionForDevDeprecated(ams::sf::Out> out, s32 pad_descriptor) { /* TODO: libnx bindings */ AMS_UNUSED(out, pad_descriptor); AMS_ABORT(); } - Result OpenSession(ams::sf::Out> out, gpio::GpioPadName pad_name); + Result OpenSessionDeprecated(ams::sf::Out> out, gpio::GpioPadName pad_name); - Result OpenSessionForTest(ams::sf::Out> out, gpio::GpioPadName pad_name) { + Result OpenSessionForTestDeprecated(ams::sf::Out> out, gpio::GpioPadName pad_name) { /* TODO: libnx bindings */ AMS_UNUSED(out, pad_name); AMS_ABORT(); } - Result IsWakeEventActive(ams::sf::Out out, gpio::GpioPadName pad_name) { + Result IsWakeEventActiveDeprecated(ams::sf::Out out, gpio::GpioPadName pad_name) { R_RETURN(::gpioIsWakeEventActive2(out.GetPointer(), static_cast<::GpioPadName>(static_cast(pad_name)))); } - Result GetWakeEventActiveFlagSet(ams::sf::Out out) { + Result GetWakeEventActiveFlagSetDeprecated(ams::sf::Out out) { /* TODO: libnx bindings */ AMS_UNUSED(out); AMS_ABORT(); } - Result SetWakeEventActiveFlagSetForDebug(gpio::GpioPadName pad_name, bool is_enabled) { + Result SetWakeEventActiveFlagSetForDebugDeprecated(gpio::GpioPadName pad_name, bool is_enabled) { /* TODO: libnx bindings */ AMS_UNUSED(pad_name, is_enabled); AMS_ABORT(); @@ -63,19 +63,19 @@ namespace ams::gpio { AMS_ABORT(); } - Result OpenSession2(ams::sf::Out> out, DeviceCode device_code, ddsf::AccessMode access_mode); + Result OpenSession(ams::sf::Out> out, DeviceCode device_code, ddsf::AccessMode access_mode); - Result IsWakeEventActive2(ams::sf::Out out, DeviceCode device_code) { + Result IsWakeEventActive(ams::sf::Out out, DeviceCode device_code) { R_RETURN(::gpioIsWakeEventActive2(out.GetPointer(), device_code.GetInternalValue())); } - Result SetWakeEventActiveFlagSetForDebug2(DeviceCode device_code, bool is_enabled) { + Result SetWakeEventActiveFlagSetForDebug(DeviceCode device_code, bool is_enabled) { /* TODO: libnx bindings */ AMS_UNUSED(device_code, is_enabled); AMS_ABORT(); } - Result SetRetryValues(u32 arg0, u32 arg1) { + Result DumpStateForDebug(u32 arg0, u32 arg1) { /* TODO: libnx bindings */ AMS_UNUSED(arg0, arg1); AMS_ABORT(); diff --git a/libraries/libstratosphere/source/gpio/gpio_remote_pad_session_impl.hpp b/libraries/libstratosphere/source/gpio/gpio_remote_pad_session_impl.hpp index ee5874504..18f63d61e 100644 --- a/libraries/libstratosphere/source/gpio/gpio_remote_pad_session_impl.hpp +++ b/libraries/libstratosphere/source/gpio/gpio_remote_pad_session_impl.hpp @@ -28,7 +28,7 @@ namespace ams::gpio { ~RemotePadSessionImpl() { ::gpioPadClose(std::addressof(m_srv)); } public: /* Actual commands. */ - Result SetDirection(gpio::Direction direction) { + Result SetDirectionDeprecated(gpio::Direction direction) { R_RETURN(::gpioPadSetDirection(std::addressof(m_srv), static_cast<::GpioDirection>(static_cast(direction)))); } @@ -105,7 +105,30 @@ namespace ams::gpio { AMS_ABORT(); } - Result GetValueForSleepState(ams::sf::Out out) { + Result GetMaxDebounceTime(ams::sf::Out out) { + /* TODO: libnx bindings. */ + AMS_UNUSED(out); + AMS_ABORT(); + } + + Result SetDirectionInput() { + /* TODO: libnx bindings. */ + AMS_ABORT(); + } + + Result SetDirectionOutput(gpio::GpioValue value) { + /* TODO: libnx bindings. */ + AMS_UNUSED(value); + AMS_ABORT(); + } + + Result SetUnknownEnabled(bool enable) { + /* TODO: libnx bindings. */ + AMS_UNUSED(enable); + AMS_ABORT(); + } + + Result GetUnknownEnabled(ams::sf::Out out) { /* TODO: libnx bindings. */ AMS_UNUSED(out); AMS_ABORT(); diff --git a/libraries/libstratosphere/source/gpio/server/gpio_server_manager_impl.cpp b/libraries/libstratosphere/source/gpio/server/gpio_server_manager_impl.cpp index 226813219..052541bec 100644 --- a/libraries/libstratosphere/source/gpio/server/gpio_server_manager_impl.cpp +++ b/libraries/libstratosphere/source/gpio/server/gpio_server_manager_impl.cpp @@ -27,35 +27,35 @@ namespace ams::gpio::server { lmem::DestroyExpHeap(m_heap_handle); } - Result ManagerImpl::OpenSessionForDev(ams::sf::Out> out, s32 pad_descriptor) { + Result ManagerImpl::OpenSessionForDevDeprecated(ams::sf::Out> out, s32 pad_descriptor) { /* TODO */ AMS_UNUSED(out, pad_descriptor); AMS_ABORT(); } - Result ManagerImpl::OpenSession(ams::sf::Out> out, gpio::GpioPadName pad_name) { - R_RETURN(this->OpenSession2(out, ConvertToDeviceCode(pad_name), ddsf::AccessMode_ReadWrite)); + Result ManagerImpl::OpenSessionDeprecated(ams::sf::Out> out, gpio::GpioPadName pad_name) { + R_RETURN(this->OpenSession(out, ConvertToDeviceCode(pad_name), ddsf::AccessMode_ReadWrite)); } - Result ManagerImpl::OpenSessionForTest(ams::sf::Out> out, gpio::GpioPadName pad_name) { + Result ManagerImpl::OpenSessionForTestDeprecated(ams::sf::Out> out, gpio::GpioPadName pad_name) { /* TODO */ AMS_UNUSED(out, pad_name); AMS_ABORT(); } - Result ManagerImpl::IsWakeEventActive(ams::sf::Out out, gpio::GpioPadName pad_name) { + Result ManagerImpl::IsWakeEventActiveDeprecated(ams::sf::Out out, gpio::GpioPadName pad_name) { /* TODO */ AMS_UNUSED(out, pad_name); AMS_ABORT(); } - Result ManagerImpl::GetWakeEventActiveFlagSet(ams::sf::Out out) { + Result ManagerImpl::GetWakeEventActiveFlagSetDeprecated(ams::sf::Out out) { /* TODO */ AMS_UNUSED(out); AMS_ABORT(); } - Result ManagerImpl::SetWakeEventActiveFlagSetForDebug(gpio::GpioPadName pad_name, bool is_enabled) { + Result ManagerImpl::SetWakeEventActiveFlagSetForDebugDeprecated(gpio::GpioPadName pad_name, bool is_enabled) { /* TODO */ AMS_UNUSED(pad_name, is_enabled); AMS_ABORT(); @@ -67,7 +67,7 @@ namespace ams::gpio::server { AMS_ABORT(); } - Result ManagerImpl::OpenSession2(ams::sf::Out> out, DeviceCode device_code, ddsf::AccessMode access_mode) { + Result ManagerImpl::OpenSession(ams::sf::Out> out, DeviceCode device_code, ddsf::AccessMode access_mode) { /* Allocate a session. */ auto session = Factory::CreateSharedEmplaced(std::addressof(m_pad_allocator), this); @@ -79,19 +79,19 @@ namespace ams::gpio::server { R_SUCCEED(); } - Result ManagerImpl::IsWakeEventActive2(ams::sf::Out out, DeviceCode device_code) { + Result ManagerImpl::IsWakeEventActive(ams::sf::Out out, DeviceCode device_code) { /* TODO */ AMS_UNUSED(out, device_code); AMS_ABORT(); } - Result ManagerImpl::SetWakeEventActiveFlagSetForDebug2(DeviceCode device_code, bool is_enabled) { + Result ManagerImpl::SetWakeEventActiveFlagSetForDebug(DeviceCode device_code, bool is_enabled) { /* TODO */ AMS_UNUSED(device_code, is_enabled); AMS_ABORT(); } - Result ManagerImpl::SetRetryValues(u32 arg0, u32 arg1) { + Result ManagerImpl::DumpStateForDebug(u32 arg0, u32 arg1) { /* TODO */ AMS_UNUSED(arg0, arg1); AMS_ABORT(); diff --git a/libraries/libstratosphere/source/gpio/server/gpio_server_manager_impl.hpp b/libraries/libstratosphere/source/gpio/server/gpio_server_manager_impl.hpp index be5d862ab..2e51f0fda 100644 --- a/libraries/libstratosphere/source/gpio/server/gpio_server_manager_impl.hpp +++ b/libraries/libstratosphere/source/gpio/server/gpio_server_manager_impl.hpp @@ -33,17 +33,17 @@ namespace ams::gpio::server { ~ManagerImpl(); public: /* Actual commands. */ - Result OpenSessionForDev(ams::sf::Out> out, s32 pad_descriptor); - Result OpenSession(ams::sf::Out> out, gpio::GpioPadName pad_name); - Result OpenSessionForTest(ams::sf::Out> out, gpio::GpioPadName pad_name); - Result IsWakeEventActive(ams::sf::Out out, gpio::GpioPadName pad_name); - Result GetWakeEventActiveFlagSet(ams::sf::Out out); - Result SetWakeEventActiveFlagSetForDebug(gpio::GpioPadName pad_name, bool is_enabled); + Result OpenSessionForDevDeprecated(ams::sf::Out> out, s32 pad_descriptor); + Result OpenSessionDeprecated(ams::sf::Out> out, gpio::GpioPadName pad_name); + Result OpenSessionForTestDeprecated(ams::sf::Out> out, gpio::GpioPadName pad_name); + Result IsWakeEventActiveDeprecated(ams::sf::Out out, gpio::GpioPadName pad_name); + Result GetWakeEventActiveFlagSetDeprecated(ams::sf::Out out); + Result SetWakeEventActiveFlagSetForDebugDeprecated(gpio::GpioPadName pad_name, bool is_enabled); Result SetWakePinDebugMode(s32 mode); - Result OpenSession2(ams::sf::Out> out, DeviceCode device_code, ddsf::AccessMode access_mode); - Result IsWakeEventActive2(ams::sf::Out out, DeviceCode device_code); - Result SetWakeEventActiveFlagSetForDebug2(DeviceCode device_code, bool is_enabled); - Result SetRetryValues(u32 arg0, u32 arg1); + Result OpenSession(ams::sf::Out> out, DeviceCode device_code, ddsf::AccessMode access_mode); + Result IsWakeEventActive(ams::sf::Out out, DeviceCode device_code); + Result SetWakeEventActiveFlagSetForDebug(DeviceCode device_code, bool is_enabled); + Result DumpStateForDebug(u32 arg0, u32 arg1); }; static_assert(gpio::sf::IsIManager); diff --git a/libraries/libstratosphere/source/gpio/server/gpio_server_pad_session_impl.hpp b/libraries/libstratosphere/source/gpio/server/gpio_server_pad_session_impl.hpp index a1ce1e6a5..441534888 100644 --- a/libraries/libstratosphere/source/gpio/server/gpio_server_pad_session_impl.hpp +++ b/libraries/libstratosphere/source/gpio/server/gpio_server_pad_session_impl.hpp @@ -44,7 +44,7 @@ namespace ams::gpio::server { } public: /* Actual commands. */ - Result SetDirection(gpio::Direction direction) { + Result SetDirectionDeprecated(gpio::Direction direction) { /* Validate our state. */ AMS_ASSERT(m_has_session); @@ -205,7 +205,42 @@ namespace ams::gpio::server { AMS_ABORT(); } - Result GetValueForSleepState(ams::sf::Out out) { + Result GetMaxDebounceTime(ams::sf::Out out) { + /* Validate our state. */ + AMS_ASSERT(m_has_session); + + /* TODO */ + AMS_UNUSED(out); + AMS_ABORT(); + } + + Result SetDirectionInput() { + /* Validate our state. */ + AMS_ASSERT(m_has_session); + + /* TODO */ + AMS_ABORT(); + } + + Result SetDirectionOutput(gpio::GpioValue value) { + /* Validate our state. */ + AMS_ASSERT(m_has_session); + + /* TODO */ + AMS_UNUSED(value); + AMS_ABORT(); + } + + Result SetUnknownEnabled(bool enable) { + /* Validate our state. */ + AMS_ASSERT(m_has_session); + + /* TODO */ + AMS_UNUSED(enable); + AMS_ABORT(); + } + + Result GetUnknownEnabled(ams::sf::Out out) { /* Validate our state. */ AMS_ASSERT(m_has_session);