Loading [MathJax]/extensions/MathZoom.js
Twilight Princess
Decompilation of The Legend of Zelda: Twilight Princess
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
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/os.h>
6
7#ifdef __cplusplus
8extern "C" {
9#endif
10
16
17// ---------------------------------------------------------------------------
18//
19// void EXI2_Init( volatile unsigned char **inputPendingPtrRef,
20// EXICallback monitorCallback );
21//
22// Description: Initialize the EXI2 driver (without interrupts). The
23// parameter 'inputPendingPtrref' is a flag showing whether input
24// is waiting in the EXI2 buffer and 'monitorCallback' is a
25// pointer to a callback function that is invoked at the end of
26// the EXI2 ISR.
27//
28// ---------------------------------------------------------------------------
29void EXI2_Init(volatile unsigned char **inputPendingPtrRef, EXICallback monitorCallback);
30
31// ---------------------------------------------------------------------------
32//
33// void EXI2_EnableInterrupts( void );
34//
35// Description: Enable EXI2 interrupts. This function must be called to use
36// interrupts on the EXI2 interface. Call this function only
37// after EXI2_Init() has been invoked.
38//
39// ---------------------------------------------------------------------------
40void EXI2_EnableInterrupts( void );
41
42
43
44// ---------------------------------------------------------------------------
45//
46// int EXI2_Poll( void );
47//
48// Description: Returns the number of bytes waiting to be read in the EXI2
49// buffer.
50//
51// ---------------------------------------------------------------------------
52int EXI2_Poll( void );
53
54
55
56// ---------------------------------------------------------------------------
57//
58// AmcExiError EXI2_ReadN( void *bytes, unsigned long length );
59//
60// Description: Read length bytes and return in bytes[] array.
61//
62// Returns: One of AMC_EXI_*.
63//
64// ---------------------------------------------------------------------------
65AmcExiError EXI2_ReadN( void *bytes, unsigned long length);
66
67
68
69// ---------------------------------------------------------------------------
70//
71// AmcExiError EXI2_WriteN( const void *bytes, unsigned long length );
72//
73// Description: Write length bytes stored in bytes[] array.
74//
75// Returns: One of AMC_EXI_*.
76//
77// ---------------------------------------------------------------------------
78AmcExiError EXI2_WriteN( const void *bytes, unsigned long length);
79
80
81
82// ---------------------------------------------------------------------------
83//
84// void EXI2_Reserve( void );
85//
86// Description: Disable non-monitor communications over the EXI2 port.
87// This function must be called before the monitor takes
88// control of the processor.
89//
90// ---------------------------------------------------------------------------
91void EXI2_Reserve( void );
92
93
94
95// ---------------------------------------------------------------------------
96//
97// void EXI2_Unreserve( void );
98//
99// Description: Re-enable non-monitor communications over the EXI2 port.
100// This function must be called just before the monitor
101// gives control of the processor back to the application.
102//
103// ---------------------------------------------------------------------------
104void EXI2_Unreserve( void );
105
106
107
108// ---------------------------------------------------------------------------
109//
110// AmcExiError EXI2_GetStatusReg( u16* pu16StatusReg );
111//
112// Description: Read and store the value of the status register into
113// *pu16StatusReg.
114//
115// Returns: One of AMC_EXI_*.
116// ---------------------------------------------------------------------------
118
119#ifdef __cplusplus
120}
121#endif
122
123#endif
AmcExiError
Definition AmcExi2Comm.h:12
@ AMC_EXI_UNSELECTED
Definition AmcExi2Comm.h:14
@ AMC_EXI_NO_ERROR
Definition AmcExi2Comm.h:13
int EXI2_Poll(void)
Definition AmcExi2Stubs.c:15
AmcExiError EXI2_WriteN(const void *bytes, unsigned long length)
Definition AmcExi2Stubs.c:25
void EXI2_EnableInterrupts(void)
Definition AmcExi2Stubs.c:12
AmcExiError EXI2_ReadN(void *bytes, unsigned long length)
Definition AmcExi2Stubs.c:20
AmcExiError EXI2_GetStatusReg(u16 *pu16StatusReg)
void EXI2_Init(volatile unsigned char **inputPendingPtrRef, EXICallback monitorCallback)
Definition AmcExi2Stubs.c:7
void EXI2_Reserve(void)
Definition AmcExi2Stubs.c:30
void EXI2_Unreserve(void)
Definition AmcExi2Stubs.c:33
void(* EXICallback)(s32 chan, OSContext *context)
Definition AmcTypes.h:7
unsigned short int u16
Definition types.h:7