summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-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 4ce9d15f0f..91ec77ace0 100644
--- a/docs/feature_rgb_matrix.md
+++ b/docs/feature_rgb_matrix.md
@@ -127,13 +127,13 @@ Configure the hardware via your `config.h`:
From 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:
```C
-const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
+rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
/* {row | col << 4}
* | {x=0..224, y=0..64}
- * | | modifier
+ * | | flags
* | | | */
{{0|(0<<4)}, {20.36*0, 21.33*0}, 1},
- {{0|(1<<4)}, {20.36*1, 21.33*0}, 1},
+ {{0|(1<<4)}, {20.36*1, 21.33*0}, 4},
....
}
```
@@ -147,7 +147,19 @@ y = 64 / (NUMBER_OF_ROWS - 1) * ROW_POSITION
Where NUMBER_OF_COLS, NUMBER_OF_ROWS, COL_POSITION, & ROW_POSITION are all based on the physical layout of your keyboard, not the electrical layout.
-`modifier` is a boolean, whether or not a certain key is considered a modifier (used in some effects).
+`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.
+
+## Flags
+
+|Define |Description |
+|------------------------------------|-------------------------------------------|
+|`#define HAS_FLAGS(bits, flags)` |Returns true if `bits` has all `flags` set.|
+|`#define HAS_ANY_FLAGS(bits, flags)`|Returns true if `bits` has any `flags` set.|
+|`#define LED_FLAG_NONE 0x00` |If thes LED has no flags. |
+|`#define LED_FLAG_ALL 0xFF` |If thes LED has all flags. |
+|`#define LED_FLAG_MODIFIER 0x01` |If the Key for this LED is a modifier. |
+|`#define LED_FLAG_UNDERGLOW 0x02` |If the LED is for underglow. |
+|`#define LED_FLAG_KEYLIGHT 0x04` |If the LED is for key backlight. |
## Keycodes