wut  v1.5.0
Wii U Toolchain
Data Structures | Typedefs | Enumerations | Functions
Nn_ccr_sys

(see nn::ccr) More...

Collaboration diagram for Nn_ccr_sys:

Data Structures

struct  CCRSysUpdateState
 

Typedefs

typedef struct CCRSysUpdateState CCRSysUpdateState
 
typedef enum CCRSysPairingState CCRSysPairingState
 

Enumerations

enum  CCRSysPairingState {
  CCR_SYS_PAIRING_FINISHED = 0 ,
  CCR_SYS_PAIRING_IN_PROGRESS = 1 ,
  CCR_SYS_PAIRING_TIMED_OUT = 2
}
 

Functions

void CCRSysInit (void)
 
void CCRSysExit (void)
 
int32_t CCRSysDRCShutdown (void)
 Shutdown the DRC in slot 0. More...
 
int32_t CCRSysInvalidatePairing (void)
 Invalidate the DRC pairing in slot 0. More...
 
BOOL __CCRSysDRCIsAttached (uint32_t drcSlot)
 Check if the DRC in the specified slot is attached. More...
 
int32_t CCRSysStartPairing (uint32_t drcSlot, uint32_t timeout)
 Starts the pairing process for the specified slot. More...
 
int32_t CCRSysStopPairing (void)
 Stops the pairing process. More...
 
CCRSysPairingState CCRSysGetPairingState (void)
 Gets the current pairing state. More...
 
int32_t CCRSysGetPincode (uint32_t *pin)
 Gets the pin code used for pairing in decimal representation. More...
 
int32_t CCRSysSetSystemTime (OSTime time)
 Sets the DRH system time. More...
 
int32_t CCRSysNeedsDRCFWUpdate (uint32_t drcSlot, BOOL *outNeedsUpdate)
 Check if a DRC firmware update is needed. More...
 
int32_t __CCRSysNeedsDRCFWUpdate (uint32_t drcSlot, BOOL *outNeedsUpdate, BOOL allowDowngrade)
 Check if a DRC firmware update is needed. More...
 
int32_t CCRSysDRCFWUpdate (uint32_t drcSlot)
 Starts a DRC firmware update if necessary and region matches. More...
 
int32_t __CCRSysDRCFWUpdate (uint32_t drcSlot, BOOL allowDowngrade)
 Starts a DRC firmware update if necessary. More...
 
void CCRSysDRCFWUpdateForward (void)
 Finish a pending DRC firmware update. More...
 
void CCRSysGetUpdateState (CCRSysUpdateState *outUpdateState)
 Get the update state during a pending DRC firmware update. More...
 
void __CCRSysInitReattach (uint32_t drcSlot)
 Initialize a DRC reattach. More...
 
int32_t __CCRSysWaitReattach (uint32_t drcSlot, BOOL unknown)
 Wait for the DRC to reattach. More...
 
int32_t CCRSysGetVersionCheckFlag (uint32_t *outFlag)
 Get the version check flag. More...
 
int32_t CCRSysSetVersionCheckFlag (uint32_t flag)
 Set the version check flag. More...
 
int32_t CCRSysCaffeineSetCaffeineSlot (uint32_t slot)
 

Detailed Description

(see nn::ccr)


Data Structure Documentation

◆ CCRSysUpdateState

struct CCRSysUpdateState

Definition at line 28 of file sys.h.

Data Fields
uint32_t state
uint32_t progress Progress from 0-100.

Typedef Documentation

◆ CCRSysUpdateState

Definition at line 1 of file sys.h.

◆ CCRSysPairingState

Enumeration Type Documentation

◆ CCRSysPairingState

Enumerator
CCR_SYS_PAIRING_FINISHED 

Pairing is complete / hasn't started yet.

CCR_SYS_PAIRING_IN_PROGRESS 

Pairing is in progress.

CCR_SYS_PAIRING_TIMED_OUT 

Pairing timed out.

Definition at line 18 of file sys.h.

Function Documentation

◆ CCRSysInit()

void CCRSysInit ( void  )

◆ CCRSysExit()

void CCRSysExit ( void  )

◆ CCRSysDRCShutdown()

int32_t CCRSysDRCShutdown ( void  )

Shutdown the DRC in slot 0.

Returns
0 on success.

◆ CCRSysInvalidatePairing()

int32_t CCRSysInvalidatePairing ( void  )

Invalidate the DRC pairing in slot 0.

Returns
0 on success.

◆ __CCRSysDRCIsAttached()

BOOL __CCRSysDRCIsAttached ( uint32_t  drcSlot)

Check if the DRC in the specified slot is attached.

