logo

qmk_firmware

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

id63.c (4386B)


  1. // Copyright 2022 Vino Rodrigues (@vinorodrigues)
  2. // SPDX-License-Identifier: GPL-2.0-or-later
  3. #include "quantum.h"
  4. #define __ NO_LED
  5. #ifdef RGB_MATRIX_ENABLE
  6. /* Pre-key LED addresses
  7. * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐
  8. * │62 │61 │60 │59 │58 │57 │56 │55 │54 │53 │52 │51 │50 │ 49 │
  9. * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤
  10. * │ 48 │47 │46 │45 │44 │43 │42 │41 │40 │39 │38 │37 │36 │ 35 │
  11. * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤
  12. * │ 34 │33 │32 │31 │30 │29 │28 │27 │26 │25 │24 │23 │ 22 │
  13. * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┬───┤
  14. * │ 21 │20 │19 │18 │17 │16 │15 │14 │13 │12 │ 11 │10 │ 9 │
  15. * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬───┼───┼───┤
  16. * │ 8 │ 7 │ 6 │ 5 │ 4 │ 3 │ 2 │ 1 │ 0 │
  17. * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┘
  18. *
  19. * Underglow LED addresses (as seen from top / [Esc] = top left)
  20. * ┌────┬────┬────┬────┬────┬────┐
  21. * │ 63 │ 64 │ 65 │ 66 │ 67 │ 68 │
  22. * ├────┴────┴────┴────┴────┴────┤
  23. * ├────┬────┬────┬────┬────┬────┤
  24. * │ 74 │ 73 │ 72 │ 71 │ 70 │ 69 │
  25. * └────┴────┴────┴────┴────┴────┘
  26. */
  27. led_config_t g_led_config = { {
  28. // Key Matrix to LED Index
  29. { 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, 49 },
  30. { 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35 },
  31. { 34, 33, 32, 31, 30, 29, 28, 27, 26, 25, 24, 23, __, 22 },
  32. { 21, __, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9 },
  33. { 8, 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 & upside-down order! */
  38. {224,64 }, {208,64 }, {192,64 }, {176,64 }, {160,64 }, {102,64 }, { 42,64 }, { 22,64 }, { 2,64 },
  39. {224,48 }, {208,48 }, {186,48 }, {164,48 }, {148,48 }, {132,48 }, {116,48 }, {100,48 }, { 84,48 }, { 68,48 }, { 52,48 }, { 36,48 }, { 10,48 },
  40. {214,32 }, {188,32 }, {172,32 }, {156,32 }, {140,32 }, {124,32 }, {108,32 }, { 92,32 }, { 76,32 }, { 60,32 }, { 44,32 }, { 28,32 }, { 6,32 },
  41. {220,16 }, {200,16 }, {184,16 }, {168,16 }, {152,16 }, {136,16 }, {120,16 }, {104,16 }, { 88,16 }, { 72,16 }, { 56,16 }, { 40,16 }, { 24,16 }, { 4,16 },
  42. {216,0 }, {192,0 }, {176,0 }, {160,0 }, {144,0 }, {128,0 }, {112,0 }, { 96,0 }, { 80,0 }, { 64,0 }, { 48,0 }, { 32,0 }, { 16,0 }, { 0,0 }
  43. // underglow LEDs (positions pushed to nearest edge to match edge key colors)
  44. #ifndef ID63_DISABLE_UNDERGLOW
  45. , { 0,0 }, { 45,0 }, { 90,0 }, {134,0 }, {179,0 }, {224,0 },
  46. {224,64 }, {179,64 }, {134,64 }, { 90,64 }, { 45,64 }, { 0,64 }
  47. #endif
  48. }, {
  49. // LED Index to Flag
  50. /* NB: Reverse & upside-down order! */
  51. 4, 4, 4, 1, 1, 4, 1, 1, 1,
  52. 1, 4, 1, 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 ID63_DISABLE_UNDERGLOW
  58. , 2, 2, 2, 2, 2, 2,
  59. 2, 2, 2, 2, 2, 2
  60. #endif
  61. } };
  62. #endif // RGB_MATRIX_ENABLE