Add missing functions that use ndmDaemonMask
This commit is contained in:
parent
43bef52068
commit
f4ea19b66e
@ -39,10 +39,10 @@ typedef enum {
|
||||
|
||||
/// Used to specify multiple daemons.
|
||||
typedef enum {
|
||||
DAEMON_MASK_CEC = 1 << DAEMON_CEC,
|
||||
DAEMON_MASK_BOSS = 1 << DAEMON_BOSS,
|
||||
DAEMON_MASK_NIM = 1 << DAEMON_NIM,
|
||||
DAEMON_MASK_FRIENDS = 1 << DAEMON_FRIENDS,
|
||||
DAEMON_MASK_CEC = BIT(DAEMON_CEC),
|
||||
DAEMON_MASK_BOSS = BIT(DAEMON_BOSS),
|
||||
DAEMON_MASK_NIM = BIT(DAEMON_NIM),
|
||||
DAEMON_MASK_FRIENDS = BIT(DAEMON_FRIENDS),
|
||||
} ndmDaemonMask;
|
||||
|
||||
// Daemon status.
|
||||
@ -80,6 +80,18 @@ Result NDMU_LockState(void);
|
||||
/// Unlocks the exclusive state.
|
||||
Result NDMU_UnlockState(void);
|
||||
|
||||
/**
|
||||
* @brief Suspends network daemon.
|
||||
* @param mask The specified daemon.
|
||||
*/
|
||||
Result NDMU_SuspendDaemons(ndmDaemonMask mask);
|
||||
|
||||
/**
|
||||
* @brief Resumes network daemon.
|
||||
* @param mask The specified daemon.
|
||||
*/
|
||||
Result NDMU_ResumeDaemons(ndmDaemonMask mask);
|
||||
|
||||
/**
|
||||
* @brief Suspends scheduling for all network daemons.
|
||||
* @param flag 0 = Wait for completion, 1 = Perform in background.
|
||||
@ -122,6 +134,12 @@ Result NDMU_GetRetryInterval(u32 *interval);
|
||||
/// Reverts network daemon to defaults.
|
||||
Result NDMU_ResetDaemons(void);
|
||||
|
||||
/**
|
||||
* @brief Gets the current default daemon bit mask.
|
||||
* @param interval Pointer to write the default daemon mask value to. The default value is (DAEMONMASK_CEC | DAEMONMASK_FRIENDS)
|
||||
*/
|
||||
Result NDMU_GetDefaultDaemons(ndmDaemonMask *mask)
|
||||
|
||||
/// Clears half awake mac filter.
|
||||
Result NDMU_ClearMacFilter(void);
|
||||
|
||||
|
@ -100,6 +100,32 @@ Result NDMU_UnlockState(void)
|
||||
return (Result)cmdbuf[1];
|
||||
}
|
||||
|
||||
Result NDMU_SuspendDaemons(ndmDaemonMask mask)
|
||||
{
|
||||
u32* cmdbuf=getThreadCommandBuffer();
|
||||
|
||||
cmdbuf[0]=IPC_MakeHeader(0x6,1,0); // 0x60040
|
||||
cmdbuf[1]=mask;
|
||||
|
||||
Result ret=0;
|
||||
if(R_FAILED(ret=svcSendSyncRequest(ndmuHandle)))return ret;
|
||||
|
||||
return (Result)cmdbuf[1];
|
||||
}
|
||||
|
||||
Result NDMU_ResumeDaemons(ndmDaemonMask mask)
|
||||
{
|
||||
u32* cmdbuf=getThreadCommandBuffer();
|
||||
|
||||
cmdbuf[0]=IPC_MakeHeader(0x7,1,0); // 0x70040
|
||||
cmdbuf[1]=mask;
|
||||
|
||||
Result ret=0;
|
||||
if(R_FAILED(ret=svcSendSyncRequest(ndmuHandle)))return ret;
|
||||
|
||||
return (Result)cmdbuf[1];
|
||||
}
|
||||
|
||||
Result NDMU_SuspendScheduler(u32 flag)
|
||||
{
|
||||
u32* cmdbuf=getThreadCommandBuffer();
|
||||
@ -206,6 +232,20 @@ Result NDMU_ResetDaemons(void)
|
||||
return (Result)cmdbuf[1];
|
||||
}
|
||||
|
||||
Result NDMU_GetDefaultDaemons(ndmDaemonMask *mask)
|
||||
{
|
||||
u32* cmdbuf=getThreadCommandBuffer();
|
||||
|
||||
cmdbuf[0]=IPC_MakeHeader(0x16,0,0); // 0x160000
|
||||
|
||||
Result ret=0;
|
||||
if(R_FAILED(ret=svcSendSyncRequest(ndmuHandle)))return ret;
|
||||
|
||||
*mask = cmdbuf[2];
|
||||
|
||||
return (Result)cmdbuf[1];
|
||||
}
|
||||
|
||||
Result NDMU_ClearMacFilter(void)
|
||||
{
|
||||
u32* cmdbuf=getThreadCommandBuffer();
|
||||
|
Loading…
Reference in New Issue
Block a user