Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions nx/include/switch/kernel/svc.h
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ typedef enum {
/// Process Information.
typedef enum {
ProcessInfoType_ProcessState=0, ///<What state is a process in.
ProcessInfoType_Unknown1=1, ///< [23.0.0+] Only set on process Exit/Terminate (likely an exit tag).
} ProcessInfoType;

/// Process States.
Expand Down Expand Up @@ -179,6 +180,7 @@ typedef enum {
DebugThreadParam_IdealCore=2,
DebugThreadParam_CurrentCore=3,
DebugThreadParam_CoreMask=4,
DebugThreadParam_Unknown5=5, ///< [23.0.0+]
} DebugThreadParam;

/// GetInfo IDs.
Expand Down
2 changes: 2 additions & 0 deletions nx/include/switch/services/gpio.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,6 @@ Result gpioPadSetDebounceEnabled(GpioPadSession *p, bool en);
Result gpioPadGetDebounceEnabled(GpioPadSession *p, bool *out);
Result gpioPadSetDebounceTime(GpioPadSession *p, s32 ms);
Result gpioPadGetDebounceTime(GpioPadSession *p, s32 *out);
Result gpioPadSetUnknownEnabled(GpioPadSession *p, bool en); ///< [23.0.0+]
Result gpioPadGetUnknownEnabled(GpioPadSession *p, bool *out); ///< [23.0.0+]
void gpioPadClose(GpioPadSession *p);
12 changes: 12 additions & 0 deletions nx/source/services/gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,18 @@ Result gpioPadGetDebounceTime(GpioPadSession *p, s32 *out) {
return _gpioCmdNoInOutU32(&p->s, (u32 *)out, 15);
}

Result gpioPadSetUnknownEnabled(GpioPadSession *p, bool en) {
if (hosversionBefore(23,0,0))
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
return _gpioCmdInBoolNoOut(&p->s, en, 20);
}

Result gpioPadGetUnknownEnabled(GpioPadSession *p, bool *out) {
if (hosversionBefore(23,0,0))
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
return _gpioCmdNoInOutBool(&p->s, out, 21);
}

void gpioPadClose(GpioPadSession *p) {
serviceClose(&p->s);
}