NSMBW-Decomp
A decompilation of New Super Mario Bros. Wii
Loading...
Searching...
No Matches
NWC24Ipc.h
1#ifndef RVL_SDK_NWC24_IPC_H
2#define RVL_SDK_NWC24_IPC_H
3#include <types.h>
4
5#include <revolution/NWC24/NWC24Types.h>
6
7#include <revolution/IPC.h>
8#ifdef __cplusplus
9extern "C" {
10#endif
11
12NWC24Err NWC24iOpenResourceManager(const char* user, const char* name,
13 s32* fdOut, IPCOpenMode mode);
14NWC24Err NWC24iCloseResourceManager(const char* user, s32 fd);
15
16NWC24Err NWC24iIoctlResourceManager(const char* user, s32 fd, s32 type,
17 void* in, s32 inSize, void* out,
18 s32 outSize);
19NWC24Err NWC24iIoctlResourceManagerAsync(const char* user, s32 fd, s32 type,
20 void* in, s32 inSize, void* out,
21 s32 outSize, void* callbackArg);
22
23BOOL NWC24iIsAsyncRequestPending(void);
24
25/**
26 * Macros to supply name of caller
27 */
28
29// clang-format off
30#define NWC24_OPEN_DEVICE(name, fdOut, mode) \
31 NWC24iOpenResourceManager(__FUNCTION__, name, fdOut, mode)
32
33#define NWC24_CLOSE_DEVICE(fd) \
34 NWC24iCloseResourceManager(__FUNCTION__, fd)
35
36#define NWC24_IOCTL_DEVICE(fd, type, in, inSize, out, outSize) \
37 NWC24iIoctlResourceManager(__FUNCTION__, fd, type, in, inSize, out, outSize)
38
39#define NWC24_IOCTL_DEVICE_ASYNC(fd, type, in, inSize, out, outSize, callbackArg) \
40 NWC24iIoctlResourceManagerAsync(__FUNCTION__, fd, type, in, inSize, out, outSize, callbackArg)
41// clang-format on
42
43#ifdef __cplusplus
44}
45#endif
46#endif