]> git.donarmstrong.com Git - qmk_firmware.git/blob - keyboards/exclusive/e6_rgb/e6_rgb.c
Updated rgb_led struct field modifier to flags (#5619)
[qmk_firmware.git] / keyboards / exclusive / e6_rgb / e6_rgb.c
1 /**
2  * e6_rgb.c
3  */
4
5 #include "e6_rgb.h"
6
7 #ifdef RGB_MATRIX_ENABLE
8 __attribute__ ((weak))
9 void matrix_init_kb(void) {
10     matrix_init_user();
11 }
12
13 __attribute__ ((weak))
14 void matrix_scan_kb(void) {
15     matrix_scan_user();
16 }
17
18 __attribute__ ((weak))
19 void matrix_init_user(void) {
20   setPinOutput(D5);
21   writePinHigh(D5);
22 }
23
24 __attribute__ ((weak))
25 void matrix_scan_user(void) {
26 }
27
28 const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
29 /* Refer to IS31 manual for these locations
30  *   driver
31  *   |  R location
32  *   |  |       G location
33  *   |  |       |       B location
34  *   |  |       |       | */
35 //cs1
36     {0, K_1,    J_1,    L_1},
37     {0, H_1,    G_1,    I_1},
38     {0, E_1,    D_1,    F_1},
39     {0, B_1,    A_1,    C_1},
40
41 //cs2
42     {0, K_2,    J_2,    L_2},
43     {0, H_2,    G_2,    I_2},
44     {0, E_2,    D_2,    F_2},
45     {0, B_2,    A_2,    C_2},
46 //cs3
47     {0, K_3,    J_3,    L_3},
48     {0, H_3,    G_3,    I_3},
49     {0, E_3,    D_3,    F_3},
50     {0, B_3,    A_3,    C_3},
51 //cs4
52     {0, K_4,    J_4,    L_4},
53     {0, H_4,    G_4,    I_4},
54     {0, E_4,    D_4,    F_4},
55     {0, B_4,    A_4,    C_4},
56 //cs5
57     {0, K_5,    J_5,    L_5},
58     {0, H_5,    G_5,    I_5},
59     {0, E_5,    D_5,    F_5},
60     {0, B_5,    A_5,    C_5},
61 //cs6
62     {0, K_6,    J_6,    L_6},
63     {0, H_6,    G_6,    I_6},
64     {0, E_6,    D_6,    F_6},
65     {0, B_6,    A_6,    C_6},
66 //cs7
67     {0, K_7,    J_7,    L_7},
68     {0, H_7,    G_7,    I_7},
69     {0, E_7,    D_7,    F_7},
70     {0, B_7,    A_7,    C_7},
71 //cs8
72     {0, K_8,    J_8,    L_8},
73     {0, H_8,    G_8,    I_8},
74     {0, E_8,    D_8,    F_8},
75     {0, B_8,    A_8,    C_8},
76 //cs9
77     {0, K_9,    J_9,    L_9},
78     {0, H_9,    G_9,    I_9},
79     {0, E_9,    D_9,    F_9},
80     {0, B_9,    A_9,    C_9},
81 //cs10
82     {0, K_10,   J_10,   L_10},
83     {0, H_10,   G_10,   I_10},
84     {0, E_10,   D_10,   F_10},
85     {0, B_10,   A_10,   C_10},
86 //cs11
87     {0, K_11,   J_11,   L_11},
88     {0, H_11,   G_11,   I_11},
89     {0, E_11,   D_11,   F_11},
90     {0, B_11,   A_11,   C_11},
91 //cs12
92     {0, K_12,   J_12,   L_12},
93     {0, H_12,   G_12,   I_12},
94     {0, E_12,   D_12,   F_12},
95     {0, B_12,   A_12,   C_12},
96 //cs13
97     {0, K_13,   J_13,   L_13},
98     {0, H_13,   G_13,   I_13},
99     {0, E_13,   D_13,   F_13},
100     {0, B_13,   A_13,   C_13},
101 //cs14
102     {0, K_14,   J_14,   L_14},
103     {0, H_14,   G_14,   I_14},
104     {0, E_14,   D_14,   F_14},
105     {0, B_14,   A_14,   C_14},
106 //cs15
107     {0, K_15,   J_15,   L_15},
108
109     {0, E_15,   D_15,   F_15},
110     {0, B_15,   A_15,   C_15},
111 //cs16
112     {0, K_16,   J_16,   L_16},
113     {0, H_16,   G_16,   I_16},
114     {0, E_16,   D_16,   F_16},
115     {0, B_16,   A_16,   C_16},
116 };
117 rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
118 /* {row | col << 4}
119  *    |           {x=0..224, y=0..64}
120  *    |              |            flags
121  *    |              |         | */
122 //cs1
123     {{0|(0<<4)},    {  0,  0}, 1},
124     {{0|(1<<4)},    { 17,  0}, 4},
125     {{1|(0<<4)},    {  0, 16}, 1},
126     {{2|(0<<4)},    {  0, 32}, 1},
127
128 //cs2
129     {{0|(2<<4)},    { 34,  0}, 4},
130     {{0|(3<<4)},    { 51,  0}, 4},
131     {{1|(1<<4)},    { 17, 16}, 4},
132     {{1|(2<<4)},    { 34, 16}, 4},
133 //cs3
134     {{2|(1<<4)},    { 17, 32}, 4},
135     {{2|(2<<4)},    { 34, 32}, 4},
136     {{3|(1<<4)},    { 17, 48}, 4},
137     {{3|(2<<4)},    { 34, 48}, 4},
138 //cs4
139     {{0|(4<<4)},    { 68,  0}, 4},
140     {{0|(5<<4)},    { 85,  0}, 4},
141     {{1|(3<<4)},    { 51, 16}, 4},
142     {{1|(4<<4)},    { 68, 16}, 4},
143 //cs5
144     {{0|(11<<4)},   {187,  0}, 4},
145     {{0|(12<<4)},   {204,  0}, 4},
146     {{1|(11<<4)},   {187, 16}, 4},
147     {{1|(12<<4)},   {204, 16}, 4},
148 //cs6
149     {{0|(7<<4)},    {119,  0}, 4},
150     {{0|(8<<4)},    {136,  0}, 4},
151     {{1|(7<<4)},    {119, 16}, 4},
152     {{1|(8<<4)},    {136, 16}, 4},
153 //cs7
154     {{0|(9<<4)},    {153,  0}, 4},
155     {{0|(10<<4)},   {170,  0}, 4},
156     {{1|(9<<4)},    {153, 16}, 4},
157     {{1|(10<<4)},   {170, 16}, 4},
158 //cs8
159     {{0|(13<<4)},   {221,  0}, 4},
160     {{0|(14<<4)},   {221,  0}, 4},
161     {{1|(13<<4)},   {221, 32}, 1},
162     {{2|(12<<4)},   {221, 16}, 1},
163 //cs9
164     {{2|(3<<4)},    { 51, 32}, 4},
165     {{2|(4<<4)},    { 68, 32}, 4},
166     {{3|(3<<4)},    { 51, 48}, 4},
167     {{3|(4<<4)},    { 68, 48}, 4},
168 //cs10
169     {{0|(6<<4)},    {102,  0}, 4},
170     {{1|(5<<4)},    { 85, 16}, 4},
171     {{1|(6<<4)},    {102, 16}, 4},
172     {{2|(5<<4)},    { 85, 32}, 4},
173 //cs11
174     {{2|(6<<4)},    {102, 32}, 4},
175     {{3|(5<<4)},    { 85, 48}, 4},
176     {{3|(6<<4)},    {102, 48}, 4},
177     {{4|(5<<4)},    {102, 64}, 4},
178 //cs12
179     {{2|(7<<4)},    {119, 32}, 4},
180     {{2|(8<<4)},    {136, 32}, 4},
181     {{3|(7<<4)},    {119, 48}, 4},
182     {{3|(8<<4)},    {136, 48}, 4},
183 //cs13
184     {{2|(9<<4)},    {153, 32}, 4},
185     {{2|(10<<4)},   {170, 32}, 4},
186     {{3|(9<<4)},    {153, 48}, 4},
187     {{4|(6<<4)},    {136, 48}, 1},
188 //cs14
189     {{2|(11<<4)},   {187, 32}, 4},
190     {{3|(10<<4)},   {170, 48}, 4},
191     {{3|(11<<4)},   {187, 48}, 1},
192     {{4|(7<<4)},    {153, 48}, 1},
193 //cs15
194     {{3|(12<<4)},   {221, 48}, 1},
195
196     {{4|(9<<4)},    {221, 64}, 1},
197     {{4|(8<<4)},    {204, 64}, 1},
198 //cs16
199     {{3|(0<<4)},    {  0, 48}, 1},
200     {{4|(0<<4)},    {  0, 64}, 1},
201     {{4|(1<<4)},    { 17, 64}, 1},
202     {{4|(2<<4)},    { 34, 64}, 1},
203 };
204 #endif