1 /*---------------------------------------------------------------------------*
2   Project:  Horizon
3   File:     gx_Misc.h
4 
5   Copyright (C)2010 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: 22216 $
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 /*!
26   @addtogroup  nn_gx    gx
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 
46     /*!--------------------------------------------------------------------------*
47       @brief        メインメモリ(FCRAM)へのアクセス優先度の設定を行います。
48 
49                     詳細については対応する C++ の API である
50                     nn::gx::CTR::SetMemAccessPrioMode の説明を参照して下さい。
51 
52       @param[in]    mode    アクセス優先度設定モード
53       @return       なし。
54      *---------------------------------------------------------------------------*/
55     void nngxSetMemAccessPrioMode( nngxMemAccessPrioMode mode );
56 
57 
58     /*!--------------------------------------------------------------------------*
59       @brief        立体視表示が許可されているかどうかを取得します。
60 
61                     詳細については対応する C++ の API である
62                     nn::gx::CTR::IsStereoVisionAllowed の説明を参照して下さい。
63 
64       @return       立体視表示が許可されているなら true、そうでなければ false を返します。
65      *---------------------------------------------------------------------------*/
66     bool nngxIsStereoVisionAllowed( void );
67 
68 #ifdef  __cplusplus
69 } // extern "C"
70 #endif // __cplusplus
71 
72 /*!
73   @}
74 */
75 
76 /*--------------------------------------------------------------------------
77     C++ API
78  *-------------------------------------------------------------------------*/
79 #ifdef  __cplusplus
80 namespace nn {
81 namespace gx {
82 namespace CTR {
83 
84     /*!--------------------------------------------------------------------------*
85       @enum         MemAccessPrioMode
86       @brief        メインメモリへのアクセス優先度の設定値です。
87      *---------------------------------------------------------------------------*/
88     enum MemAccessPrioMode
89     {
90         /*! @brief  CPU, GPU, その他デバイスが全て均等に扱われます。*/
91         MEM_ACCESS_PRIO_MODE_0 = NN_GX_MEM_ACCESS_PRIO_MODE_0,
92         /*! @brief  CPU からのアクセスが優先されます。*/
93         MEM_ACCESS_PRIO_MODE_1 = NN_GX_MEM_ACCESS_PRIO_MODE_1,
94         /*! @brief  CPU からのアクセスが強く優先されます。*/
95         MEM_ACCESS_PRIO_MODE_2 = NN_GX_MEM_ACCESS_PRIO_MODE_2,
96         /*! @brief  CPU と GPU からのアクセスが優先されます。*/
97         MEM_ACCESS_PRIO_MODE_3 = NN_GX_MEM_ACCESS_PRIO_MODE_3,
98         /*! @brief  GPU からのアクセスが優先されます。*/
99         MEM_ACCESS_PRIO_MODE_4 = NN_GX_MEM_ACCESS_PRIO_MODE_4,
100 
101         MEM_ACCESS_PRIO_MODE_MAX = NN_GX_MEM_ACCESS_PRIO_MODE_MAX
102     };
103 
104     /*!--------------------------------------------------------------------------*
105       @brief        メインメモリ(FCRAM)へのアクセス優先度の設定を行います。
106 
107       @param[in]    mode    アクセス優先度設定モード
108       @return       なし。
109      *---------------------------------------------------------------------------*/
SetMemAccessPrioMode(MemAccessPrioMode mode)110     inline void SetMemAccessPrioMode( MemAccessPrioMode mode )
111     {
112         nngxSetMemAccessPrioMode(static_cast<nngxMemAccessPrioMode>(mode));
113     }
114 
115     /*!--------------------------------------------------------------------------*
116       @brief        立体視表示が許可されているかどうかを取得します。
117 
118       @return       立体視表示が許可されているなら true、そうでなければ false を返します。
119      *---------------------------------------------------------------------------*/
IsStereoVisionAllowed(void)120     inline bool IsStereoVisionAllowed( void )
121     {
122         return nngxIsStereoVisionAllowed();
123     }
124 
125 }}} // namespace nn::gx::CTR
126 #endif // __cplusplus
127 
128 /*---------------------------------------------------------------------------*/
129 
130 #endif /* NN_GX_CTR_GX_MISC_H_ */
131