1 /*---------------------------------------------------------------------------*
2   Project:  TwlSDK - MI - include
3   File:     stream.h
4 
5   Copyright 2003-2008 Nintendo.  All rights reserved.
6 
7   These coded instructions, statements, and computer programs contain
8   proprietary information of Nintendo of America Inc. and/or Nintendo
9   Company Ltd., and are protected by Federal copyright law.  They may
10   not be disclosed to third parties or copied or duplicated in any form,
11   in whole or in part, without the prior written consent of Nintendo.
12 
13   $Date:: 2008-09-18#$
14   $Rev: 8573 $
15   $Author: okubata_ryoma $
16  *---------------------------------------------------------------------------*/
17 
18 #ifndef NITRO_MI_STREAM_H_
19 #define NITRO_MI_STREAM_H_
20 
21 #include <nitro/types.h>
22 
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26 
27 
28 //---- type definition for reading stream
29 typedef s32 (*MIi_InitReadStreamCallback) (const u8 *devicep, void *ramp, const void *paramp);
30 typedef s32 (*MIi_TerminateReadStreamCallback) (const u8 *devicep);
31 typedef u8 (*MIi_ReadByteStreamCallback) (const u8 *devicep);
32 typedef u16 (*MIi_ReadShortStreamCallback) (const u8 *devicep);
33 typedef u32 (*MIi_ReadWordStreamCallback) (const u8 *devicep);
34 
35 //---- structure of callbacks to read stream.
36 //     genellary used for reading data from devices.
37 typedef struct
38 {
39     MIi_InitReadStreamCallback initStream;      //---- initialization
40     MIi_TerminateReadStreamCallback terminateStream;    //---- termination
41     MIi_ReadByteStreamCallback readByteStream;  //---- reading byte stream
42     MIi_ReadShortStreamCallback readShortStream;        //---- reading half word stream
43     MIi_ReadWordStreamCallback readWordStream;  //---- reading word stream
44 }
45 MIReadStreamCallbacks;
46 
47 
48 //---- get callbacks structure pointer of reading memory stream
49 MIReadStreamCallbacks *MI_GetReadStreamFromMemoryCallbacks(void);
50 
51 
52 #ifdef __cplusplus
53 } /* extern "C" */
54 #endif
55 
56 /* NITRO_MI_STREAM_H_ */
57 #endif
58