1 /*---------------------------------------------------------------------------*
2   Project:  Horizon
3   File:     gx_Misc.h
4 
5   Copyright (C)2009-2012 Nintendo Co., Ltd.  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   $Rev: 47467 $
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 API
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      */
83     void nngxSetInternalDriverPrioMode( nngxInternalDriverPrioMode mode );
84 
85     /*---------------------------------------------------------------------------*
86       :private
87      *---------------------------------------------------------------------------*/
88     void nngxSetAutoWaitMode( s32 paramIndex );
89 
90 #ifdef  __cplusplus
91 } // extern "C"
92 #endif // __cplusplus
93 
94 /*
95 
96 */
97 
98 /*--------------------------------------------------------------------------
99     C++ API
100  *-------------------------------------------------------------------------*/
101 #ifdef  __cplusplus
102 namespace nn {
103 namespace gx {
104 namespace CTR {
105 
106     /*
107 
108 
109      */
110     enum MemAccessPrioMode
111     {
112         /* Please see man pages for details */
113         MEM_ACCESS_PRIO_MODE_0 = NN_GX_MEM_ACCESS_PRIO_MODE_0,
114         /* Please see man pages for details */
115         MEM_ACCESS_PRIO_MODE_1 = NN_GX_MEM_ACCESS_PRIO_MODE_1,
116         /* Please see man pages for details */
117         MEM_ACCESS_PRIO_MODE_2 = NN_GX_MEM_ACCESS_PRIO_MODE_2,
118         /* Please see man pages for details */
119         MEM_ACCESS_PRIO_MODE_3 = NN_GX_MEM_ACCESS_PRIO_MODE_3,
120         /* Please see man pages for details */
121         MEM_ACCESS_PRIO_MODE_4 = NN_GX_MEM_ACCESS_PRIO_MODE_4,
122 
123         MEM_ACCESS_PRIO_MODE_MAX = NN_GX_MEM_ACCESS_PRIO_MODE_MAX
124     };
125 
126     /*
127 
128 
129 
130 
131      */
SetMemAccessPrioMode(MemAccessPrioMode mode)132     inline void SetMemAccessPrioMode( MemAccessPrioMode mode )
133     {
134         nngxSetMemAccessPrioMode(static_cast<nngxMemAccessPrioMode>(mode));
135     }
136 
137     /*
138 
139 
140 
141      */
IsStereoVisionAllowed(void)142     inline bool IsStereoVisionAllowed( void )
143     {
144         return nngxIsStereoVisionAllowed();
145     }
146 
147     /*
148 
149 
150      */
151     enum InternalDriverPrioMode
152     {
153         /* Please see man pages for details */
154         INTERNAL_DRIVER_PRIO_MODE_HIGH = NN_GX_INTERNAL_DRIVER_PRIO_MODE_HIGH,
155         /* Please see man pages for details */
156         INTERNAL_DRIVER_PRIO_MODE_LOW  = NN_GX_INTERNAL_DRIVER_PRIO_MODE_LOW
157     };
158 
159     /*
160 
161 
162 
163 
164      */
SetInternalDriverPrioMode(InternalDriverPrioMode mode)165     inline void SetInternalDriverPrioMode( InternalDriverPrioMode mode )
166     {
167         nngxSetInternalDriverPrioMode(static_cast<nngxInternalDriverPrioMode>(mode));
168     }
169 
170     /*---------------------------------------------------------------------------*
171       :private
172      *---------------------------------------------------------------------------*/
SetAutoWaitMode(s32 paramIndex)173     inline void SetAutoWaitMode( s32 paramIndex )
174     {
175         nngxSetAutoWaitMode(paramIndex);
176     }
177 
178 }}} // namespace nn::gx::CTR
179 #endif // __cplusplus
180 
181 /*---------------------------------------------------------------------------*/
182 
183 #endif /* NN_GX_CTR_GX_MISC_H_ */
184