1 /*---------------------------------------------------------------------------*
2   Project:  Horizon
3   File:     gx_Misc.h
4   Copyright (C)2010 Nintendo Co., Ltd.  All rights reserved.
5   These coded instructions, statements, and computer programs contain
6   proprietary information of Nintendo of America Inc. and/or Nintendo
7   Company Ltd., and are protected by Federal copyright law. They may
8   not be disclosed to third parties or copied or duplicated in any form,
9   in whole or in part, without the prior written consent of Nintendo.
10   $Rev: 34619 $
11  *---------------------------------------------------------------------------
12 
13 
14 */
15 
16 #ifndef NN_GX_CTR_GX_MISC_H_
17 #define NN_GX_CTR_GX_MISC_H_
18 
19 #include <nn/types.h>
20 #include <nn/assert.h>
21 
22 /*--------------------------------------------------------------------------
23     C functions
24  *-------------------------------------------------------------------------*/
25 /* Please see man pages for details
26 
27 
28 */
29 
30 #ifdef  __cplusplus
31 extern "C" {
32 #endif // __cplusplus
33 
34     typedef enum nngxMemAccessPrioMode
35     {
36         NN_GX_MEM_ACCESS_PRIO_MODE_0 = 0x00000000,
37         NN_GX_MEM_ACCESS_PRIO_MODE_1 = 0x00000205,
38         NN_GX_MEM_ACCESS_PRIO_MODE_2 = 0x00000203,
39         NN_GX_MEM_ACCESS_PRIO_MODE_3 = 0x00000305,
40         NN_GX_MEM_ACCESS_PRIO_MODE_4 = 0x00000105,
41 
42         NN_GX_MEM_ACCESS_PRIO_MODE_MAX = 0x7FFFFFFF
43     } nngxMemAccessPrioMode;
44 
45     typedef enum nngxInternalDriverPrioMode
46     {
47         NN_GX_INTERNAL_DRIVER_PRIO_MODE_HIGH,
48         NN_GX_INTERNAL_DRIVER_PRIO_MODE_LOW
49     } nngxInternalDriverPrioMode;
50 
51     /*
52 
53 
54 
55 
56 
57 
58 
59      */
60     void nngxSetMemAccessPrioMode( nngxMemAccessPrioMode mode );
61 
62 
63     /*
64 
65 
66 
67 
68 
69 
70      */
71     bool nngxIsStereoVisionAllowed( void );
72 
73 
74     /*
75 
76 
77 
78 
79 
80 
81      */
82     void nngxSetInternalDriverPrioMode( nngxInternalDriverPrioMode mode );
83 
84     /*---------------------------------------------------------------------------*
85       Private:
86      *---------------------------------------------------------------------------*/
87     void nngxSetAutoWaitMode( s32 paramIndex );
88 
89 #ifdef  __cplusplus
90 } // extern "C"
91 #endif // __cplusplus
92 
93 /*
94 
95 */
96 
97 /*--------------------------------------------------------------------------
98     C++ functions
99  *-------------------------------------------------------------------------*/
100 #ifdef  __cplusplus
101 namespace nn {
102 namespace gx {
103 namespace CTR {
104 
105     /*
106 
107 
108      */
109     enum MemAccessPrioMode
110     {
111         /* Please see man pages for details */
112         MEM_ACCESS_PRIO_MODE_0 = NN_GX_MEM_ACCESS_PRIO_MODE_0,
113         /* Please see man pages for details */
114         MEM_ACCESS_PRIO_MODE_1 = NN_GX_MEM_ACCESS_PRIO_MODE_1,
115         /* Please see man pages for details */
116         MEM_ACCESS_PRIO_MODE_2 = NN_GX_MEM_ACCESS_PRIO_MODE_2,
117         /* Please see man pages for details */
118         MEM_ACCESS_PRIO_MODE_3 = NN_GX_MEM_ACCESS_PRIO_MODE_3,
119         /* Please see man pages for details */
120         MEM_ACCESS_PRIO_MODE_4 = NN_GX_MEM_ACCESS_PRIO_MODE_4,
121 
122         MEM_ACCESS_PRIO_MODE_MAX = NN_GX_MEM_ACCESS_PRIO_MODE_MAX
123     };
124 
125     /*
126 
127 
128 
129 
130      */
SetMemAccessPrioMode(MemAccessPrioMode mode)131     inline void SetMemAccessPrioMode( MemAccessPrioMode mode )
132     {
133         nngxSetMemAccessPrioMode(static_cast<nngxMemAccessPrioMode>(mode));
134     }
135 
136     /*
137 
138 
139 
140      */
IsStereoVisionAllowed(void)141     inline bool IsStereoVisionAllowed( void )
142     {
143         return nngxIsStereoVisionAllowed();
144     }
145 
146     /*
147 
148 
149 
150 
151      */
152     enum InternalDriverPrioMode
153     {
154         INTERNAL_DRIVER_PRIO_MODE_HIGH = NN_GX_INTERNAL_DRIVER_PRIO_MODE_HIGH,
155         INTERNAL_DRIVER_PRIO_MODE_LOW  = NN_GX_INTERNAL_DRIVER_PRIO_MODE_LOW
156     };
157 
158     /*
159 
160 
161 
162 
163 
164 
165      */
SetInternalDriverPrioMode(InternalDriverPrioMode mode)166     inline void SetInternalDriverPrioMode( InternalDriverPrioMode mode )
167     {
168         nngxSetInternalDriverPrioMode(static_cast<nngxInternalDriverPrioMode>(mode));
169     }
170 
171     /*---------------------------------------------------------------------------*
172       Private:
173      *---------------------------------------------------------------------------*/
SetAutoWaitMode(s32 paramIndex)174     inline void SetAutoWaitMode( s32 paramIndex )
175     {
176         nngxSetAutoWaitMode(paramIndex);
177     }
178 
179 }}} // namespace nn::gx::CTR
180 #endif // __cplusplus
181 
182 /*---------------------------------------------------------------------------*/
183 
184 #endif /* NN_GX_CTR_GX_MISC_H_ */
185