USB Host Shield 2.0
Github
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
157
enum
AnalogHatEnum
{
159
LeftHatX
= 0,
161
LeftHatY
= 1,
163
RightHatX
= 2,
165
RightHatY
= 3,
166
};
167
172
enum
SensorEnum
{
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
R3
Definition:
controllerEnums.h:113
RightHatX
Definition:
controllerEnums.h:163
LED5
Definition:
controllerEnums.h:39
START
Definition:
controllerEnums.h:111
gX
Definition:
controllerEnums.h:177
LED1
Definition:
controllerEnums.h:34
SHARE
Definition:
controllerEnums.h:131
Purble
Definition:
controllerEnums.h:64
aYmove
Definition:
controllerEnums.h:184
gYmove
Definition:
controllerEnums.h:191
LED8
Definition:
controllerEnums.h:42
BLUE
Definition:
controllerEnums.h:152
SQUARE
Definition:
controllerEnums.h:122
LED10
Definition:
controllerEnums.h:44
WHITE
Definition:
controllerEnums.h:144
AnalogHatEnum
AnalogHatEnum
Definition:
controllerEnums.h:157
Yellow
Definition:
controllerEnums.h:59
aZ
Definition:
controllerEnums.h:174
X
Definition:
controllerEnums.h:139
aXmove
Definition:
controllerEnums.h:180
mZmove
Definition:
controllerEnums.h:199
TRIANGLE
Definition:
controllerEnums.h:119
BACK
Definition:
controllerEnums.h:138
Y
Definition:
controllerEnums.h:140
CROSS
Definition:
controllerEnums.h:121
aY
Definition:
controllerEnums.h:174
UP
Definition:
controllerEnums.h:81
SYNC
Definition:
controllerEnums.h:142
gZmove
Definition:
controllerEnums.h:189
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:197
R1
Definition:
controllerEnums.h:118
LED2
Definition:
controllerEnums.h:35
TWO
Definition:
controllerEnums.h:90
gXmove
Definition:
controllerEnums.h:187
ORANGE
Definition:
controllerEnums.h:151
RightHatY
Definition:
controllerEnums.h:165
DOWN
Definition:
controllerEnums.h:83
Pitch
Definition:
controllerEnums.h:206
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:182
Roll
Definition:
controllerEnums.h:207
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:149
GREEN
Definition:
controllerEnums.h:150
ColorsEnum
ColorsEnum
Definition:
controllerEnums.h:50
XBOX
Definition:
controllerEnums.h:141
tempMove
Definition:
controllerEnums.h:194
OFF
Definition:
controllerEnums.h:32
gZ
Definition:
controllerEnums.h:176
AngleEnum
AngleEnum
Definition:
controllerEnums.h:205
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:148
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
TOUCHPAD
Definition:
controllerEnums.h:133
Red
Definition:
controllerEnums.h:52
LED7
Definition:
controllerEnums.h:41
Lightblue
Definition:
controllerEnums.h:61
LeftHatY
Definition:
controllerEnums.h:161
LeftHatX
Definition:
controllerEnums.h:159
SensorEnum
SensorEnum
Definition:
controllerEnums.h:172
R2
Definition:
controllerEnums.h:116
HOME
Definition:
controllerEnums.h:93
gY
Definition:
controllerEnums.h:177
OPTIONS
Definition:
controllerEnums.h:132
mYmove
Definition:
controllerEnums.h:201
aX
Definition:
controllerEnums.h:174
ZL
Definition:
controllerEnums.h:104
LEFT
Definition:
controllerEnums.h:84
RumbleLow
Definition:
controllerEnums.h:74
Generated by
1.8.14