USB Host Shield 2.0
controllerEnums.h
Go to the documentation of this file.
1 /* Copyright (C) 2013 Kristian Lauszus, TKJ Electronics. All rights reserved.
2 
3  This software may be distributed and modified under the terms of the GNU
4  General Public License version 2 (GPL2) as published by the Free Software
5  Foundation and appearing in the file GPL2.TXT included in the packaging of
6  this file. Please note that GPL2 Section 2[b] requires that all works based
7  on this software must also be made publicly available under the terms of
8  the GPL2 ("Copyleft").
9 
10  Contact information
11  -------------------
12 
13  Kristian Lauszus, TKJ Electronics
14  Web : http://www.tkjelectronics.com
15  e-mail : kristianl@tkjelectronics.com
16  */
17 
18 #ifndef _controllerenums_h
19 #define _controllerenums_h
20 
27 enum LEDEnum {
28  OFF = 0,
29 #ifndef RBL_NRF51822
30  LED1 = 1,
31  LED2 = 2,
32  LED3 = 3,
33  LED4 = 4,
34 #endif
35  LED5 = 5,
36  LED6 = 6,
37  LED7 = 7,
38  LED8 = 8,
39  LED9 = 9,
40  LED10 = 10,
42  ALL = 5,
43 };
44 
46 enum ColorsEnum {
48  Red = 0xFF0000,
50  Green = 0xFF00,
52  Blue = 0xFF,
53 
55  Yellow = 0xFFEB04,
57  Lightblue = 0xFFFF,
59  Purple = 0xFF00FF,
60  Purble = 0xFF00FF,
61 
63  White = 0xFFFFFF,
65  Off = 0x00,
66 };
67 
68 enum RumbleEnum {
69  RumbleHigh = 0x10,
70  RumbleLow = 0x20,
71 };
72 
74 enum ButtonEnum {
77  UP = 0,
78  RIGHT = 1,
79  DOWN = 2,
80  LEFT = 3,
85  PLUS = 5,
86  TWO = 6,
87  ONE = 7,
88  MINUS = 8,
89  HOME = 9,
90  Z = 10,
91  C = 11,
92  B = 12,
93  A = 13,
98  L = 16,
99  R = 17,
100  ZL = 18,
101  ZR = 19,
106  SELECT = 4,
107  START = 5,
108  L3 = 6,
109  R3 = 7,
110 
111  L2 = 8,
112  R2 = 9,
113  L1 = 10,
114  R1 = 11,
115  TRIANGLE = 12,
116  CIRCLE = 13,
117  CROSS = 14,
118  SQUARE = 15,
119 
120  PS = 16,
121 
122  MOVE = 17, // Covers 12 bits - we only need to read the top 8
123  T = 18, // Covers 12 bits - we only need to read the top 8
127  SHARE = 4,
128  OPTIONS = 5,
129  TOUCHPAD = 17,
134  BACK = 4,
135  X = 14,
136  Y = 15,
137  XBOX = 16,
138  SYNC = 17,
139  BLACK = 8, // Available on the original Xbox controller
140  WHITE = 9, // Available on the original Xbox controller
144  RED = 0,
145  YELLOW = 1,
146  GREEN = 2,
147  ORANGE = 3,
148  BLUE = 4,
150 };
151 
155  LeftHatX = 0,
157  LeftHatY = 1,
162 };
163 
170  aX = 50, aY = 52, aZ = 54,
172  gZ = 56,
173  gX, gY, // These are not available on the PS3 controller
174 
176  aXmove = 28,
178  aZmove = 30,
180  aYmove = 32,
181 
183  gXmove = 40,
185  gZmove = 42,
187  gYmove = 44,
188 
190  tempMove = 46,
191 
193  mXmove = 47,
195  mZmove = 49,
197  mYmove = 50,
198 };
199 
201 enum AngleEnum {
202  Pitch = 0x01,
203  Roll = 0x02,
204 };
205 
206 #endif
AnalogHatEnum
LEDEnum
RumbleEnum
ButtonEnum
ColorsEnum
AngleEnum
SensorEnum