logo

qmk_firmware

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

3x6.c (5223B)


  1. /*
  2. * Copyright 2022 Charly Delay <charly@codesink.dev> (@0xcharly)
  3. *
  4. * This program is free software: you can redistribute it and/or modify
  5. * it under the terms of the GNU General Publicw 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 "charybdis.h"
  18. // clang-format off
  19. #ifdef RGB_MATRIX_ENABLE
  20. /**
  21. * \brief LEDs index.
  22. *
  23. # 0,0 14 28 42 56 70 84 98 126 140 154 168 182 196 210 224,0
  24. # 0,0 15 30 45 60 75 90 105 119 134 149 164 179 194 209 224,0
  25. * ╭────────────────────────╮ ╭────────────────────────╮
  26. * 0 5 6 11 12 15 36 33 32 27 26 21
  27. * ├────────────────────────┤ ├────────────────────────┤
  28. * 1 4 7 10 13 16 37 34 31 28 25 22
  29. * ├────────────────────────┤ ├────────────────────────┤
  30. * 2 3 8 9 14 17 38 35 30 29 24 23
  31. * ╰────────────────────────╯ ╰────────────────────────╯
  32. * 18 19 20 39 40 XX
  33. * ╰────────────╯ ╰────────────╯
  34. *
  35. * Note: the LED config simulates 42 LEDs instead of the actual 41 to prevent
  36. * confusion when testing LEDs during assembly when handedness is not set
  37. * correctly. Those fake LEDs are bound to the physical top-left corner.
  38. */
  39. led_config_t g_led_config = { {
  40. /* Key Matrix to LED index. */
  41. // Left split.
  42. { 0, 5, 6, 11, 12, 15 }, // Top row
  43. { 1, 4, 7, 10, 13, 16 }, // Middle row
  44. { 2, 3, 8, 9, 14, 17 }, // Bottom row
  45. { NO_LED, 20, NO_LED, 18, 19, NO_LED }, // Thumb cluster
  46. // Right split.
  47. { 21, 26, 27, 32, 33, 36 }, // Top row
  48. { 22, 25, 28, 31, 34, 37 }, // Middle row
  49. { 23, 24, 29, 30, 35, 38 }, // Bottom row
  50. { NO_LED, 41, NO_LED, 39, 40, NO_LED }, // Thumb cluster
  51. }, {
  52. /* LED index to physical position. */
  53. // Left split.
  54. /* index=0 */ { 0, 0 }, { 0, 21 }, { 0, 42 }, // col 1 (left most)
  55. /* index=3 */ { 15, 42 }, { 15, 21 }, { 15, 0 }, // col 2
  56. /* index=6 */ { 30, 0 }, { 30, 21 }, { 30, 42 },
  57. /* index=9 */ { 45, 42 }, { 45, 21 }, { 45, 0 },
  58. /* index=12 */ { 60, 0 }, { 60, 21 }, { 60, 42 },
  59. /* index=15 */ { 75, 0 }, { 75, 21 }, { 75, 42 },
  60. /* index=18 */ { 75, 64 }, { 90, 64 }, { 105, 64 }, // Thumb cluster
  61. // Right split.
  62. /* index=21 */ { 224, 0 }, { 224, 21 }, { 224, 42 }, // col 12 (right most)
  63. /* index=24 */ { 209, 42 }, { 209, 21 }, { 209, 0 }, // col 10
  64. /* index=27 */ { 194, 0 }, { 194, 21 }, { 194, 42 },
  65. /* index=30 */ { 179, 42 }, { 179, 21 }, { 179, 0 },
  66. /* index=33 */ { 164, 0 }, { 164, 21 }, { 164, 42 },
  67. /* index=36 */ { 149, 0 }, { 149, 21 }, { 149, 42 },
  68. /* index=39 */ { 119, 64 }, { 134, 64 }, { 0, 0 }, // Thumb cluster
  69. }, {
  70. /* LED index to flag. */
  71. // Left split.
  72. /* index=0 */ LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, // col 1
  73. /* index=3 */ LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, // col 2
  74. /* index=6 */ LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT,
  75. /* index=9 */ LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT,
  76. /* index=12 */ LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT,
  77. /* index=15 */ LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT,
  78. /* index=18 */ LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, // Thumb cluster
  79. // Right split.
  80. /* index=21 */ LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, // col 10
  81. /* index=24 */ LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, // col 9
  82. /* index=27 */ LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT,
  83. /* index=30 */ LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT,
  84. /* index=33 */ LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT,
  85. /* index=36 */ LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT,
  86. /* index=39 */ LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, // Thumb cluster
  87. } };
  88. #endif
  89. // clang-format on