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