logo

qmk_firmware

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

v1rgb.c (2387B)


  1. // Copyright 2022 peepeetee (@peepeetee)
  2. // SPDX-License-Identifier: GPL-2.0-or-later
  3. #include "quantum.h"
  4. #ifdef RGB_MATRIX_ENABLE
  5. /* WS2812 indices always start at 0
  6. * underglow = 0-3
  7. * note: starting point of 4 and jump from 6 to 7
  8. * ┌───┌───┐───┬───┬───┐
  9. * │ 6 │ 5 │ 4 │30 │29 │
  10. * ├───┼───┘───┼───┼───┤
  11. * │24 │25 │26 │27 │28 │
  12. * ├───┼───┼───┼───┼───┤
  13. * │23 │22 │21 │20 │19 │
  14. * ├───┼───┼───┼───┤ │
  15. * │15 │16 │17 │18 │ │
  16. * ├───┼───┼───┼───┤───┤
  17. * │14 │13 │12 │11 │10 │
  18. * ├───┼───┴───┼───┤ │
  19. * │ 7 │ 8 │ 9 │ │
  20. * └───┴───────┴───┘───┘
  21. */
  22. led_config_t g_led_config = { {
  23. // Key Matrix to LED Index
  24. { 6, 5, 4, 30, 29},
  25. { 24, 25, 26, 27, 28},
  26. { 23, 22, 21, 20, 19},
  27. { 15, 16, 17, 18, NO_LED},
  28. { 14, 13, 12, 11, NO_LED},
  29. { 7, 8, 9, 10, NO_LED}
  30. }, {
  31. // LED Index to Physical Position
  32. /* underglow: because this is under the kb, you want the colors on the edge (corners) of the acrylic plate */
  33. { 224,0 }, { 224,64}, { 0,64 }, { 0,0 }, // 0-3 (underglow)
  34. /* per-key: origins generated from https://xelus.netlify.app/guides/KLE_to_RGB_parser */
  35. { 112,0 }, { 56,0 }, { 0,0 }, /* ---- */ /* ---- */ // 4-6 (top row middle to left)
  36. { 0,64 }, { 84,64 }, { 168,64 }, // 7-9 (jump to bottom left)
  37. { 224,58 }, { 168,41 }, { 112,41 }, { 56,41 }, { 0,41 }, // 10-14 (flow Z pattern upwards...)
  38. { 0,29 }, { 56,29 }, { 112,29 }, { 168,29 }, // 15-18
  39. { 224,35 }, { 168,29 }, { 112,29 }, { 56,29 }, { 0,29 }, // 19-23
  40. { 0,17 }, { 56,17 }, { 112,17 }, { 168,17 }, { 224,17 }, // 24-28
  41. /* ---- */ /* ---- */ /* ---- */ { 224,0 }, { 168,0 } // 29-30 (end at top)
  42. }, {
  43. // LED Index to Flag
  44. 2, 2, 2, 2, // 0 1 2 3 (underglow)
  45. 1, 1, 1, // 4 5 6
  46. 4, 4, 4, 4, // 7 - 10
  47. 4, 4, 4, 4, //11 - 14
  48. 4, 4, 4, 4, //15 - 18
  49. 4, 4, 4, 4, 4, //19 - 23
  50. 4, 4, 4, 4, 4, //24 - 28
  51. 1, 1 //29 30
  52. } };
  53. #endif