logo

qmk_firmware

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

id61.c (4189B)


  1. // Copyright 2022 Vino Rodrigues (@vinorodrigues)
  2. // SPDX-License-Identifier: GPL-2.0-or-later
  3. #include "quantum.h"
  4. #define __ NO_LED
  5. #if defined(RGB_MATRIX_ENABLE)
  6. /* Pre-key
  7. * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐
  8. * │60 │59 │58 │57 │56 │55 │54 │53 │52 │51 │50 │49 │48 │ 47 │
  9. * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤
  10. * │ 46 │45 │44 │43 │42 │41 │40 │39 │38 │37 │36 │35 │34 │ 33 │
  11. * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤
  12. * │ 32 │31 │30 │29 │28 │27 │26 │25 │24 │23 │22 │21 │ 20 │
  13. * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤
  14. * │ 19 │18 │17 │16 │15 │14 │13 │12 │11 │10 │ 9 │ 8 │
  15. * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤
  16. * │ 7 │ 6 │ 5 │ 4 │ 3 │ 2 │ 1 │ 0 │
  17. * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘
  18. *
  19. * Underglow (from top / [Esc] = top left)
  20. * ┌────┬────┬────┬────┬────┐
  21. * │ 61 │ 62 │ 63 │ 64 │ 65 │
  22. * ├────┴────┴────┴────┴────┤
  23. * ├────┬────┬────┬────┬────┤
  24. * │ 70 │ 69 │ 68 │ 67 │ 66 │
  25. * └────┴────┴────┴────┴────┘
  26. */
  27. led_config_t g_led_config = { {
  28. // Key Matrix to LED Index
  29. { 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47 },
  30. { 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33 },
  31. { 32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, __ },
  32. { 19, __, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, __ },
  33. { 7, 6, 5, __, __, __, 4, __, __, __, 3, 2, 1, 0 },
  34. }, {
  35. // LED Index to Physical Position
  36. // generated from: https://xelus.netlify.app/guides/KLE_to_RGB_parser
  37. /* NB: Reverse order! */
  38. {224,64 }, {204,64 }, {184,64 }, {163,64 }, {103,64 }, { 42,64 }, { 22,64 }, { 2,64 },
  39. {212,48 }, {182,48 }, {165,48 }, {149,48 }, {133,48 }, {117,48 }, {101,48 }, { 85,48 }, { 69,48 }, { 52,48 }, { 36,48 }, { 10,48 },
  40. {216,32 }, {190,32 }, {174,32 }, {157,32 }, {141,32 }, {125,32 }, {109,32 }, { 93,32 }, { 77,32 }, { 61,32 }, { 44,32 }, { 28,32 }, { 6,32 },
  41. {222,16 }, {202,16 }, {186,16 }, {170,16 }, {153,16 }, {137,16 }, {121,16 }, {105,16 }, { 89,16 }, { 73,16 }, { 57,16 }, { 40,16 }, { 24,16 }, { 4,16 },
  42. {218,0 }, {194,0 }, {178,0 }, {161,0 }, {145,0 }, {129,0 }, {113,0 }, { 97,0 }, { 81,0 }, { 65,0 }, { 48,0 }, { 32,0 }, { 16,0 }, { 0,0 }
  43. // underglow LEDs (positions pushed to nearest edge to match edge key colors)
  44. #ifndef ID61_DISABLE_UNDERGLOW
  45. , { 0,0 }, { 56,0 }, { 112,0 }, {168,0 }, {224,0 },
  46. {224,64 }, {168,64 }, {112,64 }, { 56,64 }, { 0,64 }
  47. #endif
  48. }, {
  49. // LED Index to Flag
  50. /* NB: Reverse order! */
  51. 1, 1, 1, 1, 4, 1, 1, 1,
  52. 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1,
  53. 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 9,
  54. 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1,
  55. 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4
  56. // underglow LEDs
  57. #ifndef ID61_DISABLE_UNDERGLOW
  58. , 2, 2, 2, 2, 2,
  59. 2, 2, 2, 2, 2
  60. #endif
  61. } };
  62. #endif // RGB_MATRIX_ENABLE