diff options
Diffstat (limited to 'docs/feature_rgb_matrix.md')
-rw-r--r-- | docs/feature_rgb_matrix.md | 278 |
1 files changed, 153 insertions, 125 deletions
diff --git a/docs/feature_rgb_matrix.md b/docs/feature_rgb_matrix.md index 8d1efb12a..ec1218954 100644 --- a/docs/feature_rgb_matrix.md +++ b/docs/feature_rgb_matrix.md | |||
@@ -10,39 +10,45 @@ If you want to use single color LED's you should use the [LED Matrix Subsystem]( | |||
10 | 10 | ||
11 | There is basic support for addressable RGB matrix lighting with the I2C IS31FL3731 RGB controller. To enable it, add this to your `rules.mk`: | 11 | There is basic support for addressable RGB matrix lighting with the I2C IS31FL3731 RGB controller. To enable it, add this to your `rules.mk`: |
12 | 12 | ||
13 | RGB_MATRIX_ENABLE = IS31FL3731 | 13 | ```C |
14 | RGB_MATRIX_ENABLE = IS31FL3731 | ||
15 | ``` | ||
14 | 16 | ||
15 | Configure the hardware via your `config.h`: | 17 | Configure the hardware via your `config.h`: |
16 | 18 | ||
17 | // This is a 7-bit address, that gets left-shifted and bit 0 | 19 | ```C |
18 | // set to 0 for write, 1 for read (as per I2C protocol) | 20 | // This is a 7-bit address, that gets left-shifted and bit 0 |
19 | // The address will vary depending on your wiring: | 21 | // set to 0 for write, 1 for read (as per I2C protocol) |
20 | // 0b1110100 AD <-> GND | 22 | // The address will vary depending on your wiring: |
21 | // 0b1110111 AD <-> VCC | 23 | // 0b1110100 AD <-> GND |
22 | // 0b1110101 AD <-> SCL | 24 | // 0b1110111 AD <-> VCC |
23 | // 0b1110110 AD <-> SDA | 25 | // 0b1110101 AD <-> SCL |
24 | #define DRIVER_ADDR_1 0b1110100 | 26 | // 0b1110110 AD <-> SDA |
25 | #define DRIVER_ADDR_2 0b1110110 | 27 | #define DRIVER_ADDR_1 0b1110100 |
26 | 28 | #define DRIVER_ADDR_2 0b1110110 | |
27 | #define DRIVER_COUNT 2 | 29 | |
28 | #define DRIVER_1_LED_TOTAL 25 | 30 | #define DRIVER_COUNT 2 |
29 | #define DRIVER_2_LED_TOTAL 24 | 31 | #define DRIVER_1_LED_TOTAL 25 |
30 | #define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL | 32 | #define DRIVER_2_LED_TOTAL 24 |
33 | #define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL | ||
34 | ``` | ||
31 | 35 | ||
32 | Currently only 2 drivers are supported, but it would be trivial to support all 4 combinations. | 36 | Currently only 2 drivers are supported, but it would be trivial to support all 4 combinations. |
33 | 37 | ||
34 | Define these arrays listing all the LEDs in your `<keyboard>.c`: | 38 | Define these arrays listing all the LEDs in your `<keyboard>.c`: |
35 | 39 | ||
36 | const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { | 40 | ```C |
37 | /* Refer to IS31 manual for these locations | 41 | const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { |
38 | * driver | 42 | /* Refer to IS31 manual for these locations |
39 | * | R location | 43 | * driver |
40 | * | | G location | 44 | * | R location |
41 | * | | | B location | 45 | * | | G location |
42 | * | | | | */ | 46 | * | | | B location |
43 | {0, C1_3, C2_3, C3_3}, | 47 | * | | | | */ |
44 | .... | 48 | {0, C1_3, C2_3, C3_3}, |
45 | } | 49 | .... |
50 | } | ||
51 | ``` | ||
46 | 52 | ||
47 | Where `Cx_y` is the location of the LED in the matrix defined by [the datasheet](http://www.issi.com/WW/pdf/31FL3731.pdf) and the header file `drivers/issi/is31fl3731.h`. The `driver` is the index of the driver you defined in your `config.h` (`0` or `1` right now). | 53 | Where `Cx_y` is the location of the LED in the matrix defined by [the datasheet](http://www.issi.com/WW/pdf/31FL3731.pdf) and the header file `drivers/issi/is31fl3731.h`. The `driver` is the index of the driver you defined in your `config.h` (`0` or `1` right now). |
48 | 54 | ||
@@ -50,60 +56,70 @@ Where `Cx_y` is the location of the LED in the matrix defined by [the datasheet] | |||
50 | 56 | ||
51 | There is basic support for addressable RGB matrix lighting with the I2C IS31FL3733 RGB controller. To enable it, add this to your `rules.mk`: | 57 | There is basic support for addressable RGB matrix lighting with the I2C IS31FL3733 RGB controller. To enable it, add this to your `rules.mk`: |
52 | 58 | ||
53 | RGB_MATRIX_ENABLE = IS31FL3733 | 59 | ```C |
60 | RGB_MATRIX_ENABLE = IS31FL3733 | ||
61 | ``` | ||
54 | 62 | ||
55 | Configure the hardware via your `config.h`: | 63 | Configure the hardware via your `config.h`: |
56 | 64 | ||
57 | // This is a 7-bit address, that gets left-shifted and bit 0 | 65 | ```C |
58 | // set to 0 for write, 1 for read (as per I2C protocol) | 66 | // This is a 7-bit address, that gets left-shifted and bit 0 |
59 | // The address will vary depending on your wiring: | 67 | // set to 0 for write, 1 for read (as per I2C protocol) |
60 | // 00 <-> GND | 68 | // The address will vary depending on your wiring: |
61 | // 01 <-> SCL | 69 | // 00 <-> GND |
62 | // 10 <-> SDA | 70 | // 01 <-> SCL |
63 | // 11 <-> VCC | 71 | // 10 <-> SDA |
64 | // ADDR1 represents A1:A0 of the 7-bit address. | 72 | // 11 <-> VCC |
65 | // ADDR2 represents A3:A2 of the 7-bit address. | 73 | // ADDR1 represents A1:A0 of the 7-bit address. |
66 | // The result is: 0b101(ADDR2)(ADDR1) | 74 | // ADDR2 represents A3:A2 of the 7-bit address. |
67 | #define DRIVER_ADDR_1 0b1010000 | 75 | // The result is: 0b101(ADDR2)(ADDR1) |
68 | #define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons. | 76 | #define DRIVER_ADDR_1 0b1010000 |
69 | 77 | #define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons. | |
70 | #define DRIVER_COUNT 2 | 78 | |
71 | #define DRIVER_1_LED_TOTAL 64 | 79 | #define DRIVER_COUNT 2 |
72 | #define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL | 80 | #define DRIVER_1_LED_TOTAL 64 |
81 | #define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL | ||
82 | ``` | ||
73 | 83 | ||
74 | Currently only a single drivers is supported, but it would be trivial to support all 4 combinations. For now define `DRIVER_ADDR_2` as `DRIVER_ADDR_1` | 84 | Currently only a single drivers is supported, but it would be trivial to support all 4 combinations. For now define `DRIVER_ADDR_2` as `DRIVER_ADDR_1` |
75 | 85 | ||
76 | Define these arrays listing all the LEDs in your `<keyboard>.c`: | 86 | Define these arrays listing all the LEDs in your `<keyboard>.c`: |
77 | 87 | ||
78 | const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { | 88 | ```C |
79 | /* Refer to IS31 manual for these locations | 89 | const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { |
80 | * driver | 90 | /* Refer to IS31 manual for these locations |
81 | * | R location | 91 | * driver |
82 | * | | G location | 92 | * | R location |
83 | * | | | B location | 93 | * | | G location |
84 | * | | | | */ | 94 | * | | | B location |
85 | {0, B_1, A_1, C_1}, | 95 | * | | | | */ |
86 | .... | 96 | {0, B_1, A_1, C_1}, |
87 | } | 97 | .... |
98 | } | ||
99 | ``` | ||
88 | 100 | ||
89 | Where `X_Y` is the location of the LED in the matrix defined by [the datasheet](http://www.issi.com/WW/pdf/31FL3733.pdf) and the header file `drivers/issi/is31fl3733.h`. The `driver` is the index of the driver you defined in your `config.h` (Only `0` right now). | 101 | Where `X_Y` is the location of the LED in the matrix defined by [the datasheet](http://www.issi.com/WW/pdf/31FL3733.pdf) and the header file `drivers/issi/is31fl3733.h`. The `driver` is the index of the driver you defined in your `config.h` (Only `0` right now). |
90 | 102 | ||
91 | From this point forward the configuration is the same for all the drivers. | 103 | From this point forward the configuration is the same for all the drivers. |
92 | 104 | ||
93 | const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { | 105 | ```C |
94 | /* {row | col << 4} | 106 | const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { |
95 | * | {x=0..224, y=0..64} | 107 | /* {row | col << 4} |
96 | * | | modifier | 108 | * | {x=0..224, y=0..64} |
97 | * | | | */ | 109 | * | | modifier |
98 | {{0|(0<<4)}, {20.36*0, 21.33*0}, 1}, | 110 | * | | | */ |
99 | {{0|(1<<4)}, {20.36*1, 21.33*0}, 1}, | 111 | {{0|(0<<4)}, {20.36*0, 21.33*0}, 1}, |
100 | .... | 112 | {{0|(1<<4)}, {20.36*1, 21.33*0}, 1}, |
101 | } | 113 | .... |
114 | } | ||
115 | ``` | ||
102 | 116 | ||
103 | The format for the matrix position used in this array is `{row | (col << 4)}`. The `x` is between (inclusive) 0-224, and `y` is between (inclusive) 0-64. The easiest way to calculate these positions is: | 117 | The format for the matrix position used in this array is `{row | (col << 4)}`. The `x` is between (inclusive) 0-224, and `y` is between (inclusive) 0-64. The easiest way to calculate these positions is: |
104 | 118 | ||
105 | x = 224 / ( NUMBER_OF_COLS - 1 ) * ROW_POSITION | 119 | ```C |
106 | y = 64 / (NUMBER_OF_ROWS - 1 ) * COL_POSITION | 120 | x = 224 / ( NUMBER_OF_COLS - 1 ) * ROW_POSITION |
121 | y = 64 / (NUMBER_OF_ROWS - 1 ) * COL_POSITION | ||
122 | ``` | ||
107 | 123 | ||
108 | Where all variables are decimels/floats. | 124 | Where all variables are decimels/floats. |
109 | 125 | ||
@@ -113,48 +129,50 @@ Where all variables are decimels/floats. | |||
113 | 129 | ||
114 | All RGB keycodes are currently shared with the RGBLIGHT system: | 130 | All RGB keycodes are currently shared with the RGBLIGHT system: |
115 | 131 | ||
116 | * `RGB_TOG` - toggle | 132 | * `RGB_TOG` - toggle |
117 | * `RGB_MOD` - cycle through modes | 133 | * `RGB_MOD` - cycle through modes |
118 | * `RGB_HUI` - increase hue | 134 | * `RGB_HUI` - increase hue |
119 | * `RGB_HUD` - decrease hue | 135 | * `RGB_HUD` - decrease hue |
120 | * `RGB_SAI` - increase saturation | 136 | * `RGB_SAI` - increase saturation |
121 | * `RGB_SAD` - decrease saturation | 137 | * `RGB_SAD` - decrease saturation |
122 | * `RGB_VAI` - increase value | 138 | * `RGB_VAI` - increase value |
123 | * `RGB_VAD` - decrease value | 139 | * `RGB_VAD` - decrease value |
124 | * `RGB_SPI` - increase speed effect (no EEPROM support) | 140 | * `RGB_SPI` - increase speed effect (no EEPROM support) |
125 | * `RGB_SPD` - decrease speed effect (no EEPROM support) | 141 | * `RGB_SPD` - decrease speed effect (no EEPROM support) |
126 | 142 | * `RGB_MODE_*` keycodes will generally work, but are not currently mapped to the correct effects for the RGB Matrix system | |
127 | |||
128 | * `RGB_MODE_*` keycodes will generally work, but are not currently mapped to the correct effects for the RGB Matrix system | ||
129 | 143 | ||
130 | ## RGB Matrix Effects | 144 | ## RGB Matrix Effects |
131 | 145 | ||
132 | These are the effects that are currently available: | 146 | All effects have been configured to support current configuration values (Hue, Saturation, Value, & Speed) unless otherwise noted below. These are the effects that are currently available: |
133 | 147 | ||
134 | enum rgb_matrix_effects { | 148 | ```C |
135 | RGB_MATRIX_SOLID_COLOR = 1, | 149 | enum rgb_matrix_effects { |
136 | RGB_MATRIX_ALPHAS_MODS, | 150 | RGB_MATRIX_NONE = 0, |
137 | RGB_MATRIX_DUAL_BEACON, | 151 | RGB_MATRIX_SOLID_COLOR = 1, // Static single hue, no speed support |
138 | RGB_MATRIX_GRADIENT_UP_DOWN, | 152 | RGB_MATRIX_ALPHAS_MODS, // Static dual hue, speed is hue for secondary hue |
139 | RGB_MATRIX_RAINDROPS, | 153 | RGB_MATRIX_GRADIENT_UP_DOWN, // Static gradient top to bottom, speed controls how much gradient changes |
140 | RGB_MATRIX_CYCLE_ALL, | 154 | RGB_MATRIX_BREATHING, // Single hue brightness cycling animation |
141 | RGB_MATRIX_CYCLE_LEFT_RIGHT, | 155 | RGB_MATRIX_CYCLE_ALL, // Full keyboard solid hue cycling through full gradient |
142 | RGB_MATRIX_CYCLE_UP_DOWN, | 156 | RGB_MATRIX_CYCLE_LEFT_RIGHT, // Full gradient scrolling left to right |
143 | RGB_MATRIX_RAINBOW_BEACON, | 157 | RGB_MATRIX_CYCLE_UP_DOWN, // Full gradient scrolling top to bottom |
144 | RGB_MATRIX_RAINBOW_PINWHEELS, | 158 | RGB_MATRIX_RAINBOW_MOVING_CHEVRON, // Full gradent Chevron shapped scrolling left to right |
145 | RGB_MATRIX_RAINBOW_MOVING_CHEVRON, | 159 | RGB_MATRIX_DUAL_BEACON, // Full gradient spinning around center of keyboard |
146 | RGB_MATRIX_JELLYBEAN_RAINDROPS, | 160 | RGB_MATRIX_RAINBOW_BEACON, // Full tighter gradient spinning around center of keyboard |
147 | RGB_MATRIX_DIGITAL_RAIN, | 161 | RGB_MATRIX_RAINBOW_PINWHEELS, // Full dual gradients spinning two halfs of keyboard |
148 | #ifdef RGB_MATRIX_KEYPRESSES | 162 | RGB_MATRIX_RAINDROPS, // Randomly changes a single key's hue |
149 | RGB_MATRIX_SOLID_REACTIVE, | 163 | RGB_MATRIX_JELLYBEAN_RAINDROPS, // Randomly changes a single key's hue and saturation |
150 | RGB_MATRIX_REACTIVE_SIMPLE, | 164 | RGB_MATRIX_DIGITAL_RAIN, // That famous computer simulation |
151 | RGB_MATRIX_SPLASH, | 165 | #if defined(RGB_MATRIX_KEYPRESSES) || defined(RGB_MATRIX_KEYRELEASES) |
152 | RGB_MATRIX_MULTISPLASH, | 166 | RGB_MATRIX_SOLID_REACTIVE_SIMPLE, // Pulses keys hit to hue & value then fades value out |
153 | RGB_MATRIX_SOLID_SPLASH, | 167 | RGB_MATRIX_SOLID_REACTIVE, // Static single hue, pulses keys hit to shifted hue then fades to current hue |
154 | RGB_MATRIX_SOLID_MULTISPLASH, | 168 | RGB_MATRIX_SPLASH, // Full gradient & value pulse away from a single key hit then fades value out |
155 | #endif | 169 | RGB_MATRIX_MULTISPLASH, // Full gradient & value pulse away from multiple key hits then fades value out |
156 | RGB_MATRIX_EFFECT_MAX | 170 | RGB_MATRIX_SOLID_SPLASH, // Hue & value pulse away from a single key hit then fades value out |
157 | }; | 171 | RGB_MATRIX_SOLID_MULTISPLASH, // Hue & value pulse away from multiple key hits then fades value out |
172 | #endif | ||
173 | RGB_MATRIX_EFFECT_MAX | ||
174 | }; | ||
175 | ``` | ||
158 | 176 | ||
159 | You can disable a single effect by defining `DISABLE_[EFFECT_NAME]` in your `config.h`: | 177 | You can disable a single effect by defining `DISABLE_[EFFECT_NAME]` in your `config.h`: |
160 | 178 | ||
@@ -162,19 +180,20 @@ You can disable a single effect by defining `DISABLE_[EFFECT_NAME]` in your `con | |||
162 | |Define |Description | | 180 | |Define |Description | |
163 | |---------------------------------------------------|--------------------------------------------| | 181 | |---------------------------------------------------|--------------------------------------------| |
164 | |`#define DISABLE_RGB_MATRIX_ALPHAS_MODS` |Disables `RGB_MATRIX_ALPHAS_MODS` | | 182 | |`#define DISABLE_RGB_MATRIX_ALPHAS_MODS` |Disables `RGB_MATRIX_ALPHAS_MODS` | |
165 | |`#define DISABLE_RGB_MATRIX_DUAL_BEACON` |Disables `RGB_MATRIX_DUAL_BEACON` | | ||
166 | |`#define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN` |Disables `RGB_MATRIX_GRADIENT_UP_DOWN` | | 183 | |`#define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN` |Disables `RGB_MATRIX_GRADIENT_UP_DOWN` | |
167 | |`#define DISABLE_RGB_MATRIX_RAINDROPS` |Disables `RGB_MATRIX_RAINDROPS` | | 184 | |`#define DISABLE_RGB_MATRIX_BREATHING` |Disables `RGB_MATRIX_BREATHING` | |
168 | |`#define DISABLE_RGB_MATRIX_CYCLE_ALL` |Disables `RGB_MATRIX_CYCLE_ALL` | | 185 | |`#define DISABLE_RGB_MATRIX_CYCLE_ALL` |Disables `RGB_MATRIX_CYCLE_ALL` | |
169 | |`#define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT` |Disables `RGB_MATRIX_CYCLE_LEFT_RIGHT` | | 186 | |`#define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT` |Disables `RGB_MATRIX_CYCLE_LEFT_RIGHT` | |
170 | |`#define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN` |Disables `RGB_MATRIX_CYCLE_UP_DOWN` | | 187 | |`#define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN` |Disables `RGB_MATRIX_CYCLE_UP_DOWN` | |
188 | |`#define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON`|Disables `RGB_MATRIX_RAINBOW_MOVING_CHEVRON`| | ||
189 | |`#define DISABLE_RGB_MATRIX_DUAL_BEACON` |Disables `RGB_MATRIX_DUAL_BEACON` | | ||
171 | |`#define DISABLE_RGB_MATRIX_RAINBOW_BEACON` |Disables `RGB_MATRIX_RAINBOW_BEACON` | | 190 | |`#define DISABLE_RGB_MATRIX_RAINBOW_BEACON` |Disables `RGB_MATRIX_RAINBOW_BEACON` | |
172 | |`#define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS` |Disables `RGB_MATRIX_RAINBOW_PINWHEELS` | | 191 | |`#define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS` |Disables `RGB_MATRIX_RAINBOW_PINWHEELS` | |
173 | |`#define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON`|Disables `RGB_MATRIX_RAINBOW_MOVING_CHEVRON`| | 192 | |`#define DISABLE_RGB_MATRIX_RAINDROPS` |Disables `RGB_MATRIX_RAINDROPS` | |
174 | |`#define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS` |Disables `RGB_MATRIX_JELLYBEAN_RAINDROPS` | | 193 | |`#define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS` |Disables `RGB_MATRIX_JELLYBEAN_RAINDROPS` | |
175 | |`#define DISABLE_RGB_MATRIX_DIGITAL_RAIN` |Disables `RGB_MATRIX_DIGITAL_RAIN` | | 194 | |`#define DISABLE_RGB_MATRIX_DIGITAL_RAIN` |Disables `RGB_MATRIX_DIGITAL_RAIN` | |
176 | |`#define DISABLE_RGB_MATRIX_SOLID_REACTIVE` |Disables `RGB_MATRIX_SOLID_REACTIVE` | | 195 | |`#define DISABLE_RGB_MATRIX_SOLID_REACTIVE` |Disables `RGB_MATRIX_SOLID_REACTIVE` | |
177 | |`#define DISABLE_RGB_MATRIX_REACTIVE_SIMPLE` |Disables `RGB_MATRIX_REACTIVE_SIMPLE` | | 196 | |`#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE` |Disables `RGB_MATRIX_SOLID_REACTIVE_SIMPLEE`| |
178 | |`#define DISABLE_RGB_MATRIX_SPLASH` |Disables `RGB_MATRIX_SPLASH` | | 197 | |`#define DISABLE_RGB_MATRIX_SPLASH` |Disables `RGB_MATRIX_SPLASH` | |
179 | |`#define DISABLE_RGB_MATRIX_MULTISPLASH` |Disables `RGB_MATRIX_MULTISPLASH` | | 198 | |`#define DISABLE_RGB_MATRIX_MULTISPLASH` |Disables `RGB_MATRIX_MULTISPLASH` | |
180 | |`#define DISABLE_RGB_MATRIX_SOLID_SPLASH` |Disables `RGB_MATRIX_SOLID_SPLASH` | | 199 | |`#define DISABLE_RGB_MATRIX_SOLID_SPLASH` |Disables `RGB_MATRIX_SOLID_SPLASH` | |
@@ -185,26 +204,33 @@ You can disable a single effect by defining `DISABLE_[EFFECT_NAME]` in your `con | |||
185 | 204 | ||
186 | Custom layer effects can be done by defining this in your `<keyboard>.c`: | 205 | Custom layer effects can be done by defining this in your `<keyboard>.c`: |
187 | 206 | ||
188 | void rgb_matrix_indicators_kb(void) { | 207 | ```C |
189 | rgb_matrix_set_color(index, red, green, blue); | 208 | void rgb_matrix_indicators_kb(void) { |
190 | } | 209 | rgb_matrix_set_color(index, red, green, blue); |
210 | } | ||
211 | ``` | ||
191 | 212 | ||
192 | A similar function works in the keymap as `rgb_matrix_indicators_user`. | 213 | A similar function works in the keymap as `rgb_matrix_indicators_user`. |
193 | 214 | ||
194 | ## Additional `config.h` Options | 215 | ## Additional `config.h` Options |
195 | 216 | ||
196 | #define RGB_MATRIX_KEYPRESSES // reacts to keypresses (will slow down matrix scan by a lot) | 217 | ```C |
197 | #define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (not recommened) | 218 | #define RGB_MATRIX_KEYPRESSES // reacts to keypresses |
198 | #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects | 219 | #define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses) |
199 | #define RGB_DISABLE_WHEN_USB_SUSPENDED false // turn off effects when suspended | 220 | #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects |
200 | #define RGB_MATRIX_SKIP_FRAMES 1 // number of frames to skip when displaying animations (0 is full effect) if not defined defaults to 1 | 221 | #define RGB_DISABLE_WHEN_USB_SUSPENDED false // turn off effects when suspended |
201 | #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255 | 222 | #define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness) |
223 | #define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness) | ||
224 | #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255 | ||
225 | ``` | ||
202 | 226 | ||
203 | ## EEPROM storage | 227 | ## EEPROM storage |
204 | 228 | ||
205 | The EEPROM for it is currently shared with the RGBLIGHT system (it's generally assumed only one RGB would be used at a time), but could be configured to use its own 32bit address with: | 229 | The EEPROM for it is currently shared with the RGBLIGHT system (it's generally assumed only one RGB would be used at a time), but could be configured to use its own 32bit address with: |
206 | 230 | ||
207 | #define EECONFIG_RGB_MATRIX (uint32_t *)16 | 231 | ```C |
232 | #define EECONFIG_RGB_MATRIX (uint32_t *)16 | ||
233 | ``` | ||
208 | 234 | ||
209 | Where `16` is an unused index from `eeconfig.h`. | 235 | Where `16` is an unused index from `eeconfig.h`. |
210 | 236 | ||
@@ -212,12 +238,14 @@ Where `16` is an unused index from `eeconfig.h`. | |||
212 | 238 | ||
213 | To use the suspend feature, add this to your `<keyboard>.c`: | 239 | To use the suspend feature, add this to your `<keyboard>.c`: |
214 | 240 | ||
215 | void suspend_power_down_kb(void) | 241 | ```C |
216 | { | 242 | void suspend_power_down_kb(void) |
217 | rgb_matrix_set_suspend_state(true); | 243 | { |
218 | } | 244 | rgb_matrix_set_suspend_state(true); |
219 | 245 | } | |
220 | void suspend_wakeup_init_kb(void) | 246 | |
221 | { | 247 | void suspend_wakeup_init_kb(void) |
222 | rgb_matrix_set_suspend_state(false); | 248 | { |
223 | } | 249 | rgb_matrix_set_suspend_state(false); |
250 | } | ||
251 | ``` | ||