#include <nds/jtypes.h>| #define IPC getIPC() |
| #define IPC_LID_CLOSED BIT(7) |
| #define IPC_PEN_DOWN BIT(6) |
| #define IPC_X BIT(0) |
| #define IPC_Y BIT(1) |
| #define REG_IPC_FIFO_CR (*(vu16*)0x4000184) |
| #define REG_IPC_FIFO_RX (*(vu32*)0x4100000) |
| #define REG_IPC_FIFO_TX (*(vu32*)0x4000188) |
| #define REG_IPC_SYNC (*(vuint16*)0x04000180) |
| typedef struct sTransferRegion * pTransferRegion |
| typedef struct sTransferSound * pTransferSound |
| typedef struct sTransferSoundData * pTransferSoundData |
| typedef struct sTransferRegion TransferRegion |
| typedef struct sTransferSound TransferSound |
| typedef struct sTransferSoundData TransferSoundData |
| enum IPC_CONTROL_BITS |
| IPC_FIFO_SEND_EMPTY | |
| IPC_FIFO_SEND_FULL | |
| IPC_FIFO_SEND_IRQ | |
| IPC_FIFO_SEND_CLEAR | |
| IPC_FIFO_RECV_EMPTY | |
| IPC_FIFO_RECV_FULL | |
| IPC_FIFO_RECV_IRQ | |
| IPC_FIFO_ERROR | |
| IPC_FIFO_ENABLE |
00143 { 00144 IPC_FIFO_SEND_EMPTY = (1<<0), 00145 IPC_FIFO_SEND_FULL = (1<<1), 00146 IPC_FIFO_SEND_IRQ = (1<<2), 00147 IPC_FIFO_SEND_CLEAR = (1<<3), 00148 IPC_FIFO_RECV_EMPTY = (1<<8), 00149 IPC_FIFO_RECV_FULL = (1<<9), 00150 IPC_FIFO_RECV_IRQ = (1<<10), 00151 IPC_FIFO_ERROR = (1<<14), 00152 IPC_FIFO_ENABLE = (1<<15) 00153 };
| enum IPC_SYNC_BITS |
| static TransferRegion volatile * getIPC | ( | ) | [inline, static] |
| static int IPC_GetSync | ( | ) | [inline, static] |
00131 { 00132 //--------------------------------------------------------------------------------- 00133 return REG_IPC_SYNC & 0x0f; 00134 }
| static void IPC_SendSync | ( | unsigned int | sync | ) | [inline, static] |
00125 { 00126 //--------------------------------------------------------------------------------- 00127 REG_IPC_SYNC = (REG_IPC_SYNC & 0xf0ff) | (((sync) & 0x0f) << 8) | IPC_SYNC_IRQ_REQUEST; 00128 }
1.5.4