the_mark.c 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /* Copyright 2020 Boardsource
  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 "the_mark.h"
  17. /* Map physical under glow LEDs for RGB matrix support */
  18. #ifdef RGB_MATRIX_ENABLE
  19. led_config_t g_led_config = { {
  20. // Key Matrix to LED Index
  21. { 10 , NO_LED, 9 , NO_LED, 8 , 7 , NO_LED, 6 , 5 , NO_LED, 4 , 3 , NO_LED, 2 , NO_LED, 1 },
  22. { 11 , NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, 0 },
  23. { 12 , NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, 23 },
  24. { 13 , NO_LED, 14 , NO_LED, 15 , 16 , NO_LED, 17 , 18 , NO_LED, 19 , 20 , NO_LED, 21 , NO_LED, NO_LED },
  25. { NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, 22 },
  26. }, {
  27. // LED Index to Physical Position
  28. {224, 42}, {224, 21}, {209, 21}, {179, 21}, {164, 21}, {134, 21}, {119, 21}, {89, 21}, {74, 21}, {45, 21}, {30, 21}, {30, 42},
  29. {30, 64}, {30, 85}, {45, 85}, {74, 85}, {89, 85}, {119, 85}, {134, 85}, {164, 85}, {179, 85}, {209, 85}, {224, 85}, {224, 64}
  30. }, {
  31. // LED Index to Flag
  32. LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL,
  33. LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL,
  34. LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL
  35. } };
  36. void suspend_power_down_kb(void) {
  37. rgb_matrix_set_suspend_state(true);
  38. suspend_power_down_user();
  39. }
  40. void suspend_wakeup_init_kb(void) {
  41. rgb_matrix_set_suspend_state(false);
  42. suspend_wakeup_init_user();
  43. }
  44. #endif