mirror of
https://github.com/wiiu-env/wut.git
synced 2024-12-05 03:04:16 +01:00
Fix formatting.
Maybe we should start using clang-format for wut.
This commit is contained in:
parent
e2e877decd
commit
7492ff0483
@ -193,7 +193,7 @@ ICInvalidateRange(void *addr,
|
|||||||
uint32_t size);
|
uint32_t size);
|
||||||
|
|
||||||
void
|
void
|
||||||
OSMemoryBarrier(void);
|
OSMemoryBarrier();
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
@ -13,17 +13,17 @@ extern "C" {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
typedef enum COSReportLevel{
|
typedef enum COSReportLevel{
|
||||||
COS_REPORT_LEVEL_ERROR = 0,
|
COS_REPORT_LEVEL_ERROR = 0,
|
||||||
COS_REPORT_LEVEL_WARN = 1,
|
COS_REPORT_LEVEL_WARN = 1,
|
||||||
COS_REPORT_LEVEL_INFO = 2,
|
COS_REPORT_LEVEL_INFO = 2,
|
||||||
COS_REPORT_LEVEL_VERBOSE = 3
|
COS_REPORT_LEVEL_VERBOSE = 3,
|
||||||
} COSReportLevel;
|
} COSReportLevel;
|
||||||
|
|
||||||
typedef enum COSReportModule{
|
typedef enum COSReportModule{
|
||||||
COS_REPORT_MODULE_UNKNOWN_0 = 0,
|
COS_REPORT_MODULE_UNKNOWN_0 = 0,
|
||||||
COS_REPORT_MODULE_UNKNOWN_1 = 1,
|
COS_REPORT_MODULE_UNKNOWN_1 = 1,
|
||||||
COS_REPORT_MODULE_UNKNOWN_2 = 2,
|
COS_REPORT_MODULE_UNKNOWN_2 = 2,
|
||||||
COS_REPORT_MODULE_UNKNOWN_5 = 5
|
COS_REPORT_MODULE_UNKNOWN_5 = 5,
|
||||||
} COSReportModule;
|
} COSReportModule;
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -56,4 +56,4 @@ COSWarn(COSReportModule module,
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/** @} */
|
/** @} */
|
||||||
|
@ -14,24 +14,24 @@ extern "C" {
|
|||||||
|
|
||||||
typedef enum OSMemoryType
|
typedef enum OSMemoryType
|
||||||
{
|
{
|
||||||
OS_MEM1 = 1,
|
OS_MEM1 = 1,
|
||||||
OS_MEM2 = 2,
|
OS_MEM2 = 2,
|
||||||
} OSMemoryType;
|
} OSMemoryType;
|
||||||
|
|
||||||
typedef enum OSSharedDataType
|
typedef enum OSSharedDataType
|
||||||
{
|
{
|
||||||
OS_SHAREDDATATYPE_FONT_CHINESE = 0,
|
OS_SHAREDDATATYPE_FONT_CHINESE = 0,
|
||||||
OS_SHAREDDATATYPE_FONT_KOREAN = 1,
|
OS_SHAREDDATATYPE_FONT_KOREAN = 1,
|
||||||
OS_SHAREDDATATYPE_FONT_STANDARD = 2,
|
OS_SHAREDDATATYPE_FONT_STANDARD = 2,
|
||||||
OS_SHAREDDATATYPE_FONT_TAIWANESE = 3,
|
OS_SHAREDDATATYPE_FONT_TAIWANESE = 3,
|
||||||
OS_SHAREDDATATYPE_FONT_MAX = 4
|
OS_SHAREDDATATYPE_FONT_MAX = 4,
|
||||||
} OSSharedDataType;
|
} OSSharedDataType;
|
||||||
|
|
||||||
BOOL
|
BOOL
|
||||||
OSGetSharedData(OSSharedDataType type,
|
OSGetSharedData(OSSharedDataType type,
|
||||||
uint32_t unk_r4,
|
uint32_t unk_r4,
|
||||||
void** outPtr,
|
void **outPtr,
|
||||||
uint32_t* outSize);
|
uint32_t *outSize);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Moves chunks of memory around, similarly to memmove. Overlapping source and
|
* Moves chunks of memory around, similarly to memmove. Overlapping source and
|
||||||
@ -152,10 +152,10 @@ OSMemoryBarrier();
|
|||||||
/**
|
/**
|
||||||
* Zeros the memory for a given proccessID.
|
* Zeros the memory for a given proccessID.
|
||||||
* Works only inside the ROOT process.
|
* Works only inside the ROOT process.
|
||||||
*
|
**/
|
||||||
**/
|
|
||||||
void
|
void
|
||||||
__OSZeroProcessMemory(uint32_t proccesID);
|
__OSZeroProcessMemory(uint32_t proccesID);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -15,90 +15,90 @@ extern "C" {
|
|||||||
|
|
||||||
typedef int32_t UCError;
|
typedef int32_t UCError;
|
||||||
typedef struct UCSysConfig UCSysConfig;
|
typedef struct UCSysConfig UCSysConfig;
|
||||||
typedef struct UCAsyncParams UCAsyncParams ;
|
typedef struct UCAsyncParams UCAsyncParams;
|
||||||
|
|
||||||
typedef enum UCCommand
|
typedef enum UCCommand
|
||||||
{
|
{
|
||||||
UC_CMD_READ_SYS_CONFIG = 0x30,
|
UC_CMD_READ_SYS_CONFIG = 0x30,
|
||||||
UC_CMD_WRITE_SYS_CONFIG = 0x31,
|
UC_CMD_WRITE_SYS_CONFIG = 0x31,
|
||||||
UC_CMD_DELETE_SYS_CONFIG = 0x32,
|
UC_CMD_DELETE_SYS_CONFIG = 0x32,
|
||||||
UC_CMD_QUERY_SYS_CONFIG = 0x33,
|
UC_CMD_QUERY_SYS_CONFIG = 0x33,
|
||||||
UC_CMD_LIST_SYS_CONFIG = 0x34
|
UC_CMD_LIST_SYS_CONFIG = 0x34,
|
||||||
} UCCommand;
|
} UCCommand;
|
||||||
|
|
||||||
typedef enum UCDataType
|
typedef enum UCDataType
|
||||||
{
|
{
|
||||||
UC_DATATYPE_UNDEFINED = 0x00,
|
UC_DATATYPE_UNDEFINED = 0x00,
|
||||||
UC_DATATYPE_UNSIGNED_BYTE = 0x01,
|
UC_DATATYPE_UNSIGNED_BYTE = 0x01,
|
||||||
UC_DATATYPE_UNSIGNED_SHORT = 0x02,
|
UC_DATATYPE_UNSIGNED_SHORT = 0x02,
|
||||||
UC_DATATYPE_UNSIGNED_INT = 0x03,
|
UC_DATATYPE_UNSIGNED_INT = 0x03,
|
||||||
UC_DATATYPE_SIGNED_INT = 0x04,
|
UC_DATATYPE_SIGNED_INT = 0x04,
|
||||||
UC_DATATYPE_FLOAT = 0x05,
|
UC_DATATYPE_FLOAT = 0x05,
|
||||||
UC_DATATYPE_STRING = 0x06,
|
UC_DATATYPE_STRING = 0x06,
|
||||||
UC_DATATYPE_HEXBINARY = 0x07,
|
UC_DATATYPE_HEXBINARY = 0x07,
|
||||||
UC_DATATYPE_COMPLEX = 0x08,
|
UC_DATATYPE_COMPLEX = 0x08,
|
||||||
UC_DATATYPE_INVALID = 0xFF
|
UC_DATATYPE_INVALID = 0xFF,
|
||||||
} UCDataType;
|
} UCDataType;
|
||||||
|
|
||||||
typedef enum UCErrors
|
typedef enum UCErrors
|
||||||
{
|
{
|
||||||
UC_ERROR_OK = 0,
|
UC_ERROR_OK = 0,
|
||||||
UC_ERROR_ERROR = -1,
|
UC_ERROR_ERROR = -1,
|
||||||
UC_ERROR_OTHER = -0x200001,
|
UC_ERROR_OTHER = -0x200001,
|
||||||
UC_ERROR_SYSTEM = -0x200002,
|
UC_ERROR_SYSTEM = -0x200002,
|
||||||
UC_ERROR_ALLOC = -0x200003,
|
UC_ERROR_ALLOC = -0x200003,
|
||||||
UC_ERROR_OPCODE = -0x200004,
|
UC_ERROR_OPCODE = -0x200004,
|
||||||
UC_ERROR_INVALID_PARAM = -0x200005,
|
UC_ERROR_INVALID_PARAM = -0x200005,
|
||||||
UC_ERROR_INVALID_TYPE = -0x200006,
|
UC_ERROR_INVALID_TYPE = -0x200006,
|
||||||
UC_ERROR_UNSUPPORTED = -0x200007,
|
UC_ERROR_UNSUPPORTED = -0x200007,
|
||||||
UC_ERROR_NON_LEAF_NODE = -0x200008,
|
UC_ERROR_NON_LEAF_NODE = -0x200008,
|
||||||
UC_ERROR_KEY_NOT_FOUND = -0x200009,
|
UC_ERROR_KEY_NOT_FOUND = -0x200009,
|
||||||
UC_ERROR_MODIFY = -0x20000A,
|
UC_ERROR_MODIFY = -0x20000A,
|
||||||
UC_ERROR_STRING_TOO_LONG = -0x20000B,
|
UC_ERROR_STRING_TOO_LONG = -0x20000B,
|
||||||
UC_ERROR_ROOT_KEYS_DIFFER = -0x20000C,
|
UC_ERROR_ROOT_KEYS_DIFFER = -0x20000C,
|
||||||
UC_ERROR_INVALID_LOCATION = -0x20000D,
|
UC_ERROR_INVALID_LOCATION = -0x20000D,
|
||||||
UC_ERROR_BAD_COMMENT = -0x20000E,
|
UC_ERROR_BAD_COMMENT = -0x20000E,
|
||||||
UC_ERROR_READ_ACCESS = -0x20000F,
|
UC_ERROR_READ_ACCESS = -0x20000F,
|
||||||
UC_ERROR_WRITE_ACCESS = -0x200010,
|
UC_ERROR_WRITE_ACCESS = -0x200010,
|
||||||
UC_ERROR_CREATE_ACCESS = -0x200011,
|
UC_ERROR_CREATE_ACCESS = -0x200011,
|
||||||
UC_ERROR_FILE_SYS_NAME = -0x200012,
|
UC_ERROR_FILE_SYS_NAME = -0x200012,
|
||||||
UC_ERROR_FILE_SYS_INIT = -0x200013,
|
UC_ERROR_FILE_SYS_INIT = -0x200013,
|
||||||
UC_ERROR_FILE_SYS_MOUNT = -0x200014,
|
UC_ERROR_FILE_SYS_MOUNT = -0x200014,
|
||||||
UC_ERROR_FILE_OPEN = -0x200015,
|
UC_ERROR_FILE_OPEN = -0x200015,
|
||||||
UC_ERROR_FILE_STAT = -0x200016,
|
UC_ERROR_FILE_STAT = -0x200016,
|
||||||
UC_ERROR_FILE_READ = -0x200017,
|
UC_ERROR_FILE_READ = -0x200017,
|
||||||
UC_ERROR_FILE_WRITE = -0x200018,
|
UC_ERROR_FILE_WRITE = -0x200018,
|
||||||
UC_ERROR_FILE_TOO_BIG = -0x200019,
|
UC_ERROR_FILE_TOO_BIG = -0x200019,
|
||||||
UC_ERROR_FILE_REMOVE = -0x20001A,
|
UC_ERROR_FILE_REMOVE = -0x20001A,
|
||||||
UC_ERROR_FILE_RENAME = -0x20001B,
|
UC_ERROR_FILE_RENAME = -0x20001B,
|
||||||
UC_ERROR_FILE_CLOSE = -0x20001C,
|
UC_ERROR_FILE_CLOSE = -0x20001C,
|
||||||
UC_ERROR_FILE_SEEK = -0x20001D,
|
UC_ERROR_FILE_SEEK = -0x20001D,
|
||||||
UC_ERROR_FILE_CONFIRM = -0x20001E,
|
UC_ERROR_FILE_CONFIRM = -0x20001E,
|
||||||
UC_ERROR_FILE_BACKUP = -0x20001F,
|
UC_ERROR_FILE_BACKUP = -0x20001F,
|
||||||
UC_ERROR_MALFORMED_XML = -0x200020,
|
UC_ERROR_MALFORMED_XML = -0x200020,
|
||||||
UC_ERROR_VERSION = -0x200021,
|
UC_ERROR_VERSION = -0x200021,
|
||||||
UC_ERROR_NO_IPC_BUFFERS = -0x200022,
|
UC_ERROR_NO_IPC_BUFFERS = -0x200022,
|
||||||
UC_ERROR_FILE_LOCK_NEEDED = -0x200024,
|
UC_ERROR_FILE_LOCK_NEEDED = -0x200024,
|
||||||
UC_ERROR_SYS_PROT = -0x200028
|
UC_ERROR_SYS_PROT = -0x200028,
|
||||||
} UCErrors;
|
} UCErrors;
|
||||||
|
|
||||||
typedef enum UCFileSys
|
typedef enum UCFileSys
|
||||||
{
|
{
|
||||||
UC_FILE_SYS_INVALID = 0x00,
|
UC_FILE_SYS_INVALID = 0x00,
|
||||||
UC_FILE_SYS_SYS = 0x01,
|
UC_FILE_SYS_SYS = 0x01,
|
||||||
UC_FILE_SYS_SLC = 0x02,
|
UC_FILE_SYS_SLC = 0x02,
|
||||||
UC_FILE_SYS_RAM = 0x03
|
UC_FILE_SYS_RAM = 0x03,
|
||||||
} UCFileSys;
|
} UCFileSys;
|
||||||
|
|
||||||
#pragma pack(push, 1)
|
#pragma pack(push, 1)
|
||||||
struct UCSysConfig
|
struct UCSysConfig
|
||||||
{
|
{
|
||||||
char name[64];
|
char name[64];
|
||||||
uint32_t access;
|
uint32_t access;
|
||||||
UCDataType dataType;
|
UCDataType dataType;
|
||||||
UCError error;
|
UCError error;
|
||||||
uint32_t dataSize;
|
uint32_t dataSize;
|
||||||
void* data;
|
void *data;
|
||||||
};
|
};
|
||||||
#pragma pack(pop)
|
#pragma pack(pop)
|
||||||
WUT_CHECK_OFFSET(UCSysConfig, 0x00, name);
|
WUT_CHECK_OFFSET(UCSysConfig, 0x00, name);
|
||||||
@ -112,18 +112,18 @@ WUT_CHECK_SIZE(UCSysConfig, 0x54);
|
|||||||
typedef void (*UCAsyncCallbackFn)(UCError result,
|
typedef void (*UCAsyncCallbackFn)(UCError result,
|
||||||
UCCommand command,
|
UCCommand command,
|
||||||
uint32_t count,
|
uint32_t count,
|
||||||
UCSysConfig* settings,
|
UCSysConfig *settings,
|
||||||
void* context);
|
void *context);
|
||||||
#pragma pack(push, 1)
|
#pragma pack(push, 1)
|
||||||
struct UCAsyncParams
|
struct UCAsyncParams
|
||||||
{
|
{
|
||||||
UCAsyncCallbackFn callback;
|
UCAsyncCallbackFn callback;
|
||||||
void * context;
|
void *context;
|
||||||
UCCommand command;
|
UCCommand command;
|
||||||
uint32_t unk0x0C;
|
uint32_t unk0x0C;
|
||||||
uint32_t count;
|
uint32_t count;
|
||||||
UCSysConfig* settings;
|
UCSysConfig *settings;
|
||||||
IOSVec* vecs;
|
IOSVec *vecs;
|
||||||
};
|
};
|
||||||
#pragma pack(pop)
|
#pragma pack(pop)
|
||||||
WUT_CHECK_OFFSET(UCAsyncParams, 0x00, callback);
|
WUT_CHECK_OFFSET(UCAsyncParams, 0x00, callback);
|
||||||
@ -144,38 +144,38 @@ UCClose(IOSHandle handle);
|
|||||||
UCError
|
UCError
|
||||||
UCDeleteSysConfig(int32_t handle,
|
UCDeleteSysConfig(int32_t handle,
|
||||||
uint32_t count,
|
uint32_t count,
|
||||||
UCSysConfig* settings);
|
UCSysConfig *settings);
|
||||||
|
|
||||||
UCError
|
UCError
|
||||||
UCDeleteSysConfigAsync(int32_t handle,
|
UCDeleteSysConfigAsync(int32_t handle,
|
||||||
uint32_t count,
|
uint32_t count,
|
||||||
UCSysConfig* settings,
|
UCSysConfig *settings,
|
||||||
UCAsyncParams* asyncParams);
|
UCAsyncParams *asyncParams);
|
||||||
|
|
||||||
UCError
|
UCError
|
||||||
UCReadSysConfig(int32_t handle,
|
UCReadSysConfig(int32_t handle,
|
||||||
uint32_t count,
|
uint32_t count,
|
||||||
UCSysConfig* settings);
|
UCSysConfig *settings);
|
||||||
|
|
||||||
UCError
|
UCError
|
||||||
UCReadSysConfigAsync(int32_t handle,
|
UCReadSysConfigAsync(int32_t handle,
|
||||||
uint32_t count,
|
uint32_t count,
|
||||||
UCSysConfig* settings,
|
UCSysConfig *settings,
|
||||||
UCAsyncParams* asyncParams);
|
UCAsyncParams *asyncParams);
|
||||||
|
|
||||||
UCError
|
UCError
|
||||||
UCWriteSysConfig(int32_t handle,
|
UCWriteSysConfig(int32_t handle,
|
||||||
uint32_t count,
|
uint32_t count,
|
||||||
UCSysConfig* settings);
|
UCSysConfig *settings);
|
||||||
|
|
||||||
UCError
|
UCError
|
||||||
UCWriteSysConfigAsync(int32_t handle,
|
UCWriteSysConfigAsync(int32_t handle,
|
||||||
uint32_t count,
|
uint32_t count,
|
||||||
UCSysConfig* settings,
|
UCSysConfig *settings,
|
||||||
UCAsyncParams* asyncParams);
|
UCAsyncParams *asyncParams);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/** @} */
|
/** @} */
|
||||||
|
@ -15,14 +15,14 @@ extern "C" {
|
|||||||
//! DMAE Memory endian swappng mode.
|
//! DMAE Memory endian swappng mode.
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
//! No memory swapping.
|
//! No memory swapping.
|
||||||
DMAE_SWAP_NONE = 0,
|
DMAE_SWAP_NONE = 0,
|
||||||
//! 16 bit memory swapping.
|
//! 16 bit memory swapping.
|
||||||
DMAE_SWAP_16 = 1,
|
DMAE_SWAP_16 = 1,
|
||||||
//! 32 bit memory swapping.
|
//! 32 bit memory swapping.
|
||||||
DMAE_SWAP_32 = 2,
|
DMAE_SWAP_32 = 2,
|
||||||
//! 64 bit memory swapping.
|
//! 64 bit memory swapping.
|
||||||
DMAE_SWAP_64 = 3,
|
DMAE_SWAP_64 = 3,
|
||||||
} DMAESwapMode;
|
} DMAESwapMode;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -68,7 +68,7 @@ DMAETimeStamp
|
|||||||
DMAEFillMem(void *dst,
|
DMAEFillMem(void *dst,
|
||||||
uint32_t val,
|
uint32_t val,
|
||||||
uint32_t wordCount);
|
uint32_t wordCount);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Starts a DMAE fill operation for a physical address.
|
* Starts a DMAE fill operation for a physical address.
|
||||||
*
|
*
|
||||||
@ -86,8 +86,8 @@ DMAEFillMem(void *dst,
|
|||||||
*/
|
*/
|
||||||
DMAETimeStamp
|
DMAETimeStamp
|
||||||
DMAEFillMemPhys(void *dst,
|
DMAEFillMemPhys(void *dst,
|
||||||
uint32_t val,
|
uint32_t val,
|
||||||
uint32_t wordCount);
|
uint32_t wordCount);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user