Data Structures | Macros | Functions
joybus.c File Reference

Joybus Subsystem. More...

Data Structures

struct  joybus_msg_t
 A message to be sent to JoyBus, with its completion callback. More...


#define MAX_JOYBUS_MSGS   8
 Maximum number of pending joybus messages.
SI status register bit definitions
#define SI_STATUS_DMA_BUSY   ( 1 << 0 )
 SI DMA busy.
#define SI_STATUS_IO_BUSY   ( 1 << 1 )
 SI IO busy.
Joybus internal state machine values

 Joybus state: idle (no pending messages)
 JoyBus state: sending a message to PIF.
 JoyBus state: receiving a reply from PIF.


void __joybus_init (void)
 Initialize the joybus subsystem.
void joybus_exec_async (const void *input, void(*callback)(uint64_t *output, void *ctx), void *ctx)
 Execute an asynchronous joybus message. More...
void joybus_exec (const void *input, void *output)
 Write a 64-byte block of data to the PIF and read the 64-byte result. More...

Detailed Description

Joybus Subsystem.