aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--keyboards/crkbd/readme.md9
-rw-r--r--keyboards/crkbd/rev1/rev1.c71
2 files changed, 39 insertions, 41 deletions
diff --git a/keyboards/crkbd/readme.md b/keyboards/crkbd/readme.md
index 2f599544a..5de3e3ae0 100644
--- a/keyboards/crkbd/readme.md
+++ b/keyboards/crkbd/readme.md
@@ -81,13 +81,4 @@ And in your `config.h` file, add the following:
81#endif 81#endif
82``` 82```
83 83
84However, to properly handle the LED matrix, two LED maps had to be used. One for the left half, and one for the right half. For the left, you don't need to do anything. That's the default setup. But for the right side, you need to add `RGB_MATRIX_SPLIT_RIGHT=yes` needs to be added to the command.
85
86First, compile and flash the left half. Then when that's done, recompile with the setting above. It should look something like:
87
88```sh
89make crkbd:default RGB_MATRIX_SPLIT_RIGHT=yes
90```
91And then flash this new firmware image.
92
93After this is done, you should be able to use the normal RGB keycodes, but you'll see the RGB Matrix effects in use, giving a much better experience. 84After this is done, you should be able to use the normal RGB keycodes, but you'll see the RGB Matrix effects in use, giving a much better experience.
diff --git a/keyboards/crkbd/rev1/rev1.c b/keyboards/crkbd/rev1/rev1.c
index 9568d8008..b26292af5 100644
--- a/keyboards/crkbd/rev1/rev1.c
+++ b/keyboards/crkbd/rev1/rev1.c
@@ -1,6 +1,5 @@
1#include "crkbd.h" 1#include "crkbd.h"
2 2
3
4#ifdef RGB_MATRIX_ENABLE 3#ifdef RGB_MATRIX_ENABLE
5 4
6 // Logical Layout 5 // Logical Layout
@@ -39,37 +38,6 @@
39 // 05 06 06 05 38 // 05 06 06 05
40 // 15 14 07 07 14 15 3 39 // 15 14 07 07 14 15 3
41 40
42
43#ifdef RGB_MATRIX_SPLIT_RIGHT
44led_config_t g_led_config = { {
45 { 51, 50, 45, 44, 37, 36 },
46 { 52, 49, 46, 43, 38, 35 },
47 { 53, 48, 47, 42, 39, 34 },
48 { NO_LED, NO_LED, NO_LED, 41, 40, 33 },
49 { 24, 23, 18, 17, 10, 9 },
50 { 25, 22, 19, 16, 11, 8 },
51 { 26, 21, 20, 15, 12, 7 },
52 { NO_LED, NO_LED, NO_LED, 14, 13, 6 }
53}, {
54 { 139, 16 }, { 174, 13 }, { 208, 20 }, { 208, 38 }, { 174, 48 }, { 139, 52 }, { 129, 63 },
55 { 139, 39 }, { 139, 21 }, { 139, 4 }, { 156, 2 }, { 156, 19 }, { 156, 37 }, { 144, 58 },
56 { 164, 55 }, { 174, 35 }, { 174, 13 }, { 174, 0 }, { 191, 3 }, { 191, 20 }, { 191, 37 },
57 { 208, 42 }, { 208, 24 }, { 208, 7 }, { 224, 7 }, { 224, 24 }, { 224, 41 }, { 85, 16 },
58 { 50, 13 }, { 16, 20 }, { 16, 38 }, { 50, 48 }, { 85, 52 }, { 95, 63 }, { 85, 39 },
59 { 85, 21 }, { 85, 4 }, { 68, 2 }, { 68, 19 }, { 68, 37 }, { 80, 58 }, { 60, 55 },
60 { 50, 35 }, { 50, 13 }, { 50, 0 }, { 33, 3 }, { 33, 20 }, { 33, 37 }, { 16, 42 },
61 { 16, 24 }, { 16, 7 }, { 0, 7 }, { 0, 24 }, { 0, 41 }
62}, {
63 2, 2, 2, 2, 2, 2, 1,
64 4, 4, 4, 4, 4, 4, 1,
65 1, 4, 4, 4, 4, 4, 4,
66 4, 4, 4, 1, 1, 1, 2,
67 2, 2, 2, 2, 2, 1, 4,
68 4, 4, 4, 4, 4, 1, 1,
69 4, 4, 4, 4, 4, 4, 4,
70 4, 4, 1, 1, 1
71} };
72#else
73led_config_t g_led_config = { { 41led_config_t g_led_config = { {
74 { 24, 23, 18, 17, 10, 9 }, 42 { 24, 23, 18, 17, 10, 9 },
75 { 25, 22, 19, 16, 11, 8 }, 43 { 25, 22, 19, 16, 11, 8 },
@@ -99,4 +67,43 @@ led_config_t g_led_config = { {
99 4, 4, 1, 1, 1 67 4, 4, 1, 1, 1
100} }; 68} };
101#endif 69#endif
70
71__attribute__((weak))
72void matrix_init_user(void) {}
73
74void matrix_init_kb(void) {
75
76#ifdef RGB_MATRIX_ENABLE
77 if (!isLeftHand) {
78 g_led_config = (led_config_t){ {
79 { 51, 50, 45, 44, 37, 36 },
80 { 52, 49, 46, 43, 38, 35 },
81 { 53, 48, 47, 42, 39, 34 },
82 { NO_LED, NO_LED, NO_LED, 41, 40, 33 },
83 { 24, 23, 18, 17, 10, 9 },
84 { 25, 22, 19, 16, 11, 8 },
85 { 26, 21, 20, 15, 12, 7 },
86 { NO_LED, NO_LED, NO_LED, 14, 13, 6 }
87 }, {
88 { 139, 16 }, { 174, 13 }, { 208, 20 }, { 208, 38 }, { 174, 48 }, { 139, 52 }, { 129, 63 },
89 { 139, 39 }, { 139, 21 }, { 139, 4 }, { 156, 2 }, { 156, 19 }, { 156, 37 }, { 144, 58 },
90 { 164, 55 }, { 174, 35 }, { 174, 13 }, { 174, 0 }, { 191, 3 }, { 191, 20 }, { 191, 37 },
91 { 208, 42 }, { 208, 24 }, { 208, 7 }, { 224, 7 }, { 224, 24 }, { 224, 41 }, { 85, 16 },
92 { 50, 13 }, { 16, 20 }, { 16, 38 }, { 50, 48 }, { 85, 52 }, { 95, 63 }, { 85, 39 },
93 { 85, 21 }, { 85, 4 }, { 68, 2 }, { 68, 19 }, { 68, 37 }, { 80, 58 }, { 60, 55 },
94 { 50, 35 }, { 50, 13 }, { 50, 0 }, { 33, 3 }, { 33, 20 }, { 33, 37 }, { 16, 42 },
95 { 16, 24 }, { 16, 7 }, { 0, 7 }, { 0, 24 }, { 0, 41 }
96 }, {
97 2, 2, 2, 2, 2, 2, 1,
98 4, 4, 4, 4, 4, 4, 1,
99 1, 4, 4, 4, 4, 4, 4,
100 4, 4, 4, 1, 1, 1, 2,
101 2, 2, 2, 2, 2, 1, 4,
102 4, 4, 4, 4, 4, 1, 1,
103 4, 4, 4, 4, 4, 4, 4,
104 4, 4, 1, 1, 1
105 } };
106 }
102#endif 107#endif
108 matrix_init_user();
109}