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,
154
RED
= 0,
155
YELLOW
= 1,
156
GREEN
= 2,
157
ORANGE
= 3,
158
BLUE
= 4,
160
};
161
163
enum
AnalogHatEnum
{
165
LeftHatX
= 0,
167
LeftHatY
= 1,
169
RightHatX
= 2,
171
RightHatY
= 3,
172
};
173
178
enum
SensorEnum
{
180
aX
= 50,
aY
= 52,
aZ
= 54,
182
gZ
= 56,
183
gX
,
gY
,
// These are not available on the PS3 controller
184
186
aXmove
= 28,
188
aZmove
= 30,
190
aYmove
= 32,
191
193
gXmove
= 40,
195
gZmove
= 42,
197
gYmove
= 44,
198
200
tempMove
= 46,
201
203
mXmove
= 47,
205
mZmove
= 49,
207
mYmove
= 50,
208
};
209
211
enum
AngleEnum
{
212
Pitch
= 0x01,
213
Roll
= 0x02,
214
};
215
216
#endif
R3
Definition:
controllerEnums.h:113
RightHatX
Definition:
controllerEnums.h:169
LED5
Definition:
controllerEnums.h:39
START
Definition:
controllerEnums.h:111
gX
Definition:
controllerEnums.h:183
LED1
Definition:
controllerEnums.h:34
SHARE
Definition:
controllerEnums.h:131
Purble
Definition:
controllerEnums.h:64
aYmove
Definition:
controllerEnums.h:190
gYmove
Definition:
controllerEnums.h:197
LED8
Definition:
controllerEnums.h:42
BLUE
Definition:
controllerEnums.h:158
SQUARE
Definition:
controllerEnums.h:122
LED10
Definition:
controllerEnums.h:44
WHITE
Definition:
controllerEnums.h:144
AnalogHatEnum
AnalogHatEnum
Definition:
controllerEnums.h:163
Yellow
Definition:
controllerEnums.h:59
aZ
Definition:
controllerEnums.h:180
X
Definition:
controllerEnums.h:139
aXmove
Definition:
controllerEnums.h:186
mZmove
Definition:
controllerEnums.h:205
MENU
Definition:
controllerEnums.h:150
TRIANGLE
Definition:
controllerEnums.h:119
BACK
Definition:
controllerEnums.h:138
Y
Definition:
controllerEnums.h:140
CROSS
Definition:
controllerEnums.h:121
aY
Definition:
controllerEnums.h:180
UP
Definition:
controllerEnums.h:81
SYNC
Definition:
controllerEnums.h:142
gZmove
Definition:
controllerEnums.h:195
LEDEnum
LEDEnum
Definition:
controllerEnums.h:31
B
Definition:
controllerEnums.h:96
RIGHT
Definition:
controllerEnums.h:82
BLACK
Definition:
controllerEnums.h:143
ONE
Definition:
controllerEnums.h:91
RumbleEnum
RumbleEnum
Definition:
controllerEnums.h:72
A
Definition:
controllerEnums.h:97
mXmove
Definition:
controllerEnums.h:203
R1
Definition:
controllerEnums.h:118
LED2
Definition:
controllerEnums.h:35
TWO
Definition:
controllerEnums.h:90
gXmove
Definition:
controllerEnums.h:193
ORANGE
Definition:
controllerEnums.h:157
RightHatY
Definition:
controllerEnums.h:171
DOWN
Definition:
controllerEnums.h:83
Pitch
Definition:
controllerEnums.h:212
LED9
Definition:
controllerEnums.h:43
MOVE
Definition:
controllerEnums.h:126
ButtonEnum
ButtonEnum
Definition:
controllerEnums.h:78
L2
Definition:
controllerEnums.h:115
LED4
Definition:
controllerEnums.h:37
aZmove
Definition:
controllerEnums.h:188
Roll
Definition:
controllerEnums.h:213
SELECT
Definition:
controllerEnums.h:110
L
Definition:
controllerEnums.h:102
ALL
Definition:
controllerEnums.h:46
ZR
Definition:
controllerEnums.h:105
Purple
Definition:
controllerEnums.h:63
T
Definition:
controllerEnums.h:127
White
Definition:
controllerEnums.h:67
LED6
Definition:
controllerEnums.h:40
Green
Definition:
controllerEnums.h:54
YELLOW
Definition:
controllerEnums.h:155
GREEN
Definition:
controllerEnums.h:156
ColorsEnum
ColorsEnum
Definition:
controllerEnums.h:50
XBOX
Definition:
controllerEnums.h:141
tempMove
Definition:
controllerEnums.h:200
OFF
Definition:
controllerEnums.h:32
gZ
Definition:
controllerEnums.h:182
AngleEnum
AngleEnum
Definition:
controllerEnums.h:211
L1
Definition:
controllerEnums.h:117
Blue
Definition:
controllerEnums.h:56
Z
Definition:
controllerEnums.h:94
C
Definition:
controllerEnums.h:95
PLUS
Definition:
controllerEnums.h:89
R
Definition:
controllerEnums.h:103
RED
Definition:
controllerEnums.h:154
RumbleHigh
Definition:
controllerEnums.h:73
L3
Definition:
controllerEnums.h:112
Off
Definition:
controllerEnums.h:69
PS
Definition:
controllerEnums.h:124
CIRCLE
Definition:
controllerEnums.h:120
MINUS
Definition:
controllerEnums.h:92
LED3
Definition:
controllerEnums.h:36
VIEW
Definition:
controllerEnums.h:149
TOUCHPAD
Definition:
controllerEnums.h:133
Red
Definition:
controllerEnums.h:52
LED7
Definition:
controllerEnums.h:41
Lightblue
Definition:
controllerEnums.h:61
LeftHatY
Definition:
controllerEnums.h:167
LeftHatX
Definition:
controllerEnums.h:165
SensorEnum
SensorEnum
Definition:
controllerEnums.h:178
R2
Definition:
controllerEnums.h:116
HOME
Definition:
controllerEnums.h:93
gY
Definition:
controllerEnums.h:183
OPTIONS
Definition:
controllerEnums.h:132
mYmove
Definition:
controllerEnums.h:207
aX
Definition:
controllerEnums.h:180
ZL
Definition:
controllerEnums.h:104
LEFT
Definition:
controllerEnums.h:84
RumbleLow
Definition:
controllerEnums.h:74
Generated by
1.8.13