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.

183 lines
5.9 KiB

  1. /* Copyright 2021 Gizmo Engineering
  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 "quantum.h"
  17. #ifdef RGB_MATRIX_ENABLE
  18. const is31fl3731_led_t PROGMEM g_is31fl3731_leds[IS31FL3731_LED_COUNT] = {
  19. {0, C1_8, C2_8, C3_8}, //0 led1
  20. {0, C1_7, C2_7, C3_7}, //1 led2
  21. {0, C1_6, C2_6, C3_6}, //2 led3
  22. {0, C1_5, C2_5, C3_5}, //3 led4
  23. {0, C1_4, C2_4, C3_4}, //4 led5
  24. {0, C1_3, C2_3, C3_3}, //5 led6
  25. {0, C1_2, C2_2, C4_3}, //6 led7
  26. {0, C1_1, C3_2, C4_2}, //7 led7b
  27. {0, C9_1, C8_1, C7_1}, //8 led8
  28. {0, C9_2, C8_2, C7_2}, //9 led9
  29. {0, C9_3, C8_3, C7_3}, //10 led10
  30. {0, C9_4, C8_4, C7_4}, //11 led11
  31. {0, C9_5, C8_5, C7_5}, //12 led12
  32. {0, C9_6, C8_6, C7_6}, //13 led13
  33. {0, C9_7, C8_7, C6_6}, //14 led14
  34. {0, C9_8, C7_7, C6_7}, //15 led15
  35. {0, C1_16, C2_16, C3_16}, //16 led16
  36. {0, C1_15, C2_15, C3_15}, //17 led17
  37. {0, C1_14, C2_14, C3_14}, //18 led18
  38. {0, C1_13, C2_13, C3_13}, //19 led19
  39. {0, C1_12, C2_12, C3_12}, //20 led20
  40. {0, C1_11, C2_11, C3_11}, //21 led21
  41. {0, C1_10, C2_10, C4_11}, //22 led22
  42. {0, C9_9, C8_9, C7_9}, //23 led23
  43. {0, C9_10, C8_10, C7_10}, //24 led24 missing on [default]
  44. {0, C9_11, C8_11, C7_11}, //25 led25 missing on [1x2u, 12x5]
  45. {0, C9_12, C8_12, C7_12}, //26 led26
  46. {0, C9_13, C8_13, C7_13}, //27 led27
  47. {0, C9_14, C8_14, C7_14}, //28 led28
  48. {0, C9_15, C8_15, C6_14}, //29 led29
  49. {0, C9_16, C7_15, C6_15}, //30 led30 missing on [default, 1x2u]
  50. {1, C1_8, C2_8, C3_8}, //31 led31
  51. {1, C1_7, C2_7, C3_7}, //32 led32
  52. {1, C1_6, C2_6, C3_6}, //33 led33
  53. {1, C1_5, C2_5, C3_5}, //34 led34
  54. {1, C1_4, C2_4, C3_4}, //35 led35 missing on [default, 1x2u]
  55. {1, C1_3, C2_3, C3_3}, //36 led36 missing on [default, 12x5]
  56. {1, C1_2, C2_2, C4_3}, //37 led37
  57. {1, C1_1, C3_2, C4_2}, //38 led37b
  58. {1, C9_1, C8_1, C7_1}, //39 led38
  59. {1, C9_2, C8_2, C7_2}, //40 led39
  60. {1, C9_3, C8_3, C7_3}, //41 led40 missing on [default]
  61. {1, C9_4, C8_4, C7_4}, //42 led41 missing on [1x2u, 12x5]
  62. {1, C9_5, C8_5, C7_5}, //43 led42
  63. {1, C9_6, C8_6, C7_6}, //44 led43
  64. {1, C9_7, C8_7, C6_6}, //45 led44
  65. {1, C9_8, C7_7, C6_7}, //46 led45
  66. {1, C1_16, C2_16, C3_16}, //47 led46
  67. {1, C1_15, C2_15, C3_15}, //48 led47
  68. {1, C1_14, C2_14, C3_14}, //49 led48
  69. {1, C1_13, C2_13, C3_13}, //50 led49
  70. {1, C1_12, C2_12, C3_12}, //51 led50
  71. {1, C1_11, C2_11, C3_11}, //52 led51
  72. {1, C1_10, C2_10, C4_11}, //53 led52
  73. {1, C1_9, C3_10, C4_10}, //54 led52b
  74. {1, C9_9, C8_9, C7_9}, //55 led53
  75. {1, C9_10, C8_10, C7_10}, //56 led54
  76. {1, C9_11, C8_11, C7_11}, //57 led55
  77. {1, C9_12, C8_12, C7_12}, //58 led56
  78. {1, C9_13, C8_13, C7_13}, //59 led57
  79. {1, C9_14, C8_14, C7_14}, //60 led58
  80. {1, C9_15, C8_15, C6_14}, //61 led59
  81. {1, C9_16, C7_15, C6_15}, //62 led60
  82. };
  83. led_config_t g_led_config = { {
  84. // Key Matrix to LED Index
  85. // 1, 6, 10, 15, 20, 26, 31, 37, 42, 47, 52, 56
  86. {0, 5, 10, 15, 20, 26, 31, 37, 43, 48, 53, 58},
  87. // 2, 7, 11, 16, 21, 27, 32, 37b, 43, 48, 52b, 57
  88. {1, 6, 11, 16, 21, 27, 32, 38, 44, 49, 54, 59},
  89. // 3, 7b, 12, 17, 22, 28, 33, 38, 44, 49, 53, 58
  90. {2, 7, 12, 17, 22, 28, 33, 39, 45, 50, 55, 60},
  91. // 4, 8, 13, 18, 23, 29, 34, 39, 45, 50, 54, 59
  92. {3, 8, 13, 18, 23, 29, 34, 40, 46, 51, 56, 61},
  93. // 5, 9, 14, 19, 25, NO_LED, NO_LED, 41, 46, 51, 55, 60
  94. {4, 9, 14, 19, 25, NO_LED, NO_LED, 42, 47, 52, 57, 62},
  95. }, {
  96. // LED Index to Physical Position
  97. {0, 0}, // 0
  98. {0, 16}, // 1
  99. {0, 32}, // 2
  100. {0, 48}, // 3
  101. {0, 64}, // 4
  102. {21, 0}, // 5
  103. {21, 16}, // 6
  104. {21, 32}, // 7
  105. {21, 48}, // 8
  106. {21, 64}, // 9
  107. {41, 0}, // 10
  108. {41, 16}, // 11
  109. {41, 32}, // 12
  110. {41, 48}, // 13
  111. {41, 64}, // 14
  112. {61, 0}, // 15
  113. {61, 16}, // 16
  114. {61, 32}, // 17
  115. {61, 48}, // 18
  116. {61, 64}, // 19
  117. {82, 0}, // 20
  118. {82, 16}, // 21
  119. {82, 32}, // 22
  120. {82, 48}, // 23
  121. {82, 64}, // 24
  122. {92, 64}, // 25
  123. {102, 0}, // 26
  124. {102, 16}, // 27
  125. {102, 32}, // 28
  126. {102, 48}, // 29
  127. {102, 64}, // 30
  128. {122, 0}, // 31
  129. {122, 16}, // 32
  130. {122, 32}, // 33
  131. {122, 48}, // 34
  132. {122, 64}, // 35
  133. {112, 64}, // 36
  134. {142, 0}, // 37
  135. {142, 16}, // 38
  136. {142, 32}, // 39
  137. {142, 48}, // 40
  138. {142, 64}, // 41
  139. {132, 64}, // 42
  140. {163, 0}, // 43
  141. {163, 16}, // 44
  142. {163, 32}, // 45
  143. {163, 48}, // 46
  144. {163, 64}, // 47
  145. {183, 0}, // 48
  146. {183, 16}, // 49
  147. {183, 32}, // 50
  148. {183, 48}, // 51
  149. {183, 64}, // 52
  150. {203, 0}, // 53
  151. {203, 16}, // 54
  152. {203, 32}, // 55
  153. {203, 48}, // 56
  154. {203, 64}, // 57
  155. {224, 0}, // 58
  156. {224, 16}, // 59
  157. {224, 32}, // 60
  158. {224, 48}, // 61
  159. {224, 64}, // 62
  160. }, {
  161. // LED Index to Flag
  162. 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,
  163. 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,
  164. 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,
  165. 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,
  166. 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,
  167. 0x04, 0x04, 0x04
  168. } };
  169. #endif