1 //////////////////////////////////////////////////////////////////////////////
2 //  Project:  Cafe
3 //  File:     vpadbase.h VPADBASE lib exports
4 //
5 //  Copyright (C) 2010-2011 Nintendo.  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 #ifndef __VPADBASE_H__
14 #define __VPADBASE_H__
15 //////////////////////////////////////////////////////////////////////////////
16 
17 #ifdef __cplusplus
18 extern "C" {
19 #endif
20 
21 #include <types.h>
22 
23 //==================== defines ==========================//
24 
25 #define VPADBASE_CHAN0                    0
26 #define VPADBASE_CHAN1                    1
27 
28 #define VPADBASE_MAX_CONTROLLERS          2
29 
30 // Button
31 #define VPADBASE_BUTTON_LEFT        (0x0800)
32 #define VPADBASE_BUTTON_RIGHT       (0x0400)
33 #define VPADBASE_BUTTON_UP          (0x0200)
34 #define VPADBASE_BUTTON_DOWN        (0x0100)
35 #define VPADBASE_BUTTON_A           (0x8000)
36 #define VPADBASE_BUTTON_B           (0x4000)
37 #define VPADBASE_BUTTON_X           (0x2000)
38 #define VPADBASE_BUTTON_Y           (0x1000)
39 #define VPADBASE_BUTTON_HOME        (0x0002)
40 #define VPADBASE_TRIGGER_ZR         (0x0040)
41 #define VPADBASE_TRIGGER_ZL         (0x0080)
42 #define VPADBASE_TRIGGER_R          (0x0010)
43 #define VPADBASE_TRIGGER_L          (0x0020)
44 #define VPADBASE_BUTTON_PLUS        (0x0008)
45 #define VPADBASE_BUTTON_MINUS       (0x0004)
46 #define VPADBASE_BUTTON_SYNC        (0x0001)
47 #define VPADBASE_BUTTON_POWER       (0x0002)
48 
49 #define VPADBASE_BUTTON_STICK_R     (0x00020000)
50 #define VPADBASE_BUTTON_STICK_L     (0x00040000)
51 #define VPADBASE_BUTTON_TV          (0x00010000)
52 
53 
54 // Battery level
55 #define VPADBASE_BATTERY_LEVEL_CHARGE     (0)
56 #define VPADBASE_BATTERY_LEVEL_SHUTDOWN   (1)
57 #define VPADBASE_BATTERY_LEVEL_CRITICAL   (2)
58 #define VPADBASE_BATTERY_LEVEL_LOW        (3)
59 #define VPADBASE_BATTERY_LEVEL_MEDIUM     (4)
60 #define VPADBASE_BATTERY_LEVEL_HIGH       (5)
61 #define VPADBASE_BATTERY_LEVEL_MAX        (6)
62 
63 
64 // error
65 #define VPADBASE_ERR_NONE                 (  0 )
66 #define VPADBASE_ERR_NO_CONTROLLER        ( -1 )
67 
68 
69 
70 #ifdef __cplusplus
71 }
72 #endif
73 
74 #endif//__VPADBASE_H__
75