SSBM Decomp
Loading...
Searching...
No Matches
AmcExi2Comm.h
Go to the documentation of this file.
1#ifndef _DOLPHIN_AMC_AMCEXI2COMM_H_
2#define _DOLPHIN_AMC_AMCEXI2COMM_H_
3
5#include <dolphin/os.h>
6
11
12// ---------------------------------------------------------------------------
13//
14// void EXI2_Init( volatile unsigned char **inputPendingPtrRef,
15// EXICallback monitorCallback );
16//
17// Description: Initialize the EXI2 driver (without interrupts). The
18// parameter 'inputPendingPtrref' is a flag showing whether input
19// is waiting in the EXI2 buffer and 'monitorCallback' is a
20// pointer to a callback function that is invoked at the end of
21// the EXI2 ISR.
22//
23// ---------------------------------------------------------------------------
24void EXI2_Init(volatile unsigned char** inputPendingPtrRef,
25 EXICallback monitorCallback);
26
27// ---------------------------------------------------------------------------
28//
29// void EXI2_EnableInterrupts( void );
30//
31// Description: Enable EXI2 interrupts. This function must be called to use
32// interrupts on the EXI2 interface. Call this function only
33// after EXI2_Init() has been invoked.
34//
35// ---------------------------------------------------------------------------
36void EXI2_EnableInterrupts(void);
37
38// ---------------------------------------------------------------------------
39//
40// int EXI2_Poll( void );
41//
42// Description: Returns the number of bytes waiting to be read in the EXI2
43// buffer.
44//
45// ---------------------------------------------------------------------------
46int EXI2_Poll(void);
47
48// ---------------------------------------------------------------------------
49//
50// AmcExiError EXI2_ReadN( void *bytes, unsigned long length );
51//
52// Description: Read length bytes and return in bytes[] array.
53//
54// Returns: One of AMC_EXI_*.
55//
56// ---------------------------------------------------------------------------
57AmcExiError EXI2_ReadN(void* bytes, unsigned long length);
58
59// ---------------------------------------------------------------------------
60//
61// AmcExiError EXI2_WriteN( const void *bytes, unsigned long length );
62//
63// Description: Write length bytes stored in bytes[] array.
64//
65// Returns: One of AMC_EXI_*.
66//
67// ---------------------------------------------------------------------------
68AmcExiError EXI2_WriteN(const void* bytes, unsigned long length);
69
70// ---------------------------------------------------------------------------
71//
72// void EXI2_Reserve( void );
73//
74// Description: Disable non-monitor communications over the EXI2 port.
75// This function must be called before the monitor takes
76// control of the processor.
77//
78// ---------------------------------------------------------------------------
79void EXI2_Reserve(void);
80
81// ---------------------------------------------------------------------------
82//
83// void EXI2_Unreserve( void );
84//
85// Description: Re-enable non-monitor communications over the EXI2 port.
86// This function must be called just before the monitor
87// gives control of the processor back to the application.
88//
89// ---------------------------------------------------------------------------
90void EXI2_Unreserve(void);
91
92// ---------------------------------------------------------------------------
93//
94// AmcExiError EXI2_GetStatusReg( u16* pu16StatusReg );
95//
96// Description: Read and store the value of the status register into
97// *pu16StatusReg.
98//
99// Returns: One of AMC_EXI_*.
100// ---------------------------------------------------------------------------
102
103int AMC_IsStub();
104
105#endif
AmcExiError
Definition AmcExi2Comm.h:7
@ AMC_EXI_UNSELECTED
Definition AmcExi2Comm.h:9
@ AMC_EXI_NO_ERROR
Definition AmcExi2Comm.h:8
int EXI2_Poll(void)
Definition AmcExi2Stubs.c:12
AmcExiError EXI2_WriteN(const void *bytes, unsigned long length)
Definition AmcExi2Stubs.c:22
void EXI2_EnableInterrupts(void)
Definition AmcExi2Stubs.c:10
AmcExiError EXI2_ReadN(void *bytes, unsigned long length)
Definition AmcExi2Stubs.c:17
AmcExiError EXI2_GetStatusReg(u16 *pu16StatusReg)
void EXI2_Init(volatile unsigned char **inputPendingPtrRef, EXICallback monitorCallback)
Definition AmcExi2Stubs.c:5
void EXI2_Reserve(void)
Definition AmcExi2Stubs.c:27
void EXI2_Unreserve(void)
Definition AmcExi2Stubs.c:29
int AMC_IsStub()
Definition amcnotstub.c:6
void(* EXICallback)(s32 chan, OSContext *context)
Definition AmcTypes.h:7
unsigned short int u16
Definition types.h:7