]> git.friedersdorff.com Git - max/tmk_keyboard.git/blob - tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/xboxEnums.h
lufa: usb-usb: Use LUFA startup instead of cusotom
[max/tmk_keyboard.git] / tmk_core / protocol / usb_hid / USB_Host_Shield_2.0 / xboxEnums.h
1 /* Copyright (C) 2012 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 _xboxenums_h
19 #define _xboxenums_h
20
21 #include "controllerEnums.h"
22
23 /** Enum used to set special LED modes supported by the Xbox controller. */
24 enum LEDModeEnum {
25         ROTATING = 0x0A,
26         FASTBLINK = 0x0B,
27         SLOWBLINK = 0x0C,
28         ALTERNATING = 0x0D,
29 };
30
31 /** Used to set the LEDs on the controllers */
32 const uint8_t XBOX_LEDS[] PROGMEM = {
33         0x00, // OFF
34         0x02, // LED1
35         0x03, // LED2
36         0x04, // LED3
37         0x05, // LED4
38         0x01, // ALL - Used to blink all LEDs
39 };
40 /** Buttons on the controllers */
41 const uint16_t XBOX_BUTTONS[] PROGMEM = {
42         0x0100, // UP
43         0x0800, // RIGHT
44         0x0200, // DOWN
45         0x0400, // LEFT
46
47         0x2000, // BACK
48         0x1000, // START
49         0x4000, // L3
50         0x8000, // R3
51
52         0, 0, // Skip L2 and R2 as these are analog buttons
53         0x0001, // L1
54         0x0002, // R1
55
56         0x0020, // B
57         0x0010, // A
58         0x0040, // X
59         0x0080, // Y
60
61         0x0004, // XBOX
62         0x0008, // SYNC
63 };
64
65 #endif