Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
Repozitorijs ir arhivēts. Tam var aplūkot failus un to var klonēt, bet nevar iesūtīt jaunas izmaiņas, kā arī atvērt jaunas problēmas/izmaiņu pieprasījumus.

xboxEnums.h 1.6KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. /* Copyright (C) 2012 Kristian Lauszus, TKJ Electronics. All rights reserved.
  2. This software may be distributed and modified under the terms of the GNU
  3. General Public License version 2 (GPL2) as published by the Free Software
  4. Foundation and appearing in the file GPL2.TXT included in the packaging of
  5. this file. Please note that GPL2 Section 2[b] requires that all works based
  6. on this software must also be made publicly available under the terms of
  7. the GPL2 ("Copyleft").
  8. Contact information
  9. -------------------
  10. Kristian Lauszus, TKJ Electronics
  11. Web : http://www.tkjelectronics.com
  12. e-mail : [email protected]
  13. */
  14. #ifndef _xboxenums_h
  15. #define _xboxenums_h
  16. #include "controllerEnums.h"
  17. /** Enum used to set special LED modes supported by the Xbox controller. */
  18. enum LEDModeEnum {
  19. ROTATING = 0x0A,
  20. FASTBLINK = 0x0B,
  21. SLOWBLINK = 0x0C,
  22. ALTERNATING = 0x0D,
  23. };
  24. /** Used to set the LEDs on the controllers */
  25. const uint8_t XBOX_LEDS[] PROGMEM = {
  26. 0x00, // OFF
  27. 0x02, // LED1
  28. 0x03, // LED2
  29. 0x04, // LED3
  30. 0x05, // LED4
  31. 0x01, // ALL - Used to blink all LEDs
  32. };
  33. /** Buttons on the controllers */
  34. const uint16_t XBOX_BUTTONS[] PROGMEM = {
  35. 0x0100, // UP
  36. 0x0800, // RIGHT
  37. 0x0200, // DOWN
  38. 0x0400, // LEFT
  39. 0x2000, // BACK
  40. 0x1000, // START
  41. 0x4000, // L3
  42. 0x8000, // R3
  43. 0, 0, // Skip L2 and R2 as these are analog buttons
  44. 0x0001, // L1
  45. 0x0002, // R1
  46. 0x0020, // B
  47. 0x0010, // A
  48. 0x0040, // X
  49. 0x0080, // Y
  50. 0x0004, // XBOX
  51. 0x0008, // SYNC
  52. };
  53. #endif