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
Purble
@ Purble
Definition: controllerEnums.h:64
R3
@ R3
Definition: controllerEnums.h:113
LED5
@ LED5
Definition: controllerEnums.h:39
gYmove
@ gYmove
Definition: controllerEnums.h:204
LED8
@ LED8
Definition: controllerEnums.h:42
gX
@ gX
Definition: controllerEnums.h:190
SQUARE
@ SQUARE
Definition: controllerEnums.h:122
SHARE
@ SHARE
Definition: controllerEnums.h:131
LED1
@ LED1
Definition: controllerEnums.h:34
Yellow
@ Yellow
Definition: controllerEnums.h:59
aZ
@ aZ
Definition: controllerEnums.h:187
aYmove
@ aYmove
Definition: controllerEnums.h:197
mZmove
@ mZmove
Definition: controllerEnums.h:212
BLUE
@ BLUE
Definition: controllerEnums.h:159
MENU
@ MENU
Definition: controllerEnums.h:150
SensorEnum
SensorEnum
Definition: controllerEnums.h:185
LED10
@ LED10
Definition: controllerEnums.h:44
CROSS
@ CROSS
Definition: controllerEnums.h:121
Y
@ Y
Definition: controllerEnums.h:140
WHITE
@ WHITE
Definition: controllerEnums.h:144
X
@ X
Definition: controllerEnums.h:139
SYNC
@ SYNC
Definition: controllerEnums.h:142
gZmove
@ gZmove
Definition: controllerEnums.h:202
AngleEnum
AngleEnum
Definition: controllerEnums.h:218
aXmove
@ aXmove
Definition: controllerEnums.h:193
TRIANGLE
@ TRIANGLE
Definition: controllerEnums.h:119
BLACK
@ BLACK
Definition: controllerEnums.h:143
BACK
@ BACK
Definition: controllerEnums.h:138
UP
@ UP
Definition: controllerEnums.h:81
aY
@ aY
Definition: controllerEnums.h:187
A
@ A
Definition: controllerEnums.h:97
mXmove
@ mXmove
Definition: controllerEnums.h:210
MICROPHONE
@ MICROPHONE
Definition: controllerEnums.h:165
R1
@ R1
Definition: controllerEnums.h:118
TWO
@ TWO
Definition: controllerEnums.h:90
RIGHT
@ RIGHT
Definition: controllerEnums.h:82
ORANGE
@ ORANGE
Definition: controllerEnums.h:158
B
@ B
Definition: controllerEnums.h:96
LEDEnum
LEDEnum
Definition: controllerEnums.h:31
ONE
@ ONE
Definition: controllerEnums.h:91
DOWN
@ DOWN
Definition: controllerEnums.h:83
Pitch
@ Pitch
Definition: controllerEnums.h:219
MOVE
@ MOVE
Definition: controllerEnums.h:126
gXmove
@ gXmove
Definition: controllerEnums.h:200
LED2
@ LED2
Definition: controllerEnums.h:35
RightHatY
@ RightHatY
Definition: controllerEnums.h:178
ALL
@ ALL
Definition: controllerEnums.h:46
RumbleEnum
RumbleEnum
Definition: controllerEnums.h:72
LED9
@ LED9
Definition: controllerEnums.h:43
YELLOW
@ YELLOW
Definition: controllerEnums.h:156
GREEN
@ GREEN
Definition: controllerEnums.h:157
L2
@ L2
Definition: controllerEnums.h:115
LED4
@ LED4
Definition: controllerEnums.h:37
aZmove
@ aZmove
Definition: controllerEnums.h:195
Roll
@ Roll
Definition: controllerEnums.h:220
SELECT
@ SELECT
Definition: controllerEnums.h:110
ZR
@ ZR
Definition: controllerEnums.h:105
gZ
@ gZ
Definition: controllerEnums.h:189
L
@ L
Definition: controllerEnums.h:102
T
@ T
Definition: controllerEnums.h:127
Purple
@ Purple
Definition: controllerEnums.h:63
White
@ White
Definition: controllerEnums.h:67
LED6
@ LED6
Definition: controllerEnums.h:40
Green
@ Green
Definition: controllerEnums.h:54
PLUS
@ PLUS
Definition: controllerEnums.h:89
XBOX
@ XBOX
Definition: controllerEnums.h:141
tempMove
@ tempMove
Definition: controllerEnums.h:207
CREATE
@ CREATE
Definition: controllerEnums.h:164
RED
@ RED
Definition: controllerEnums.h:155
ColorsEnum
ColorsEnum
Definition: controllerEnums.h:50
OFF
@ OFF
Definition: controllerEnums.h:32
Blue
@ Blue
Definition: controllerEnums.h:56
L1
@ L1
Definition: controllerEnums.h:117
Z
@ Z
Definition: controllerEnums.h:94
C
@ C
Definition: controllerEnums.h:95
VIEW
@ VIEW
Definition: controllerEnums.h:149
CIRCLE
@ CIRCLE
Definition: controllerEnums.h:120
TOUCHPAD
@ TOUCHPAD
Definition: controllerEnums.h:133
LED7
@ LED7
Definition: controllerEnums.h:41
R
@ R
Definition: controllerEnums.h:103
RumbleHigh
@ RumbleHigh
Definition: controllerEnums.h:73
R2
@ R2
Definition: controllerEnums.h:116
LeftHatX
@ LeftHatX
Definition: controllerEnums.h:172
L3
@ L3
Definition: controllerEnums.h:112
HOME
@ HOME
Definition: controllerEnums.h:93
Off
@ Off
Definition: controllerEnums.h:69
aX
@ aX
Definition: controllerEnums.h:187
MINUS
@ MINUS
Definition: controllerEnums.h:92
PS
@ PS
Definition: controllerEnums.h:124
LED3
@ LED3
Definition: controllerEnums.h:36
ZL
@ ZL
Definition: controllerEnums.h:104
Red
@ Red
Definition: controllerEnums.h:52
Lightblue
@ Lightblue
Definition: controllerEnums.h:61
ButtonEnum
ButtonEnum
Definition: controllerEnums.h:78
LEFT
@ LEFT
Definition: controllerEnums.h:84
RumbleLow
@ RumbleLow
Definition: controllerEnums.h:74
AnalogHatEnum
AnalogHatEnum
Definition: controllerEnums.h:170
LeftHatY
@ LeftHatY
Definition: controllerEnums.h:174
gY
@ gY
Definition: controllerEnums.h:190
RightHatX
@ RightHatX
Definition: controllerEnums.h:176
mYmove
@ mYmove
Definition: controllerEnums.h:214
OPTIONS
@ OPTIONS
Definition: controllerEnums.h:132
START
@ START
Definition: controllerEnums.h:111