logo

qmk_firmware

custom branch of QMK firmware git clone https://anongit.hacktivis.me/git/qmk_firmware.git

skeletyl.c (4365B)


  1. /*
  2. * Copyright 2021 Quentin LEBASTARD <qlebastard@gmail.com>
  3. *
  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. *
  9. * This program is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU General Public License
  15. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  16. */
  17. #include "quantum.h"
  18. /**
  19. * LEDs index.
  20. *
  21. * ╭────────────────────╮ ╭────────────────────╮
  22. * 2 3 8 9 12 30 27 26 21 20
  23. * ├────────────────────┤ ├────────────────────┤
  24. * 1 4 7 10 13 31 28 25 22 19
  25. * ├────────────────────┤ ├────────────────────┤
  26. * 0 5 6 11 14 32 29 24 23 18
  27. * ╰────────────────────╯ ╰────────────────────╯
  28. * 15 16 17 35 34 33
  29. * ╰────────────╯ ╰────────────╯
  30. */
  31. // clang-format off
  32. #ifdef RGB_MATRIX_ENABLE
  33. led_config_t g_led_config = { {
  34. /* Key Matrix to LED index. */
  35. // Left split.
  36. { 2, 3, 8, 9, 12 }, // Top row
  37. { 1, 4, 7, 10, 13 }, // Middle row
  38. { 0, 5, 6, 11, 14 }, // Bottom row
  39. { 17, NO_LED, 15, 16, NO_LED }, // Thumb cluster
  40. // Right split.
  41. { 20, 21, 26, 27, 30 }, // Top row
  42. { 19, 22, 25, 28, 31 }, // Middle row
  43. { 18, 23, 24, 29, 32 }, // Bottom row
  44. { 35, NO_LED, 33, 34, NO_LED }, // Thumb cluster
  45. }, {
  46. /* LED index to physical position. */
  47. // Left split.
  48. /* index=0 */ { 0, 42 }, { 0, 21 }, { 0, 0 }, // col 1 (left most)
  49. /* index=3 */ { 18, 0 }, { 18, 21 }, { 18, 42 }, // col 2
  50. /* index=6 */ { 36, 42 }, { 36, 21 }, { 36, 0 },
  51. /* index=9 */ { 54, 0 }, { 54, 21 }, { 54, 42 },
  52. /* index=12 */ { 72, 0 }, { 72, 21 }, { 72, 42 },
  53. /* index=15 */ { 72, 64 }, { 90, 64 }, { 108, 64 }, // Thumb cluster
  54. // Right split.
  55. /* index=18 */ { 224, 42 }, { 224, 21 }, { 224, 0 }, // col 10 (right most)
  56. /* index=21 */ { 206, 0 }, { 206, 21 }, { 206, 42 }, // col 9
  57. /* index=24 */ { 188, 42 }, { 188, 21 }, { 188, 0 },
  58. /* index=27 */ { 170, 0 }, { 170, 21 }, { 170, 42 },
  59. /* index=30 */ { 152, 0 }, { 152, 21 }, { 152, 42 },
  60. /* index=33 */ { 152, 64 }, { 134, 64 }, { 116, 64 }, // Thumb cluster
  61. }, {
  62. /* LED index to flag. */
  63. // Left split.
  64. /* index=0 */ LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, // col 1
  65. /* index=3 */ LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, // col 2
  66. /* index=6 */ LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT,
  67. /* index=9 */ LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT,
  68. /* index=12 */ LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT,
  69. /* index=15 */ LED_FLAG_MODIFIER, LED_FLAG_MODIFIER, LED_FLAG_MODIFIER, // Thumb cluster
  70. // Right split.
  71. /* index=18 */ LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, // col 10
  72. /* index=21 */ LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, // col 9
  73. /* index=24 */ LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT,
  74. /* index=27 */ LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT,
  75. /* index=30 */ LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT,
  76. /* index=33 */ LED_FLAG_MODIFIER, LED_FLAG_MODIFIER, LED_FLAG_MODIFIER, // Thumb cluster
  77. } };
  78. #endif
  79. // clang-format on