1 /*---------------------------------------------------------------------------*
2   Project:     IOP Shell
3   File:        iopsh_types.h
4   Description: Core public data types
5 
6   Copyright (C) 2013 Nintendo.  All rights reserved.
7 
8   These coded instructions, statements, and computer programs contain
9   proprietary information of Nintendo of America Inc. and/or Nintendo
10   Company Ltd., and are protected by Federal copyright law.  They may
11   not be disclosed to third parties or copied or duplicated in any form,
12   in whole or in part, without the prior written consent of Nintendo.
13 
14   *---------------------------------------------------------------------------*/
15 
16 #ifndef __IOPSH_TYPES__
17 #define __IOPSH_TYPES__
18 
19 #ifdef __cplusplus
20 extern "C" {
21 #endif
22 
23     /*---------------------------------------------------------------------------*
24      *
25      *    Globals/Externs
26      *    -- Variables/Functions --
27      *
28      *---------------------------------------------------------------------------*/
29 
30     /*---------------------------------------------------------------------------*
31      *
32      *    Constants defined for this file
33      *    -- #Defines --
34      *
35      *---------------------------------------------------------------------------*/
36 #define IOPSH_MAX_CMD_PREFIX_SIZE         16
37 #define IOPSH_MAX_CMD_PER_CLIENT          4
38 #define IOPSH_MAX_CLIENT_DATA_SIZE        (4096+64)
39 #define IOPSH_MAX_CLIENT_BUFFERED_CMD     8
40 #define IOPSH_DEFAULT_CLIENT_DATA_SIZE    500
41 #define IOPSH_DEFAULT_CLIENT_BUFFERED_CMD 3
42 
43     /*---------------------------------------------------------------------------*
44      *
45      *    Data types defined for this file
46      *    -- Structs, Typedefs, Enums --
47      *
48      *---------------------------------------------------------------------------*/
49     typedef u32 IOPSHDevMask;
50 #define IOPSH_DEV_HOSTBRIDGE_INDEX 0
51 #define IOPSH_DEV_USBSERIAL_INDEX  1
52 #define IOPSH_DEV_CONSOLE_INDEX    2
53 
54     /* Of type IOPSHDevMask, passed to iopshOpen() */
55 #define IOPSH_DEV_HOSTBRIDGE_MASK (1<<IOPSH_DEV_HOSTBRIDGE_INDEX)
56 #define IOPSH_DEV_USBSERIAL_MASK  (1<<IOPSH_DEV_USBSERIAL_INDEX)
57 #define IOPSH_DEV_CONSOLE_MASK    (1<<IOPSH_DEV_CONSOLE_INDEX)
58 #define IOPSH_DEV_ALL_MASK        (IOPSH_DEV_HOSTBRIDGE_MASK|IOPSH_DEV_CONSOLE_MASK)
59 
60 
61 #ifdef __cplusplus
62 }
63 #endif
64 
65 #endif // __IOPSH_TYPES__
66