pan.c 5.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. /* Copyright 2020 RGBKB
  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 "pan.h"
  17. #include "quantum.h"
  18. #include "rgb_matrix_types.h"
  19. #if defined RGB_MATRIX_ENABLE
  20. led_config_t g_led_config = { {
  21. { 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 },
  22. { 0, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15 },
  23. { 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 1 },
  24. { 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40 },
  25. { 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, NO_LED }
  26. }, {
  27. #ifdef STAGGERED_RGB_ENCODERS
  28. {0, -19},{228, -19},
  29. {0, 0}, {14, 0}, {33, 0}, {52, 0}, {71, 0}, {90, 0}, {109, 0}, {128, 0}, {147, 0}, {166, 0}, {185, 0}, {204, 0}, {223, 0},
  30. {209, 19}, {190, 19}, {171, 19}, {152, 19}, {133, 19}, {114, 19}, {95, 19}, {76, 19}, {57, 19}, {38, 19}, {19, 19}, {0, 19},
  31. {0, 38}, {19, 38}, {38, 38}, {57, 38}, {76, 38}, {95, 38}, {114, 38}, {133, 38}, {152, 38}, {171, 38}, {190, 38}, {209, 38},
  32. {223, 57}, {204, 57}, {185, 57}, {171, 57}, {147, 57}, {128, 57}, {109, 57}, {90, 57}, {71, 57}, {52, 57}, {33, 57}, {14, 57}, {0, 57},
  33. {0, 76}, {19, 76}, {38, 76}, {57, 76}, {76, 76}, {95, 76}, {114, 76}, {133, 76}, {152, 76}, {171, 76}, {190, 76}, {209, 76},
  34. #elif defined RGB_ENCODERS
  35. {0, -19},{228, -19},
  36. {0, 0}, {19, 0}, {38, 0}, {57, 0}, {76, 0}, {95, 0}, {114, 0}, {133, 0}, {152, 0}, {171, 0}, {190, 0}, {209, 0},
  37. {209, 19}, {190, 19}, {171, 19}, {152, 19}, {133, 19}, {114, 19}, {95, 19}, {76, 19}, {57, 19}, {38, 19}, {19, 19}, {0, 19},
  38. {0, 38}, {19, 38}, {38, 38}, {57, 38}, {76, 38}, {95, 38}, {114, 38}, {133, 38}, {152, 38}, {171, 38}, {190, 38}, {209, 38},
  39. {209, 57}, {190, 57}, {171, 57}, {152, 57}, {133, 57}, {114, 57}, {95, 57}, {76, 57}, {57, 57}, {38, 57}, {19, 57}, {0, 57},
  40. {0, 76}, {19, 76}, {38, 76}, {57, 76}, {76, 76}, {95, 76}, {114, 76}, {133, 76}, {152, 76}, {171, 76}, {190, 76}, {209, 76},
  41. {0, 95},{19, 95}, //not used
  42. #elif defined STAGGERED_LAYOUT
  43. {0, 0}, {19, 0}, {38, 0}, {57, 0}, {76, 0}, {95, 0}, {114, 0}, {133, 0}, {152, 0}, {171, 0}, {190, 0}, {209, 0}, {0, 0},
  44. {209, 19}, {190, 19}, {171, 19}, {152, 19}, {133, 19}, {114, 19}, {95, 19}, {76, 19}, {57, 19}, {38, 19}, {19, 19}, {0, 19},
  45. {0, 38}, {19, 38}, {38, 38}, {57, 38}, {76, 38}, {95, 38}, {114, 38}, {133, 38}, {152, 38}, {171, 38}, {190, 38}, {209, 38},
  46. {209, 57}, {190, 57}, {171, 57}, {152, 57}, {133, 57}, {114, 57}, {95, 57}, {76, 57}, {57, 57}, {38, 57}, {19, 57}, {0, 57}, {0, 0},
  47. {0, 76}, {19, 76}, {38, 76}, {57, 76}, {76, 76}, {95, 76}, {114, 76}, {133, 76}, {152, 76}, {171, 76}, {190, 76}, {209, 76},
  48. {0, 95},{19, 95},//not used
  49. #else
  50. {0, 0}, {19, 0}, {38, 0}, {57, 0}, {76, 0}, {95, 0}, {114, 0}, {133, 0}, {152, 0}, {171, 0}, {190, 0}, {209, 0},
  51. {209, 19}, {190, 19}, {171, 19}, {152, 19}, {133, 19}, {114, 19}, {95, 19}, {76, 19}, {57, 19}, {38, 19}, {19, 19}, {0, 19},
  52. {0, 38}, {19, 38}, {38, 38}, {57, 38}, {76, 38}, {95, 38}, {114, 38}, {133, 38}, {152, 38}, {171, 38}, {190, 38}, {209, 38},
  53. {209, 57}, {190, 57}, {171, 57}, {152, 57}, {133, 57}, {114, 57}, {95, 57}, {76, 57}, {57, 57}, {38, 57}, {19, 57}, {0, 57},
  54. {0, 76}, {19, 76}, {38, 76}, {57, 76}, {76, 76}, {95, 76}, {114, 76}, {133, 76}, {152, 76}, {171, 76}, {190, 76}, {209, 76},
  55. {0, 0},{0, 0}, {0, 0},{0, 0},//not used
  56. #endif
  57. }, {
  58. #ifdef STAGGERED_RGB_ENCODERS
  59. 1, 1,
  60. 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1,
  61. 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1,
  62. 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1,
  63. 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1,
  64. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
  65. #elif defined RGB_ENCODERS
  66. 1, 1,
  67. 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1,
  68. 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1,
  69. 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1,
  70. 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1,
  71. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
  72. #elif defined STAGGERED_LAYOUT
  73. 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1,
  74. 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1,
  75. 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1,
  76. 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1,
  77. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
  78. #else
  79. 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1,
  80. 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1,
  81. 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1,
  82. 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1,
  83. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
  84. #endif
  85. } };
  86. #endif