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 
21 #if defined(ESP32)
22 #undef PS
23 #endif
24 
31 enum LEDEnum {
32  OFF = 0,
33 #ifndef RBL_NRF51822
34  LED1 = 1,
35  LED2 = 2,
36  LED3 = 3,
37  LED4 = 4,
38 #endif
39  LED5 = 5,
40  LED6 = 6,
41  LED7 = 7,
42  LED8 = 8,
43  LED9 = 9,
44  LED10 = 10,
46  ALL = 5,
47 };
48 
50 enum ColorsEnum {
52  Red = 0xFF0000,
54  Green = 0xFF00,
56  Blue = 0xFF,
57 
59  Yellow = 0xFFEB04,
61  Lightblue = 0xFFFF,
63  Purple = 0xFF00FF,
64  Purble = 0xFF00FF,
65 
67  White = 0xFFFFFF,
69  Off = 0x00,
70 };
71 
72 enum RumbleEnum {
73  RumbleHigh = 0x10,
74  RumbleLow = 0x20,
75 };
76 
78 enum ButtonEnum {
81  UP = 0,
82  RIGHT = 1,
83  DOWN = 2,
84  LEFT = 3,
89  PLUS = 5,
90  TWO = 6,
91  ONE = 7,
92  MINUS = 8,
93  HOME = 9,
94  Z = 10,
95  C = 11,
96  B = 12,
97  A = 13,
102  L = 16,
103  R = 17,
104  ZL = 18,
105  ZR = 19,
110  SELECT = 4,
111  START = 5,
112  L3 = 6,
113  R3 = 7,
114 
115  L2 = 8,
116  R2 = 9,
117  L1 = 10,
118  R1 = 11,
119  TRIANGLE = 12,
120  CIRCLE = 13,
121  CROSS = 14,
122  SQUARE = 15,
123 
124  PS = 16,
125 
126  MOVE = 17, // Covers 12 bits - we only need to read the top 8
127  T = 18, // Covers 12 bits - we only need to read the top 8
131  SHARE = 4,
132  OPTIONS = 5,
133  TOUCHPAD = 17,
138  BACK = 4,
139  X = 14,
140  Y = 15,
141  XBOX = 16,
142  SYNC = 17,
143  BLACK = 8, // Available on the original Xbox controller
144  WHITE = 9, // Available on the original Xbox controller
149  VIEW = 4,
150  MENU = 5,
155  RED = 0,
156  YELLOW = 1,
157  GREEN = 2,
158  ORANGE = 3,
159  BLUE = 4,
164  CREATE = 4,
167 };
168 
172  LeftHatX = 0,
174  LeftHatY = 1,
179 };
180 
187  aX = 50, aY = 52, aZ = 54,
189  gZ = 56,
190  gX, gY, // These are not available on the PS3 controller
191 
193  aXmove = 28,
195  aZmove = 30,
197  aYmove = 32,
198 
200  gXmove = 40,
202  gZmove = 42,
204  gYmove = 44,
205 
207  tempMove = 46,
208 
210  mXmove = 47,
212  mZmove = 49,
214  mYmove = 50,
215 };
216 
218 enum AngleEnum {
219  Pitch = 0x01,
220  Roll = 0x02,
221 };
222 
223 #endif
AnalogHatEnum
LEDEnum
RumbleEnum
ButtonEnum
ColorsEnum
AngleEnum
SensorEnum