/*---------------------------------------------------------------------------* Project: Horizon File: hid_Api.h Copyright (C)2009 Nintendo Co., Ltd. All rights reserved. These coded instructions, statements, and computer programs contain proprietary information of Nintendo of America Inc. and/or Nintendo Company Ltd., and are protected by Federal copyright law. They may not be disclosed to third parties or copied or duplicated in any form, in whole or in part, without the prior written consent of Nintendo. $Rev: 25279 $ *---------------------------------------------------------------------------*/ #ifndef NN_HID_CTR_HID_API_H_ #define NN_HID_CTR_HID_API_H_ /*! @file @brief HID ライブラリの初期化、終了を行う API です。 */ #include #include #include #include #include #include #include namespace nn { namespace hid { namespace CTR { namespace detail{ typedef enum _IPCPortType { PORT_SPVR = 0, PORT_USER, NUM_OF_IPC_PORTS } IPCPortType; } namespace{ const char PORT_NAME_SPVR[] = "hid:SPVR"; const char PORT_NAME_USER[] = "hid:USER"; } /*! @name Initialize/Finalize @{ */ /*! @brief HID ライブラリの初期化を行い、サンプリングデータを読み込める状態にします。 システムで確保されたメモリが、入力バッファとしてアプリケーションのメモリ空間に 4KB 割り付けられます。
このアドレスは、アプリケーションが使用するヒープの領域と被ることはありません。
もうすでに nn::hid::CTR::Initialize() が呼ばれている場合はなにも行なわずエラーを返します。 @return 処理の結果が返ってきます。
注意 ) ここに記載されたエラーコードは変更する可能性があります。
LEVEL_SUCCESS:SUMMARY_SUCCESS:MODULE_COMMON:DESCRIPTION_SUCCESS ・・・ 成功しました。
LEVEL_USAGE:SUMMARY_INVALID_STATE:MODULE_NN_HID:DESCRIPTION_ALREADY_INITIALIZED ・・・すでに 初期化済みです。
*/ nn::Result Initialize( ); /*! @brief HID ライブラリを終了します。 @return なし。 */ void Finalize( ); /*! @} */ /*! @brief Pad クラスの参照を取得します。 @ref nn::hid::CTR::Initialize( ) で初期化した後に使用できます。 @return Pad クラスの参照を返します。 */ Pad& GetPad( ); /*! @brief TouchPanel クラスの参照を取得します。 @ref nn::hid::CTR::Initialize( ) で初期化した後に使用できます。 @return TouchPanel クラスの参照を返します。 */ TouchPanel& GetTouchPanel(); /*! @brief Accelerometer クラスの参照を取得します。 @ref nn::hid::CTR::Initialize( ) で初期化した後に使用できます。 @return Accelerometer クラスの参照を返します。 */ Accelerometer& GetAccelerometer(); /*! @brief Gyroscope クラスの参照を取得します。 @ref nn::hid::CTR::Initialize( ) で初期化した後に使用できます。 @return Gyroscope クラスの参照を返します。 */ Gyroscope& GetGyroscope(); /*! @brief DebugPad クラスの参照を取得します。 @ref nn::hid::CTR::Initialize( ) で初期化した後に使用できます。 @return DebugPad クラスの参照を返します。 */ DebugPad& GetDebugPad(); } // namespace CTR { } // namespace hid { } // namespace nn { #endif // #ifndef NN_HID_CTR_HID_API_H_