USB_Host_Shield_2.0
Main Page
Related Pages
Classes
Files
File List
File Members
All
Classes
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Pages
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
/*
22
This header file is used to store different enums for the controllers,
23
This is necessary so all the different libraries can be used at once
24
*/
25
26
enum
LED
{
27
/* Enum used to turn on the LEDs on the different controllers */
28
LED1
= 0,
29
LED2
= 1,
30
LED3
= 2,
31
LED4
= 3,
32
33
LED5
= 4,
34
LED6
= 5,
35
LED7
= 6,
36
LED8
= 7,
37
LED9
= 8,
38
LED10
= 9,
39
ALL
= 4,
// Used to blink all LEDs on the Xbox controller
40
};
41
enum
Button
{
42
UP
= 0,
43
RIGHT
= 1,
44
DOWN
= 2,
45
LEFT
= 3,
46
47
/* Wii buttons */
48
PLUS
= 5,
49
TWO
= 6,
50
ONE
= 7,
51
MINUS
= 8,
52
HOME
= 9,
53
Z
= 10,
54
C
= 11,
55
B
= 12,
56
A
= 13,
57
58
/* PS3 controllers buttons */
59
SELECT
= 4,
60
L3
= 5,
61
R3
= 6,
62
START
= 7,
63
64
L2
= 8,
65
R2
= 9,
66
L1
= 10,
67
R1
= 11,
68
TRIANGLE
= 12,
69
CIRCLE
= 13,
70
CROSS
= 14,
71
SQUARE
= 15,
72
73
PS
= 16,
74
75
MOVE
= 17,
// covers 12 bits - we only need to read the top 8
76
T
= 18,
// covers 12 bits - we only need to read the top 8
77
78
/* Xbox buttons */
79
BACK
= 4,
80
X
= 14,
81
Y
= 15,
82
XBOX
= 16,
83
SYNC
= 17,
84
};
85
enum
AnalogHat
{
86
/* Joysticks on the PS3 and Xbox controllers */
87
LeftHatX
= 0,
88
LeftHatY
= 1,
89
RightHatX
= 2,
90
RightHatY
= 3,
91
};
92
93
#endif
Generated on Wed Jan 30 2013 21:23:56 for USB_Host_Shield_2.0 by
1.8.3.1