config.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. /*
  2. Copyright 2012 Jun Wako <wakojun@gmail.com>
  3. Copyright 2015 Jack Humbert
  4. This program is free software: you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation, either version 2 of the License, or
  7. (at your option) any later version.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with this program. If not, see <http://www.gnu.org/licenses/>.
  14. */
  15. #pragma once
  16. /* ws2812 RGB LED */
  17. #define RGB_DI_PIN B7
  18. // Underglow / DIY Tent Glow are parallel to the top row leds, no separate define
  19. // Full Hand case adds 24 LEDs, Star Fighter case adds 38 LEDs
  20. // For mirrored LED control (each MCU controls half the LEDs), total LED counts are divided in half
  21. #ifdef LED_MIRRORED
  22. #ifdef FULLHAND_ENABLE
  23. #define FULLHAND_LEDS 24
  24. #define RGBLED_NUM 74
  25. #elif SF_ENABLE
  26. #define FULLHAND_LEDS 38
  27. #define RGBLED_NUM 81
  28. #else
  29. #define FULLHAND_LEDS 0
  30. #define RGBLED_NUM 62
  31. #endif
  32. #else
  33. #ifdef FULLHAND_ENABLE
  34. #define FULLHAND_LEDS 24
  35. #define RGBLED_NUM 148
  36. #elif SF_ENABLE
  37. #define FULLHAND_LEDS 38
  38. #define RGBLED_NUM 162
  39. #else
  40. #define FULLHAND_LEDS 0
  41. #define RGBLED_NUM 124
  42. #endif
  43. #endif
  44. #define DRIVER_LED_TOTAL RGBLED_NUM
  45. #define RGB_MATRIX_CENTER { 112, 37 }
  46. // Encoder support
  47. #ifndef EXTRA_ENCODERS_ENABLE
  48. #define ENCODERS_PAD_A { D2 }
  49. #define ENCODERS_PAD_B { D6 }
  50. #else
  51. #ifdef OLED_ENABLE
  52. #error Extra encoders cannot be enabled at the same time as the OLED Driver as they use the same pins.
  53. #endif
  54. #define ENCODERS_PAD_A { D2, D1, B0 }
  55. #define ENCODERS_PAD_B { D6, B1, D0 }
  56. #endif