////////////////////////////////////////////////////////////////////////////// // Project: Cafe // File: vpadbase.h VPADBASE lib exports // // Copyright (C) 2010-2011 Nintendo. 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. ////////////////////////////////////////////////////////////////////////////// #ifndef __VPADBASE_H__ #define __VPADBASE_H__ ////////////////////////////////////////////////////////////////////////////// #ifdef __cplusplus extern "C" { #endif #include //==================== defines ==========================// #define VPADBASE_CHAN0 0 #define VPADBASE_CHAN1 1 #define VPADBASE_MAX_CONTROLLERS 2 // Button #define VPADBASE_BUTTON_LEFT (0x0800) #define VPADBASE_BUTTON_RIGHT (0x0400) #define VPADBASE_BUTTON_UP (0x0200) #define VPADBASE_BUTTON_DOWN (0x0100) #define VPADBASE_BUTTON_A (0x8000) #define VPADBASE_BUTTON_B (0x4000) #define VPADBASE_BUTTON_X (0x2000) #define VPADBASE_BUTTON_Y (0x1000) #define VPADBASE_BUTTON_HOME (0x0002) #define VPADBASE_TRIGGER_ZR (0x0040) #define VPADBASE_TRIGGER_ZL (0x0080) #define VPADBASE_TRIGGER_R (0x0010) #define VPADBASE_TRIGGER_L (0x0020) #define VPADBASE_BUTTON_PLUS (0x0008) #define VPADBASE_BUTTON_MINUS (0x0004) #define VPADBASE_BUTTON_SYNC (0x0001) #define VPADBASE_BUTTON_POWER (0x0002) #define VPADBASE_BUTTON_STICK_R (0x00020000) #define VPADBASE_BUTTON_STICK_L (0x00040000) #define VPADBASE_BUTTON_TV (0x00010000) // Battery level #define VPADBASE_BATTERY_LEVEL_CHARGE (0) #define VPADBASE_BATTERY_LEVEL_SHUTDOWN (1) #define VPADBASE_BATTERY_LEVEL_CRITICAL (2) #define VPADBASE_BATTERY_LEVEL_LOW (3) #define VPADBASE_BATTERY_LEVEL_MEDIUM (4) #define VPADBASE_BATTERY_LEVEL_HIGH (5) #define VPADBASE_BATTERY_LEVEL_MAX (6) // error #define VPADBASE_ERR_NONE ( 0 ) #define VPADBASE_ERR_NO_CONTROLLER ( -1 ) #ifdef __cplusplus } #endif #endif//__VPADBASE_H__