wut  v1.7.0
Wii U Toolchain
sys.h
Go to the documentation of this file.
1 #pragma once
2 #include <wut.h>
3 #include <coreinit/time.h>
4 
12 #ifdef __cplusplus
13 extern "C" {
14 #endif
15 
17 
18 typedef enum CCRSysPairingState
19 {
27 
28 typedef enum CCRSysInitBootFlag
29 {
34 
35 typedef enum CCRSysLCDMode
36 {
43 
45 {
46  uint32_t state;
48  uint32_t progress;
49 };
50 
51 void
52 CCRSysInit(void);
53 
54 void
55 CCRSysExit(void);
56 
63 int32_t
65 
72 int32_t
74 
84 BOOL
85 __CCRSysDRCIsAttached(uint32_t drcSlot);
86 
99 int32_t
100 CCRSysStartPairing(uint32_t drcSlot,
101  uint32_t timeout);
102 
109 int32_t
111 
120 
131 int32_t
132 CCRSysGetPincode(uint32_t *pin);
133 
143 int32_t
145 
159 int32_t
160 CCRSysNeedsDRCFWUpdate(uint32_t drcSlot,
161  BOOL *outNeedsUpdate);
162 
179 int32_t
180 __CCRSysNeedsDRCFWUpdate(uint32_t drcSlot,
181  BOOL *outNeedsUpdate,
182  BOOL allowDowngrade);
183 
197 int32_t
198 CCRSysDRCFWUpdate(uint32_t drcSlot);
199 
218 int32_t
219 __CCRSysDRCFWUpdate(uint32_t drcSlot,
220  BOOL allowDowngrade);
221 
222 
226 void
228 
235 void
237 
244 void
245 __CCRSysInitReattach(uint32_t drcSlot);
246 
257 int32_t
258 __CCRSysWaitReattach(uint32_t drcSlot,
259  BOOL unknown);
260 
270 int32_t
271 CCRSysGetVersionCheckFlag(uint32_t *outFlag);
272 
282 int32_t
284 
285 int32_t
287 
288 int32_t
290 
295 int32_t
297 
302 int32_t
304 
309 int32_t
311 
312 #ifdef __cplusplus
313 }
314 #endif
315 
int64_t OSTime
Definition: time.h:18
uint32_t state
Definition: sys.h:46
uint32_t progress
Progress from 0-100.
Definition: sys.h:48
int32_t CCRSysInvalidatePairing(void)
Invalidate the DRC pairing in slot 0.
int32_t CCRSysGetPincode(uint32_t *pin)
Gets the pin code used for pairing in decimal representation.
int32_t CCRSysSetSystemTime(OSTime time)
Sets the DRH system time.
CCRSysInitBootFlag
Definition: sys.h:29
int32_t __CCRSysWaitReattach(uint32_t drcSlot, BOOL unknown)
Wait for the DRC to reattach.
void CCRSysInit(void)
int32_t CCRSysCaffeineSetCaffeineSlot(uint32_t slot)
void __CCRSysInitReattach(uint32_t drcSlot)
Initialize a DRC reattach.
void CCRSysGetUpdateState(CCRSysUpdateState *outUpdateState)
Get the update state during a pending DRC firmware update.
int32_t CCRSysStartPairing(uint32_t drcSlot, uint32_t timeout)
Starts the pairing process for the specified slot.
CCRSysPairingState CCRSysGetPairingState(void)
Gets the current pairing state.
CCRSysLCDMode
Definition: sys.h:36
void CCRSysExit(void)
int32_t CCRSysInitializeSettings()
Resets the DRC (It'll show "Turn on the TV and Wii U console" until paired)
int32_t CCRSysNeedsDRCFWUpdate(uint32_t drcSlot, BOOL *outNeedsUpdate)
Check if a DRC firmware update is needed.
int32_t CCRSysSetInitBootFlag(CCRSysInitBootFlag flag)
int32_t CCRSysStopPairing(void)
Stops the pairing process.
int32_t CCRSysGetCurrentLCDMode(CCRSysLCDMode *mode)
Gets the brightness of the DRC.
int32_t CCRSysSetVersionCheckFlag(uint32_t flag)
Set the version check flag.
BOOL __CCRSysDRCIsAttached(uint32_t drcSlot)
Check if the DRC in the specified slot is attached.
int32_t CCRSysDRCShutdown(void)
Shutdown the DRC in slot 0.
int32_t __CCRSysNeedsDRCFWUpdate(uint32_t drcSlot, BOOL *outNeedsUpdate, BOOL allowDowngrade)
Check if a DRC firmware update is needed.
int32_t __CCRSysDRCFWUpdate(uint32_t drcSlot, BOOL allowDowngrade)
Starts a DRC firmware update if necessary.
CCRSysPairingState
Definition: sys.h:19
void CCRSysDRCFWUpdateForward(void)
Finish a pending DRC firmware update.
int32_t CCRSysGetVersionCheckFlag(uint32_t *outFlag)
Get the version check flag.
int32_t CCRSysDRCFWUpdate(uint32_t drcSlot)
Starts a DRC firmware update if necessary and region matches.
int32_t CCRSysSetCurrentLCDMode(CCRSysLCDMode mode)
Sets the brightness of the DRC.
@ CCR_SYS_BOOT_FLAG_NONE
Definition: sys.h:30
@ CCR_SYS_BOOT_FLAG_FIRST_BOOT
Shows "Turn on the TV and Wii U Console.." text on next DRC boot.
Definition: sys.h:32
@ CCR_SYS_LCD_MODE_BRIGHTNESS_5
Definition: sys.h:41
@ CCR_SYS_LCD_MODE_BRIGHTNESS_4
Definition: sys.h:40
@ CCR_SYS_LCD_MODE_BRIGHTNESS_2
Definition: sys.h:38
@ CCR_SYS_LCD_MODE_BRIGHTNESS_1
Definition: sys.h:37
@ CCR_SYS_LCD_MODE_BRIGHTNESS_3
Definition: sys.h:39
@ CCR_SYS_PAIRING_IN_PROGRESS
Pairing is in progress.
Definition: sys.h:23
@ CCR_SYS_PAIRING_TIMED_OUT
Pairing timed out.
Definition: sys.h:25
@ CCR_SYS_PAIRING_FINISHED
Pairing is complete / hasn't started yet.
Definition: sys.h:21
int32_t BOOL
Definition: wut_types.h:7