diff options
Diffstat (limited to 'include/nitro/PXI_fifo_shared.h')
-rw-r--r-- | include/nitro/PXI_fifo_shared.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/include/nitro/PXI_fifo_shared.h b/include/nitro/PXI_fifo_shared.h index 297625a1..a4ed454f 100644 --- a/include/nitro/PXI_fifo_shared.h +++ b/include/nitro/PXI_fifo_shared.h @@ -13,6 +13,8 @@ #ifndef POKEDIAMOND_PXI_FIFO_SHARED_H #define POKEDIAMOND_PXI_FIFO_SHARED_H +#include "nitro/types.h" + typedef enum { PXI_PROC_ARM9 = 0, @@ -40,4 +42,27 @@ typedef enum { PXI_MAX_FIFO_TAG = 32 // MAX FIFO TAG } PXIFifoTag; +typedef enum +{ + PXI_FIFO_SUCCESS = 0, + PXI_FIFO_FAIL_SEND_ERR = -1, + PXI_FIFO_FAIL_SEND_FULL = -2, + PXI_FIFO_FAIL_RECV_ERR = -3, + PXI_FIFO_FAIL_RECV_EMPTY = -4, + PXI_FIFO_NO_CALLBACK_ENTRY = -5 +} PXIFifoStatus; + +typedef union +{ + struct + { + u32 tag:5; + u32 err:1; + u32 data:26; + } e; + u32 raw; +} PXIFifoMessage; + +typedef void (*PXIFifoCallback) (PXIFifoTag tag, u32 data, BOOL err); + #endif //POKEDIAMOND_PXI_FIFO_SHARED_H |