uOFW
Reverse engineered PSP kernel 6.60.
Loading...
Searching...
No Matches
types.h
1/* Copyright (C) 2011, 2012, 2013 The uOFW team
2 See the file COPYING for copying permission.
3*/
4
5#ifndef TYPES_H
6#define TYPES_H
7
8#include <stdint.h>
9
10/*
11 * Define NULL if not already defined
12 */
13
14#ifndef NULL
15# define NULL ((void*)0)
16#endif
17
18/*
19 * Shorter and more precise type names
20 */
21
22/* Unsigned */
23typedef uint8_t u8;
24typedef uint16_t u16;
25typedef uint32_t u32;
26typedef uint64_t u64;
27
28/* Signed */
29typedef int8_t s8;
30typedef int16_t s16;
31typedef int32_t s32;
32typedef int64_t s64;
33
34/* Volatile (should be used for hardware addresses) unsigned */
35
36typedef volatile uint8_t vu8;
37typedef volatile uint16_t vu16;
38typedef volatile uint32_t vu32;
39typedef volatile uint64_t vu64;
40
41/* Volatile signed */
42typedef volatile int8_t vs8;
43typedef volatile int16_t vs16;
44typedef volatile int32_t vs32;
45typedef volatile int64_t vs64;
46
47/*
48 * Kernel types
49 */
50
51/* ID of most kernel objects */
52typedef s32 SceUID;
53#define SCE_UID_NAME_LEN 31 /* Maximum name length of a kernel object. */
54
55/* Size, unsigned or signed (for memory blocks, etc.) */
56typedef u32 SceSize;
57typedef s32 SceSSize;
58
59/* Types used by some modules */
60typedef u8 SceUChar;
61typedef u8 SceUChar8;
62typedef u16 SceUShort16;
63typedef u32 SceUInt;
64typedef u32 SceUInt32;
65typedef u64 SceUInt64;
66typedef u64 SceULong64;
67
68typedef u8 SceChar8;
69typedef u16 SceShort16;
70typedef u32 SceInt32;
71typedef s64 SceInt64;
72typedef s64 SceLong64;
73
74typedef s32 SceFloat;
75typedef s32 SceFloat32;
76
77typedef u16 SceWChar16;
78typedef u32 SceWChar32;
79
80#define SCE_FALSE (0)
81#define SCE_TRUE (1)
82typedef s32 SceBool;
83
84typedef void SceVoid;
85typedef void * ScePVoid;
86
87/* Permission mode when creating a file (in octal, like the chmod function and UNIX command) */
88typedef s32 SceMode;
89/* An offset inside a file */
90typedef SceInt64 SceOff;
91
92#endif
93