logo

qmk_firmware

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

kimiko.c (3095B)


  1. /* Copyright 2023 @BenRoe (keycapsss.com)
  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 "quantum.h"
  17. #ifdef KEYBOARD_keycapsss_kimiko_rev1
  18. #ifdef RGB_MATRIX_ENABLE
  19. //Thanks to Ben (keycapsss) for helpipng me to create g_led_config
  20. // Physical LED position
  21. // X 0 16 32 48 64 80 96 112 128 144 160 176 208 224
  22. // -----------------------------------------------------------| Y
  23. // 5 4 3 2 1 0 0 1 2 3 4 5 | 0
  24. // 6 7 8 9 10 11 11 10 9 8 7 6 | 16
  25. // 17 16 15 14 13 12 12 13 14 15 16 17 | 32
  26. // 18 19 20 21 22 23 24 24 23 22 21 20 19 18 | 48
  27. // 29 28 27 26 25 25 26 27 28 29 | 64
  28. led_config_t g_led_config = { {
  29. // Key Matrix to LED Index
  30. { 5, 4, 3, 2, 1, 0 },
  31. { 6, 7, 8, 9, 10, 11 },
  32. { 17, 16, 15, 14, 13, 12 },
  33. { 18, 19, 20, 21, 22, 23 },
  34. { 29, 28, 27, 26, 25, 24 },
  35. { 35, 34, 33, 32, 31, 30 },
  36. { 36, 37, 38, 39, 40, 41 },
  37. { 47, 46, 45, 44, 43, 42 },
  38. { 48, 49, 50, 51, 52, 53 },
  39. { 59, 58, 57, 56, 55, 54 }
  40. }, {
  41. // LED Index to Physical Position
  42. // Left half
  43. { 80, 0 }, { 64, 0 }, { 48, 0 }, { 32, 0 }, { 16, 0 }, { 0, 0 },
  44. { 0, 16 }, { 16, 16 }, { 32, 16 }, { 48, 16 }, { 64, 16 }, { 80, 16 },
  45. { 80, 32 }, { 64, 32 }, { 48, 32 }, { 32, 32 }, { 16, 32 }, { 0, 32 },
  46. { 0, 48 }, { 16, 48 }, { 32, 48 }, { 48, 48 }, { 64, 48 }, { 80, 48 },
  47. { 96, 48 }, { 96, 64 }, { 80, 64 }, { 64, 64 }, { 48, 64 }, { 32, 64 },
  48. // Right half
  49. { 128, 0 }, { 144, 0 }, { 160, 0 }, { 176, 0 }, { 208, 0 }, { 224, 0 },
  50. { 224, 16 }, { 208, 16 }, { 176, 16 }, { 160, 16 }, { 144, 16 }, { 128, 16 },
  51. { 128, 32 }, { 144, 32 }, { 160, 32 }, { 176, 32 }, { 208, 32 }, { 224, 32 },
  52. { 224, 48 }, { 208, 48 }, { 176, 48 }, { 160, 48 }, { 144, 48 }, { 128, 48 },
  53. { 112, 48 }, { 112, 64 }, { 128, 64 }, { 144, 64 }, { 160, 64 }, { 176, 64 }
  54. }, {
  55. // LED Index to Flag
  56. // 0x01 = 1 = modifier key
  57. // 0x02 = 2 = underglow
  58. // 0x04 = 4 = key backlight
  59. // 0x08 = 8 = keyboard state indication
  60. // Left half
  61. 4, 4, 4, 4, 4, 4,
  62. 4, 4, 4, 4, 4, 4,
  63. 4, 4, 4, 4, 4, 1,
  64. 4, 4, 4, 4, 4, 1,
  65. 4, 4, 1, 1, 1, 1,
  66. // Right half
  67. 4, 4, 4, 4, 4, 4,
  68. 4, 4, 4, 4, 4, 4,
  69. 4, 4, 4, 4, 4, 4,
  70. 1, 4, 4, 4, 4, 4,
  71. 4, 4, 1, 1, 1, 1
  72. } };
  73. #endif // RGB_MATRIX_ENABLE
  74. #endif // KEYBOARD_keycapsss_kimiko_rev1