controller_voice.h 2.45 KB
#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_ */