controller_voice.h
2.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
#ifndef _CONTROLLER_VOICE_H_
#define _CONTROLLER_VOICE_H_
/*---------------------------------------------------------------------*
Copyright (C) 1998 Nintendo.
$RCSfile: controller_voice.h,v $
$Revision: 1.1.1.1 $
$Date: 2002/05/02 03:28:43 $
*---------------------------------------------------------------------*/
/* Voice Recognition System */
#define VOICE_READ_READY 1
#define VOICE_WRITE_READY 2
#define VOICE_RW_ADDR (0x0000/BLOCKSIZE)
#define VOICE_ST_ADDR (0x0020/BLOCKSIZE)
/* Voice Recognition System ram read/write format */
typedef struct {
u8 dummy; /* for word aliening */
u8 txsize; /* Tx size */
u8 rxsize; /* Rx size */
u8 cmd; /* commmand */
u8 addrh;
u8 addrl;
u8 data[2];
u8 datacrc;
} __OSVoiceRead2Format;
/* Voice Recognition System ram read/write format */
typedef struct {
u8 dummy; /* for word aliening */
u8 txsize; /* Tx size */
u8 rxsize; /* Rx size */
u8 cmd; /* commmand */
u8 addrh;
u8 addrl;
u8 data[36];
u8 datacrc;
} __OSVoiceRead36Format;
/* Voice Recognition System ram read/write format */
typedef struct {
u8 dummy; /* for word aliening */
u8 txsize; /* Tx size */
u8 rxsize; /* Rx size */
u8 cmd; /* commmand */
u8 addrh;
u8 addrl;
u8 data[4];
u8 datacrc;
} __OSVoiceWrite4Format;
/* Voice Recognition System ram read/write format */
typedef struct {
u8 dummy; /* for word aliening */
u8 txsize; /* Tx size */
u8 rxsize; /* Rx size */
u8 cmd; /* commmand */
u8 addrh;
u8 addrl;
u8 data[20];
u8 datacrc;
} __OSVoiceWrite20Format;
/* Voice Recognition System ram read/write format */
typedef struct {
u8 txsize; /* Tx size */
u8 rxsize; /* Rx size */
u8 cmd; /* commmand */
u8 data;
u8 scrc;
u8 datacrc;
} __OSVoiceSWriteFormat;
extern u8 __osVoiceContDataCrc(u8 *, u32);
extern s32 __osVoiceGetStatus(OSMesgQueue *, int, u8 *);
extern s32 __osVoiceCheckResult(OSVoiceHandle *, u8 *);
extern s32 __osVoiceSetADConverter(OSMesgQueue *, int, u8);
extern s32 __osVoiceContWrite4(OSMesgQueue *, int, u16, u8 *);
extern s32 __osVoiceContWrite20(OSMesgQueue *, int, u16, u8 *);
extern s32 __osVoiceContRead2(OSMesgQueue *, int, u16, u8 *);
extern s32 __osVoiceContRead36(OSMesgQueue *, int, u16, u8 *);
extern s32 __osContChannelReset(OSMesgQueue *, int);
#endif /* _CONTROLLER_VOICE_H_ */