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
148  RED = 0,
149  YELLOW = 1,
150  GREEN = 2,
151  ORANGE = 3,
152  BLUE = 4,
154 };
155 
159  LeftHatX = 0,
161  LeftHatY = 1,
166 };
167 
174  aX = 50, aY = 52, aZ = 54,
176  gZ = 56,
177  gX, gY, // These are not available on the PS3 controller
178 
180  aXmove = 28,
182  aZmove = 30,
184  aYmove = 32,
185 
187  gXmove = 40,
189  gZmove = 42,
191  gYmove = 44,
192 
194  tempMove = 46,
195 
197  mXmove = 47,
199  mZmove = 49,
201  mYmove = 50,
202 };
203 
205 enum AngleEnum {
206  Pitch = 0x01,
207  Roll = 0x02,
208 };
209 
210 #endif
AnalogHatEnum
LEDEnum
RumbleEnum
ButtonEnum
ColorsEnum
AngleEnum
SensorEnum