launch_pad.c 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. /* Copyright 2020 Ungodly Design <hello@ungodly.design>
  2. *
  3. * This program is free software: you can redistribute it and/or modify
  4. * it under the terms of the GNU General Public License as published by
  5. * the Free Software Foundation, either version 2 of the License, or
  6. * (at your option) any later version.
  7. *
  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. *
  13. * You should have received a copy of the GNU General Public License
  14. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  15. */
  16. #include "launch_pad.h"
  17. #ifdef RGB_MATRIX_ENABLE
  18. led_config_t g_led_config = { {
  19. // Key Matrix to LED Index
  20. { 14, 15, 16, 17 },
  21. { 13, 12, 11, 10 },
  22. { 6, 7, 8, 9 },
  23. { 5, 4, 3, 2 },
  24. {NO_LED, 0, 1, NO_LED }
  25. }, { // LED Index to Physical Position
  26. { 37, 60 }, { 148, 60 }, // row 5
  27. { 222, 54 }, { 148, 45 }, { 74, 45 }, { 0, 45 }, // row 4
  28. { 0, 30 }, { 74, 30 }, { 148, 30 }, { 222, 30 }, // row 3
  29. { 222, 15 }, { 148, 15 }, { 74, 15 }, { 0, 15 }, // row 2
  30. { 0, 0 }, { 74, 0 }, { 148, 0 }, { 222, 0 }, // row 1
  31. { 185, 7 }, { 37, 7 }, // top underglow
  32. { 37, 52 }, { 185, 52 }, // bottom underglow
  33. }, {
  34. // LED Index to Flag
  35. 4, 4, // row 5
  36. 4, 4, 4, 4, // row 4
  37. 4, 4, 4, 4, // row 3
  38. 4, 4, 4, 4, // row 2
  39. 4, 4, 4, 4, // row 1
  40. 2, 2,
  41. 2, 2
  42. } };
  43. #endif
  44. void eeconfig_init_kb(void) {
  45. #ifdef RGBLIGHT_ENABLE
  46. rgblight_enable(); // Enable RGB by default
  47. rgblight_sethsv(0, 255, 255); // Set default HSV - red hue, full saturation, full brightness
  48. # ifdef RGBLIGHT_ANIMATIONS
  49. rgblight_mode(RGBLIGHT_MODE_RAINBOW_SWIRL + 2); // set to RGB_RAINBOW_SWIRL by default
  50. # endif
  51. #endif
  52. #ifdef RGB_MATRIX_ENABLE
  53. rgb_matrix_enable(); // Enable RGB by default
  54. #endif
  55. eeconfig_update_kb(0);
  56. eeconfig_init_user();
  57. }