Parameters
drcSlotSlot from 0 to 1.
Returns
TRUE if attached.

◆ CCRSysStartPairing()

int32_t CCRSysStartPairing ( uint32_t  drcSlot,
uint32_t  timeout 
)

Starts the pairing process for the specified slot.

Parameters
drcSlotSlot from 0 to 1.
timeoutTimeout in seconds.
Returns
0 on success.

◆ CCRSysStopPairing()

int32_t CCRSysStopPairing ( void  )

Stops the pairing process.

Returns
0 on success.

◆ CCRSysGetPairingState()

CCRSysPairingState CCRSysGetPairingState ( void  )

Gets the current pairing state.

Returns
The pairing state.

◆ CCRSysGetPincode()

int32_t CCRSysGetPincode ( uint32_t *  pin)

Gets the pin code used for pairing in decimal representation.

♠ = 0, ♥ = 1, ♦ = 2, ♣ = 3

Parameters
pinPointer to write the pin code to.
Returns
0 on success.

◆ CCRSysSetSystemTime()

int32_t CCRSysSetSystemTime ( OSTime  time)

Sets the DRH system time.

Parameters
timeThe system time in ticks.
Returns
0 on success.

◆ CCRSysNeedsDRCFWUpdate()

int32_t CCRSysNeedsDRCFWUpdate ( uint32_t  drcSlot,
BOOL outNeedsUpdate 
)

Check if a DRC firmware update is needed.

This function additionally verifies the DRC area compared to __CCRSysNeedsDRCFWUpdate.

Parameters
drcSlotSlot from 0 to 1.
outNeedsUpdatePointer to store the result to.
Returns
0 on success.

◆ __CCRSysNeedsDRCFWUpdate()

int32_t __CCRSysNeedsDRCFWUpdate ( uint32_t  drcSlot,
BOOL outNeedsUpdate,
BOOL  allowDowngrade 
)

Check if a DRC firmware update is needed.

Parameters
drcSlotSlot from 0 to 1.
outNeedsUpdatePointer to store the result to.
allowDowngradeOnly check if the installed version doesn't match the running version, instead of checking that it's greater.
Returns
0 on success.

◆ CCRSysDRCFWUpdate()

int32_t CCRSysDRCFWUpdate ( uint32_t  drcSlot)

Starts a DRC firmware update if necessary and region matches.

Note
This function will wait for CCRSysDRCFWUpdateForward to be called once done. See CCRSysGetUpdateState for status and progress.
Parameters
drcSlotSlot from 0 to 1.
Returns
0 on success.

◆ __CCRSysDRCFWUpdate()

int32_t __CCRSysDRCFWUpdate ( uint32_t  drcSlot,
BOOL  allowDowngrade 
)

Starts a DRC firmware update if necessary.

Note
This function will wait for CCRSysDRCFWUpdateForward to be called once done. See CCRSysGetUpdateState for status and progress.
Parameters
drcSlotSlot from 0 to 1.
allowDowngradeOnly check if the installed version doesn't match the running version, instead of checking that it's greater. There are additional checks on the IOS side and this doesn't actually allow downgrading the firmware.
Returns
0 on success.

◆ CCRSysDRCFWUpdateForward()

void CCRSysDRCFWUpdateForward ( void  )

Finish a pending DRC firmware update.

◆ CCRSysGetUpdateState()

void CCRSysGetUpdateState ( CCRSysUpdateState outUpdateState)

Get the update state during a pending DRC firmware update.

Parameters
outUpdateStatePointer to store the state to.

◆ __CCRSysInitReattach()

void __CCRSysInitReattach ( uint32_t  drcSlot)

Initialize a DRC reattach.

Parameters
drcSlotSlot from 0 to 1.

◆ __CCRSysWaitReattach()

int32_t __CCRSysWaitReattach ( uint32_t  drcSlot,
BOOL  unknown 
)

Wait for the DRC to reattach.

This returns once the DRC disconnects and reconnects or a timeout is reached.

Parameters
drcSlotSlot from 0 to 1.
Returns
0 on success.

◆ CCRSysGetVersionCheckFlag()

int32_t CCRSysGetVersionCheckFlag ( uint32_t *  outFlag)

Get the version check flag.

Parameters
outFlagPointer to write the flag to.
Returns
0 on success.

◆ CCRSysSetVersionCheckFlag()

int32_t CCRSysSetVersionCheckFlag ( uint32_t  flag)

Set the version check flag.

Parameters
outFlagThe flag to set.
Returns
0 on success.

◆ CCRSysCaffeineSetCaffeineSlot()

int32_t CCRSysCaffeineSetCaffeineSlot ( uint32_t  slot)