Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
xboxEnums.h
00001 /* Copyright (C) 2012 Kristian Lauszus, TKJ Electronics. All rights reserved. 00002 00003 This software may be distributed and modified under the terms of the GNU 00004 General Public License version 2 (GPL2) as published by the Free Software 00005 Foundation and appearing in the file GPL2.TXT included in the packaging of 00006 this file. Please note that GPL2 Section 2[b] requires that all works based 00007 on this software must also be made publicly available under the terms of 00008 the GPL2 ("Copyleft"). 00009 00010 Contact information 00011 ------------------- 00012 00013 Kristian Lauszus, TKJ Electronics 00014 Web : http://www.tkjelectronics.com 00015 e-mail : kristianl@tkjelectronics.com 00016 */ 00017 00018 #ifndef _xboxenums_h 00019 #define _xboxenums_h 00020 00021 #include "controllerEnums.h" 00022 00023 /** Enum used to set special LED modes supported by the Xbox controller. */ 00024 enum LEDModeEnum { 00025 ROTATING = 0x0A, 00026 FASTBLINK = 0x0B, 00027 SLOWBLINK = 0x0C, 00028 ALTERNATING = 0x0D, 00029 }; 00030 00031 /** Used to set the LEDs on the controllers */ 00032 const uint8_t XBOX_LEDS[] PROGMEM = { 00033 0x00, // OFF 00034 0x02, // LED1 00035 0x03, // LED2 00036 0x04, // LED3 00037 0x05, // LED4 00038 0x01, // ALL - Used to blink all LEDs 00039 }; 00040 /** Buttons on the controllers */ 00041 const uint16_t XBOX_BUTTONS[] PROGMEM = { 00042 0x0100, // UP 00043 0x0800, // RIGHT 00044 0x0200, // DOWN 00045 0x0400, // LEFT 00046 00047 0x2000, // BACK 00048 0x1000, // START 00049 0x4000, // L3 00050 0x8000, // R3 00051 00052 0, 0, // Skip L2 and R2 as these are analog buttons 00053 0x0001, // L1 00054 0x0002, // R1 00055 00056 0x0020, // B 00057 0x0010, // A 00058 0x0040, // X 00059 0x0080, // Y 00060 00061 0x0004, // XBOX 00062 0x0008, // SYNC 00063 }; 00064 00065 #endif 00066
Generated on Thu Jul 14 2022 08:33:41 by
1.7.2