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: 35281 $ 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 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 @brief メインメモリ(FCRAM)へのアクセス優先度の設定を行います。 53 54 詳細については対応する C++ の API である 55 nn::gx::CTR::SetMemAccessPrioMode の説明を参照して下さい。 56 57 @param[in] mode アクセス優先度設定モード 58 @return なし。 59 *---------------------------------------------------------------------------*/ 60 void nngxSetMemAccessPrioMode( nngxMemAccessPrioMode mode ); 61 62 63 /*!--------------------------------------------------------------------------* 64 @brief 立体視表示が許可されているかどうかを取得します。 65 66 詳細については対応する C++ の API である 67 nn::gx::CTR::IsStereoVisionAllowed の説明を参照して下さい。 68 69 @return 立体視表示が許可されているなら true、そうでなければ false を返します。 70 *---------------------------------------------------------------------------*/ 71 bool nngxIsStereoVisionAllowed( void ); 72 73 74 /*!--------------------------------------------------------------------------* 75 private: 76 77 @brief 内部動作の優先度を設定します。 78 79 @param[in] mode 内部動作の優先度モード 80 @return なし。 81 *---------------------------------------------------------------------------*/ 82 void nngxSetInternalDriverPrioMode( nngxInternalDriverPrioMode mode ); 83 84 #ifdef __cplusplus 85 } // extern "C" 86 #endif // __cplusplus 87 88 /*! 89 @} 90 */ 91 92 /*-------------------------------------------------------------------------- 93 C++ API 94 *-------------------------------------------------------------------------*/ 95 #ifdef __cplusplus 96 namespace nn { 97 namespace gx { 98 namespace CTR { 99 100 /*!--------------------------------------------------------------------------* 101 @enum MemAccessPrioMode 102 @brief メインメモリへのアクセス優先度の設定値です。 103 *---------------------------------------------------------------------------*/ 104 enum MemAccessPrioMode 105 { 106 /*! @brief CPU, GPU, その他デバイスが全て均等に扱われます。*/ 107 MEM_ACCESS_PRIO_MODE_0 = NN_GX_MEM_ACCESS_PRIO_MODE_0, 108 /*! @brief CPU からのアクセスが優先されます。*/ 109 MEM_ACCESS_PRIO_MODE_1 = NN_GX_MEM_ACCESS_PRIO_MODE_1, 110 /*! @brief CPU からのアクセスが強く優先されます。*/ 111 MEM_ACCESS_PRIO_MODE_2 = NN_GX_MEM_ACCESS_PRIO_MODE_2, 112 /*! @brief CPU と GPU からのアクセスが優先されます。*/ 113 MEM_ACCESS_PRIO_MODE_3 = NN_GX_MEM_ACCESS_PRIO_MODE_3, 114 /*! @brief GPU からのアクセスが優先されます。*/ 115 MEM_ACCESS_PRIO_MODE_4 = NN_GX_MEM_ACCESS_PRIO_MODE_4, 116 117 MEM_ACCESS_PRIO_MODE_MAX = NN_GX_MEM_ACCESS_PRIO_MODE_MAX 118 }; 119 120 /*!--------------------------------------------------------------------------* 121 @brief メインメモリ(FCRAM)へのアクセス優先度の設定を行います。 122 123 @param[in] mode アクセス優先度設定モード 124 @return なし。 125 *---------------------------------------------------------------------------*/ SetMemAccessPrioMode(MemAccessPrioMode mode)126 inline void SetMemAccessPrioMode( MemAccessPrioMode mode ) 127 { 128 nngxSetMemAccessPrioMode(static_cast<nngxMemAccessPrioMode>(mode)); 129 } 130 131 /*!--------------------------------------------------------------------------* 132 @brief 立体視表示が許可されているかどうかを取得します。 133 134 @return 立体視表示が許可されているなら true、そうでなければ false を返します。 135 *---------------------------------------------------------------------------*/ IsStereoVisionAllowed(void)136 inline bool IsStereoVisionAllowed( void ) 137 { 138 return nngxIsStereoVisionAllowed(); 139 } 140 141 /*!--------------------------------------------------------------------------* 142 private: 143 144 @enum InternalDriverPrioMode 145 @brief 内部動作の優先度の設定値です。 146 *---------------------------------------------------------------------------*/ 147 enum InternalDriverPrioMode 148 { 149 INTERNAL_DRIVER_PRIO_MODE_HIGH = NN_GX_INTERNAL_DRIVER_PRIO_MODE_HIGH, 150 INTERNAL_DRIVER_PRIO_MODE_LOW = NN_GX_INTERNAL_DRIVER_PRIO_MODE_LOW 151 }; 152 153 /*!--------------------------------------------------------------------------* 154 private: 155 156 @brief 内部動作の優先度を設定します。 157 158 @param[in] mode 内部動作の優先度モード 159 @return なし。 160 *---------------------------------------------------------------------------*/ SetInternalDriverPrioMode(InternalDriverPrioMode mode)161 inline void SetInternalDriverPrioMode( InternalDriverPrioMode mode ) 162 { 163 nngxSetInternalDriverPrioMode(static_cast<nngxInternalDriverPrioMode>(mode)); 164 } 165 166 }}} // namespace nn::gx::CTR 167 #endif // __cplusplus 168 169 /*---------------------------------------------------------------------------*/ 170 171 #endif /* NN_GX_CTR_GX_MISC_H_ */ 172