aboutsummaryrefslogtreecommitdiff
path: root/docs/feature_rgb_matrix.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/feature_rgb_matrix.md')
-rw-r--r--docs/feature_rgb_matrix.md20
1 files changed, 16 insertions, 4 deletions
diff --git a/docs/feature_rgb_matrix.md b/docs/feature_rgb_matrix.md
index 4ce9d15f0..91ec77ace 100644
--- a/docs/feature_rgb_matrix.md
+++ b/docs/feature_rgb_matrix.md
@@ -127,13 +127,13 @@ Configure the hardware via your `config.h`:
127From this point forward the configuration is the same for all the drivers. The struct rgb_led array tells the system for each led, what key electrical matrix it represents, what the physical position is on the board, and if the led is for a modifier key or not. Here is a brief example: 127From this point forward the configuration is the same for all the drivers. The struct rgb_led array tells the system for each led, what key electrical matrix it represents, what the physical position is on the board, and if the led is for a modifier key or not. Here is a brief example:
128 128
129```C 129```C
130const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { 130rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
131/* {row | col << 4} 131/* {row | col << 4}
132 * | {x=0..224, y=0..64} 132 * | {x=0..224, y=0..64}
133 * | | modifier 133 * | | flags
134 * | | | */ 134 * | | | */
135 {{0|(0<<4)}, {20.36*0, 21.33*0}, 1}, 135 {{0|(0<<4)}, {20.36*0, 21.33*0}, 1},
136 {{0|(1<<4)}, {20.36*1, 21.33*0}, 1}, 136 {{0|(1<<4)}, {20.36*1, 21.33*0}, 4},
137 .... 137 ....
138} 138}
139``` 139```
@@ -147,7 +147,19 @@ y = 64 / (NUMBER_OF_ROWS - 1) * ROW_POSITION
147 147
148Where NUMBER_OF_COLS, NUMBER_OF_ROWS, COL_POSITION, & ROW_POSITION are all based on the physical layout of your keyboard, not the electrical layout. 148Where NUMBER_OF_COLS, NUMBER_OF_ROWS, COL_POSITION, & ROW_POSITION are all based on the physical layout of your keyboard, not the electrical layout.
149 149
150`modifier` is a boolean, whether or not a certain key is considered a modifier (used in some effects). 150`flags` is a bitmask, whether or not a certain LEDs is of a certain type. It is recommended that LEDs are set to only 1 type.
151
152## Flags
153
154|Define |Description |
155|------------------------------------|-------------------------------------------|
156|`#define HAS_FLAGS(bits, flags)` |Returns true if `bits` has all `flags` set.|
157|`#define HAS_ANY_FLAGS(bits, flags)`|Returns true if `bits` has any `flags` set.|
158|`#define LED_FLAG_NONE 0x00` |If thes LED has no flags. |
159|`#define LED_FLAG_ALL 0xFF` |If thes LED has all flags. |
160|`#define LED_FLAG_MODIFIER 0x01` |If the Key for this LED is a modifier. |
161|`#define LED_FLAG_UNDERGLOW 0x02` |If the LED is for underglow. |
162|`#define LED_FLAG_KEYLIGHT 0x04` |If the LED is for key backlight. |
151 163
152## Keycodes 164## Keycodes
153 165