wut  v1.5.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 
29 {
30  uint32_t state;
32  uint32_t progress;
33 };
34 
35 void
36 CCRSysInit(void);
37 
38 void
39 CCRSysExit(void);
40 
47 int32_t
49 
56 int32_t
58 
68 BOOL
69 __CCRSysDRCIsAttached(uint32_t drcSlot);
70 
83 int32_t
84 CCRSysStartPairing(uint32_t drcSlot,
85  uint32_t timeout);
86 
93 int32_t
95 
104 
115 int32_t
116 CCRSysGetPincode(uint32_t *pin);
117 
127 int32_t
129 
143 int32_t
144 CCRSysNeedsDRCFWUpdate(uint32_t drcSlot,
145  BOOL *outNeedsUpdate);
146 
163 int32_t
164 __CCRSysNeedsDRCFWUpdate(uint32_t drcSlot,
165  BOOL *outNeedsUpdate,
166  BOOL allowDowngrade);
167 
181 int32_t
182 CCRSysDRCFWUpdate(uint32_t drcSlot);
183 
202 int32_t
203 __CCRSysDRCFWUpdate(uint32_t drcSlot,
204  BOOL allowDowngrade);
205 
206 
210 void
212 
219 void
221 
228 void
229 __CCRSysInitReattach(uint32_t drcSlot);
230 
241 int32_t
242 __CCRSysWaitReattach(uint32_t drcSlot,
243  BOOL unknown);
244 
254 int32_t
255 CCRSysGetVersionCheckFlag(uint32_t *outFlag);
256 
266 int32_t
268 
269 int32_t
271 
272 #ifdef __cplusplus
273 }
274 #endif
275 
int64_t OSTime
Definition: time.h:18
uint32_t state
Definition: sys.h:30
uint32_t progress
Progress from 0-100.
Definition: sys.h:32
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.
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.
void CCRSysExit(void)
int32_t CCRSysNeedsDRCFWUpdate(uint32_t drcSlot, BOOL *outNeedsUpdate)
Check if a DRC firmware update is needed.
int32_t CCRSysStopPairing(void)
Stops the pairing process.
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.
@ 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