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
typedef
enum
{
8
AMC_EXI_NO_ERROR
= 0,
9
AMC_EXI_UNSELECTED
,
10
}
AmcExiError
;
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
// ---------------------------------------------------------------------------
24
void
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
// ---------------------------------------------------------------------------
36
void
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
// ---------------------------------------------------------------------------
46
int
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
// ---------------------------------------------------------------------------
57
AmcExiError
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
// ---------------------------------------------------------------------------
68
AmcExiError
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
// ---------------------------------------------------------------------------
79
void
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
// ---------------------------------------------------------------------------
90
void
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
// ---------------------------------------------------------------------------
101
AmcExiError
EXI2_GetStatusReg
(
u16
* pu16StatusReg);
102
103
int
AMC_IsStub
();
104
105
#endif
AmcExiError
AmcExiError
Definition
AmcExi2Comm.h:7
AMC_EXI_UNSELECTED
@ AMC_EXI_UNSELECTED
Definition
AmcExi2Comm.h:9
AMC_EXI_NO_ERROR
@ AMC_EXI_NO_ERROR
Definition
AmcExi2Comm.h:8
EXI2_Poll
int EXI2_Poll(void)
Definition
AmcExi2Stubs.c:12
EXI2_WriteN
AmcExiError EXI2_WriteN(const void *bytes, unsigned long length)
Definition
AmcExi2Stubs.c:22
EXI2_EnableInterrupts
void EXI2_EnableInterrupts(void)
Definition
AmcExi2Stubs.c:10
EXI2_ReadN
AmcExiError EXI2_ReadN(void *bytes, unsigned long length)
Definition
AmcExi2Stubs.c:17
EXI2_GetStatusReg
AmcExiError EXI2_GetStatusReg(u16 *pu16StatusReg)
EXI2_Init
void EXI2_Init(volatile unsigned char **inputPendingPtrRef, EXICallback monitorCallback)
Definition
AmcExi2Stubs.c:5
EXI2_Reserve
void EXI2_Reserve(void)
Definition
AmcExi2Stubs.c:27
EXI2_Unreserve
void EXI2_Unreserve(void)
Definition
AmcExi2Stubs.c:29
AMC_IsStub
int AMC_IsStub()
Definition
amcnotstub.c:6
AmcTypes.h
EXICallback
void(* EXICallback)(s32 chan, OSContext *context)
Definition
AmcTypes.h:7
u16
unsigned short int u16
Definition
types.h:7
os.h
libs
dolphin
include
dolphin
amc
AmcExi2Comm.h
Generated by
1.17.0