You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

62 lines
2.6 KiB

  1. // Copyright 2022 peepeetee (@peepeetee)
  2. // Copyright 2022 Xelus22
  3. // SPDX-License-Identifier: GPL-2.0-or-later
  4. #include "v3.h"
  5. #ifdef ENCODER_ENABLE
  6. bool encoder_update_kb(uint8_t index, bool clockwise) {
  7. if (!encoder_update_user(index, clockwise)) { return false; }
  8. if (index == 0) {
  9. if (clockwise) {
  10. tap_code_delay(KC_VOLU, 10);
  11. } else {
  12. tap_code_delay(KC_VOLD, 10);
  13. }
  14. }
  15. return true;
  16. }
  17. #endif
  18. #ifdef RGB_MATRIX_ENABLE
  19. led_config_t g_led_config = { {
  20. // Key Matrix to LED Index
  21. { 8, 9, 34, 35, 64, 65, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED },
  22. { 7, NO_LED, 33, 36, 63, 66, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED },
  23. { 6, 10, 32, 37, 62, 67, NO_LED, NO_LED, 49, 50, 79 },
  24. { 0, 11, 31, 38, 61, 68, 21, NO_LED, 48, NO_LED, 77 },
  25. { 1, 12, 30, 39, 60, 69, 20, 22, 47, 52, 76 },
  26. { 2, 13, 29, 40, 59, 70, 19, 23, 46, 53, 75 },
  27. { 5, 14, 28, 41, 58, 71, NO_LED, NO_LED, NO_LED, 51, 78 },
  28. { 3, 15, 27, 42, 57, 72, 18, 24, 45, 54, 74 },
  29. { 4, 16, 26, 43, 56, 73, 17, 25, 44, 55, NO_LED },
  30. }, {
  31. // LED Index to Physical Position
  32. {224, 64}, {209, 64}, {195, 64}, {173, 61}, {151, 61}, {94 , 61}, {39 , 61}, {20 , 61}, {2 , 61}, {9 , 50}, {33 , 50},
  33. {48 , 50}, {62 , 50}, {77 , 50}, {92 , 50}, {106, 50}, {121, 50}, {136, 50}, {151, 50}, {165, 50}, {185, 50}, {209, 53},
  34. {196, 39}, {173, 39}, {158, 39}, {143, 39}, {129, 39}, {114, 39}, {99 , 39}, {84 , 39}, {70 , 39}, {55 , 39}, {40 , 39},
  35. {26 , 39}, {6 , 39}, {4 , 28}, {22 , 28}, {37 , 28}, {51 , 28}, {66 , 28}, {81 , 28}, {95 , 28}, {110, 28}, {125, 28},
  36. {140, 28}, {154, 28}, {169, 28}, {184, 28}, {202, 28}, {224, 28}, {224, 17}, {198, 17}, {176, 17}, {162, 17}, {147, 17},
  37. {132, 17}, {118, 17}, {103, 17}, {88 , 17}, {73 , 17}, {59 , 17}, {44 , 17}, {29 , 17}, {15 , 17}, {0 , 17}, {0 , 0},
  38. {18 , 0}, {33 , 0}, {48 , 0}, {62 , 0}, {81 , 0}, {95 , 0}, {110, 0}, {125, 0}, {143, 0}, {158, 0}, {173, 0},
  39. {187, 0}, {206, 0}, {224, 0},
  40. { 207, 13},
  41. { 207, 32},
  42. { 207, 51},{ 174, 51},{ 141, 51},{ 108, 51},{ 73, 51},{ 40, 51},{ 13, 51 },
  43. { 13, 32},
  44. { 13, 13},{ 40, 13},{ 73, 13},{ 108, 13},{ 141, 13},{ 174, 13},
  45. }, {
  46. // LED Index to Flag
  47. 1,1,1,1,1,4,1,1,1,
  48. 1,4,4,4,4,4,4,4,4,4,4,1,1,
  49. 1,4,4,4,4,4,4,4,4,4,4,4,1,
  50. 1,4,4,4,4,4,4,4,4,4,4,4,4,4,1,
  51. 1,1,4,4,4,4,4,4,4,4,4,4,4,4,4,
  52. 1,4,4,4,4,1,1,1,1,4,4,4,4,1,1,
  53. 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
  54. } };
  55. #endif