aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--keyboards/ergodox_ez/config.h9
-rw-r--r--keyboards/ergodox_ez/ergodox_ez.c127
-rw-r--r--keyboards/ergodox_ez/rules.mk3
3 files changed, 138 insertions, 1 deletions
diff --git a/keyboards/ergodox_ez/config.h b/keyboards/ergodox_ez/config.h
index ae70c4f2e..3dfe8733c 100644
--- a/keyboards/ergodox_ez/config.h
+++ b/keyboards/ergodox_ez/config.h
@@ -102,6 +102,15 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
102 102
103#define USB_MAX_POWER_CONSUMPTION 500 103#define USB_MAX_POWER_CONSUMPTION 500
104 104
105// RGB backlight
106#define DRIVER_ADDR_1 0b1110100
107#define DRIVER_ADDR_2 0b1110111
108#define DRIVER_COUNT 2
109#define DRIVER_1_LED_TOTAL 24
110#define DRIVER_2_LED_TOTAL 24
111#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL
112#define RGB_MATRIX_SKIP_FRAMES 10
113
105// #define RGBLIGHT_COLOR_LAYER_0 0x00, 0x00, 0xFF 114// #define RGBLIGHT_COLOR_LAYER_0 0x00, 0x00, 0xFF
106/* #define RGBLIGHT_COLOR_LAYER_1 0x00, 0x00, 0xFF */ 115/* #define RGBLIGHT_COLOR_LAYER_1 0x00, 0x00, 0xFF */
107/* #define RGBLIGHT_COLOR_LAYER_2 0xFF, 0x00, 0x00 */ 116/* #define RGBLIGHT_COLOR_LAYER_2 0xFF, 0x00, 0x00 */
diff --git a/keyboards/ergodox_ez/ergodox_ez.c b/keyboards/ergodox_ez/ergodox_ez.c
index 437411856..21854ef77 100644
--- a/keyboards/ergodox_ez/ergodox_ez.c
+++ b/keyboards/ergodox_ez/ergodox_ez.c
@@ -207,3 +207,130 @@ const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = {
207 {{0,0}, {1,0}, {2,0}, {3,0}, {4,0}, {5,0}}, 207 {{0,0}, {1,0}, {2,0}, {3,0}, {4,0}, {5,0}},
208}; 208};
209#endif 209#endif
210
211#ifdef RGB_MATRIX_ENABLE
212const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
213/* driver
214 * | R location
215 * | | G location
216 * | | | B location
217 * | | | | */
218 {0, C3_1, C2_1, C4_1}, // LED1 on right
219 {0, C6_1, C5_1, C7_1}, // LED2
220 {0, C4_2, C3_2, C5_2}, // LED3
221 {0, C7_2, C6_2, C8_2}, // LED4
222 {0, C2_3, C1_3, C3_3}, // LED5
223 {0, C5_3, C4_3, C6_3}, // LED6
224 {0, C8_3, C7_3, C9_3}, // LED7
225 {0, C2_4, C1_4, C3_4}, // LED8
226 {0, C6_4, C5_4, C7_4}, // LED9
227 {0, C2_5, C1_5, C3_5}, // LED10
228 {0, C7_5, C6_5, C8_5}, // LED11
229 {0, C2_6, C1_6, C3_6}, // LED12
230 {0, C5_6, C4_6, C6_6}, // LED13
231 {0, C8_6, C7_6, C9_6}, // LED14
232 {0, C2_7, C1_7, C3_7}, // LED15
233 {0, C5_7, C4_7, C6_7}, // LED16
234 {0, C2_8, C1_8, C3_8}, // LED17
235 {0, C5_8, C4_8, C6_8}, // LED18
236
237 {0, C3_9, C2_9, C4_9}, // LED19
238 {0, C6_9, C5_9, C7_9}, // LED20
239 {0, C4_10, C3_10, C5_10}, // LED21
240 {0, C7_10, C6_10, C8_10}, // LED22
241 {0, C2_11, C1_11, C3_11}, // LED23
242 {0, C5_11, C4_11, C6_11}, // LED24
243
244 {1, C3_1, C2_1, C4_1}, // LED1 on left
245 {1, C6_1, C5_1, C7_1}, // LED2
246 {1, C4_2, C3_2, C5_2}, // LED3
247 {1, C7_2, C6_2, C8_2}, // LED4
248 {1, C2_3, C1_3, C3_3}, // LED5
249 {1, C5_3, C4_3, C6_3}, // LED6
250 {1, C8_3, C7_3, C9_3}, // LED7
251 {1, C2_4, C1_4, C3_4}, // LED8
252 {1, C6_4, C5_4, C7_4}, // LED9
253 {1, C2_5, C1_5, C3_5}, // LED10
254 {1, C7_5, C6_5, C8_5}, // LED11
255 {1, C2_6, C1_6, C3_6}, // LED12
256 {1, C5_6, C4_6, C6_6}, // LED13
257 {1, C8_6, C7_6, C9_6}, // LED14
258 {1, C2_7, C1_7, C3_7}, // LED15
259 {1, C5_7, C4_7, C6_7}, // LED16
260 {1, C2_8, C1_8, C3_8}, // LED17
261 {1, C5_8, C4_8, C6_8}, // LED18
262
263 {1, C3_9, C2_9, C4_9}, // LED19
264 {1, C6_9, C5_9, C7_9}, // LED20
265 {1, C4_10, C3_10, C5_10}, // LED21
266 {1, C7_10, C6_10, C8_10}, // LED22
267 {1, C2_11, C1_11, C3_11}, // LED23
268 {1, C5_11, C4_11, C6_11} // LED24
269};
270
271
272const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
273
274 /*{row | col << 4}
275 | {x=0..224, y=0..64}
276 | | modifier
277 | | | */
278 {{0|(0<<4)}, {24.9*5, 16*0}, 0}, // LED 1 on right
279 {{0|(1<<4)}, {24.9*6, 16*0}, 0}, // LED 2
280 {{0|(2<<4)}, {24.9*7, 16*0}, 0}, // LED 3
281 {{0|(3<<4)}, {24.9*8, 16*0}, 0}, // LED 4
282 {{0|(4<<4)}, {24.9*9, 16*0}, 0}, // LED 5
283
284 {{1|(5<<4)}, {24.9*5, 16*1}, 0}, // LED 6
285 {{1|(6<<4)}, {24.9*6, 16*1}, 0}, // LED 7
286 {{1|(7<<4)}, {24.9*7, 16*1}, 0}, // LED 8
287 {{1|(8<<4)}, {24.9*8, 16*1}, 0}, // LED 9
288 {{1|(9<<4)}, {24.9*9, 16*1}, 0}, // LED 10
289
290 {{2|(5<<4)}, {24.9*5, 16*2}, 0}, // LED 11
291 {{2|(6<<4)}, {24.9*6, 16*2}, 0}, // LED 12
292 {{2|(7<<4)}, {24.9*7, 16*2}, 0}, // LED 13
293 {{2|(8<<4)}, {24.9*8, 16*2}, 0}, // LED 14
294 {{2|(9<<4)}, {24.9*9, 16*2}, 0}, // LED 15
295
296 {{3|(5<<4)}, {24.9*5, 16*2}, 0}, // LED 16
297 {{3|(6<<4)}, {24.9*6, 16*2}, 0}, // LED 17
298 {{3|(7<<4)}, {24.9*7, 16*2}, 0}, // LED 18
299 {{3|(8<<4)}, {24.9*8, 16*2}, 0}, // LED 19
300 {{3|(9<<4)}, {24.9*9, 16*2}, 0}, // LED 20
301
302 {{4|(6<<4)}, {24.9*6, 16*2}, 0}, // LED 21
303 {{4|(7<<4)}, {24.9*7, 16*2}, 0}, // LED 22
304 {{4|(8<<4)}, {24.9*8, 16*2}, 0}, // LED 23
305 {{4|(9<<4)}, {24.9*9, 16*2}, 0}, // LED 24
306
307 {{0|(0<<4)}, {24.9*4, 16*0}, 0}, // LED 1 on left
308 {{0|(1<<4)}, {24.9*3, 16*0}, 0}, // LED 2
309 {{0|(2<<4)}, {24.9*2, 16*0}, 0}, // LED 3
310 {{0|(3<<4)}, {24.9*1, 16*0}, 0}, // LED 4
311 {{0|(4<<4)}, {24.9*0, 16*0}, 0}, // LED 5
312
313 {{1|(5<<4)}, {24.9*4, 16*1}, 0}, // LED 6
314 {{1|(6<<4)}, {24.9*3, 16*1}, 0}, // LED 7
315 {{1|(7<<4)}, {24.9*2, 16*1}, 0}, // LED 8
316 {{1|(8<<4)}, {24.9*1, 16*1}, 0}, // LED 9
317 {{1|(9<<4)}, {24.9*0, 16*1}, 0}, // LED 10
318
319 {{2|(5<<4)}, {24.9*4, 16*2}, 0}, // LED 11
320 {{2|(6<<4)}, {24.9*3, 16*2}, 0}, // LED 12
321 {{2|(7<<4)}, {24.9*2, 16*2}, 0}, // LED 13
322 {{2|(8<<4)}, {24.9*1, 16*2}, 0}, // LED 14
323 {{2|(9<<4)}, {24.9*0, 16*2}, 0}, // LED 15
324
325 {{3|(5<<4)}, {24.9*4, 16*2}, 0}, // LED 16
326 {{3|(6<<4)}, {24.9*3, 16*2}, 0}, // LED 17
327 {{3|(7<<4)}, {24.9*2, 16*2}, 0}, // LED 18
328 {{3|(8<<4)}, {24.9*1, 16*2}, 0}, // LED 19
329 {{3|(9<<4)}, {24.9*0, 16*2}, 0}, // LED 20
330
331 {{4|(6<<4)}, {24.9*3, 16*2}, 0}, // LED 21
332 {{4|(7<<4)}, {24.9*3, 16*2}, 0}, // LED 22
333 {{4|(8<<4)}, {24.9*1, 16*2}, 0}, // LED 23
334 {{4|(9<<4)}, {24.9*0, 16*2}, 0}, // LED 24
335};
336#endif
diff --git a/keyboards/ergodox_ez/rules.mk b/keyboards/ergodox_ez/rules.mk
index 5ee9d5cb8..a3b2ba5ca 100644
--- a/keyboards/ergodox_ez/rules.mk
+++ b/keyboards/ergodox_ez/rules.mk
@@ -82,6 +82,7 @@ UNICODE_ENABLE = yes # Unicode
82SWAP_HANDS_ENABLE= yes # Allow swapping hands of keyboard 82SWAP_HANDS_ENABLE= yes # Allow swapping hands of keyboard
83SLEEP_LED_ENABLE = no 83SLEEP_LED_ENABLE = no
84API_SYSEX_ENABLE = no 84API_SYSEX_ENABLE = no
85RGBLIGHT_ENABLE = yes 85RGBLIGHT_ENABLE = no
86RGB_MATRIX_ENABLE = yes
86 87
87LAYOUTS = ergodox 88LAYOUTS = ergodox