diff options
Diffstat (limited to 'docs/feature_led_matrix.md')
| -rw-r--r-- | docs/feature_led_matrix.md | 73 |
1 files changed, 23 insertions, 50 deletions
diff --git a/docs/feature_led_matrix.md b/docs/feature_led_matrix.md index 5134ab6ef..fc6682601 100644 --- a/docs/feature_led_matrix.md +++ b/docs/feature_led_matrix.md | |||
| @@ -52,7 +52,7 @@ Here is an example using 2 drivers. | |||
| 52 | Define these arrays listing all the LEDs in your `<keyboard>.c`: | 52 | Define these arrays listing all the LEDs in your `<keyboard>.c`: |
| 53 | 53 | ||
| 54 | ```c | 54 | ```c |
| 55 | const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { | 55 | const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { |
| 56 | /* Refer to IS31 manual for these locations | 56 | /* Refer to IS31 manual for these locations |
| 57 | * driver | 57 | * driver |
| 58 | * | LED address | 58 | * | LED address |
| @@ -63,7 +63,7 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { | |||
| 63 | } | 63 | } |
| 64 | ``` | 64 | ``` |
| 65 | 65 | ||
| 66 | Where `Cx_y` is the location of the LED in the matrix defined by [the datasheet](https://www.issi.com/WW/pdf/31FL3731.pdf) and the header file `drivers/issi/is31fl3731-simple.h`. The `driver` is the index of the driver you defined in your `config.h` (`0`, `1`, `2`, or `3` ). | 66 | Where `Cx_y` is the location of the LED in the matrix defined by [the datasheet](https://www.issi.com/WW/pdf/31FL3731.pdf) and the header file `drivers/led/issi/is31fl3731-simple.h`. The `driver` is the index of the driver you defined in your `config.h` (`0`, `1`, `2`, or `3` ). |
| 67 | 67 | ||
| 68 | --- | 68 | --- |
| 69 | 69 | ||
| @@ -164,26 +164,26 @@ You can disable a single effect by defining `DISABLE_[EFFECT_NAME]` in your `con | |||
| 164 | 164 | ||
| 165 | |Define |Description | | 165 | |Define |Description | |
| 166 | |-------------------------------------------------------|-----------------------------------------------| | 166 | |-------------------------------------------------------|-----------------------------------------------| |
| 167 | |`#define DISABLE_LED_MATRIX_ALPHAS_MODS` |Disables `LED_MATRIX_ALPHAS_MODS` | | 167 | |`#define ENABLE_LED_MATRIX_ALPHAS_MODS` |Enables `LED_MATRIX_ALPHAS_MODS` | |
| 168 | |`#define DISABLE_LED_MATRIX_BREATHING` |Disables `LED_MATRIX_BREATHING` | | 168 | |`#define ENABLE_LED_MATRIX_BREATHING` |Enables `LED_MATRIX_BREATHING` | |
| 169 | |`#define DISABLE_LED_MATRIX_BAND` |Disables `LED_MATRIX_BAND` | | 169 | |`#define ENABLE_LED_MATRIX_BAND` |Enables `LED_MATRIX_BAND` | |
| 170 | |`#define DISABLE_LED_MATRIX_BAND_PINWHEEL` |Disables `LED_MATRIX_BAND_PINWHEEL` | | 170 | |`#define ENABLE_LED_MATRIX_BAND_PINWHEEL` |Enables `LED_MATRIX_BAND_PINWHEEL` | |
| 171 | |`#define DISABLE_LED_MATRIX_BAND_SPIRAL` |Disables `LED_MATRIX_BAND_SPIRAL` | | 171 | |`#define ENABLE_LED_MATRIX_BAND_SPIRAL` |Enables `LED_MATRIX_BAND_SPIRAL` | |
| 172 | |`#define DISABLE_LED_MATRIX_CYCLE_LEFT_RIGHT` |Disables `LED_MATRIX_CYCLE_LEFT_RIGHT` | | 172 | |`#define ENABLE_LED_MATRIX_CYCLE_LEFT_RIGHT` |Enables `LED_MATRIX_CYCLE_LEFT_RIGHT` | |
| 173 | |`#define DISABLE_LED_MATRIX_CYCLE_UP_DOWN` |Disables `LED_MATRIX_CYCLE_UP_DOWN` | | 173 | |`#define ENABLE_LED_MATRIX_CYCLE_UP_DOWN` |Enables `LED_MATRIX_CYCLE_UP_DOWN` | |
| 174 | |`#define DISABLE_LED_MATRIX_CYCLE_OUT_IN` |Disables `LED_MATRIX_CYCLE_OUT_IN` | | 174 | |`#define ENABLE_LED_MATRIX_CYCLE_OUT_IN` |Enables `LED_MATRIX_CYCLE_OUT_IN` | |
| 175 | |`#define DISABLE_LED_MATRIX_DUAL_BEACON` |Disables `LED_MATRIX_DUAL_BEACON` | | 175 | |`#define ENABLE_LED_MATRIX_DUAL_BEACON` |Enables `LED_MATRIX_DUAL_BEACON` | |
| 176 | |`#define DISABLE_LED_MATRIX_SOLID_REACTIVE_SIMPLE` |Disables `LED_MATRIX_SOLID_REACTIVE_SIMPLE` | | 176 | |`#define ENABLE_LED_MATRIX_SOLID_REACTIVE_SIMPLE` |Enables `LED_MATRIX_SOLID_REACTIVE_SIMPLE` | |
| 177 | |`#define DISABLE_LED_MATRIX_SOLID_REACTIVE_WIDE` |Disables `LED_MATRIX_SOLID_REACTIVE_WIDE` | | 177 | |`#define ENABLE_LED_MATRIX_SOLID_REACTIVE_WIDE` |Enables `LED_MATRIX_SOLID_REACTIVE_WIDE` | |
| 178 | |`#define DISABLE_LED_MATRIX_SOLID_REACTIVE_MULTIWIDE` |Disables `LED_MATRIX_SOLID_REACTIVE_MULTIWIDE` | | 178 | |`#define ENABLE_LED_MATRIX_SOLID_REACTIVE_MULTIWIDE` |Enables `LED_MATRIX_SOLID_REACTIVE_MULTIWIDE` | |
| 179 | |`#define DISABLE_LED_MATRIX_SOLID_REACTIVE_CROSS` |Disables `LED_MATRIX_SOLID_REACTIVE_CROSS` | | 179 | |`#define ENABLE_LED_MATRIX_SOLID_REACTIVE_CROSS` |Enables `LED_MATRIX_SOLID_REACTIVE_CROSS` | |
| 180 | |`#define DISABLE_LED_MATRIX_SOLID_REACTIVE_MULTICROSS` |Disables `LED_MATRIX_SOLID_REACTIVE_MULTICROSS`| | 180 | |`#define ENABLE_LED_MATRIX_SOLID_REACTIVE_MULTICROSS` |Enables `LED_MATRIX_SOLID_REACTIVE_MULTICROSS`| |
| 181 | |`#define DISABLE_LED_MATRIX_SOLID_REACTIVE_NEXUS` |Disables `LED_MATRIX_SOLID_REACTIVE_NEXUS` | | 181 | |`#define ENABLE_LED_MATRIX_SOLID_REACTIVE_NEXUS` |Enables `LED_MATRIX_SOLID_REACTIVE_NEXUS` | |
| 182 | |`#define DISABLE_LED_MATRIX_SOLID_REACTIVE_MULTINEXUS` |Disables `LED_MATRIX_SOLID_REACTIVE_MULTINEXUS`| | 182 | |`#define ENABLE_LED_MATRIX_SOLID_REACTIVE_MULTINEXUS` |Enables `LED_MATRIX_SOLID_REACTIVE_MULTINEXUS`| |
| 183 | |`#define DISABLE_LED_MATRIX_SOLID_SPLASH` |Disables `LED_MATRIX_SOLID_SPLASH` | | 183 | |`#define ENABLE_LED_MATRIX_SOLID_SPLASH` |Enables `LED_MATRIX_SOLID_SPLASH` | |
| 184 | |`#define DISABLE_LED_MATRIX_SOLID_MULTISPLASH` |Disables `LED_MATRIX_SOLID_MULTISPLASH` | | 184 | |`#define ENABLE_LED_MATRIX_SOLID_MULTISPLASH` |Enables `LED_MATRIX_SOLID_MULTISPLASH` | |
| 185 | |`#define DISABLE_LED_MATRIX_WAVE_LEFT_RIGHT` |Disables `LED_MATRIX_WAVE_LEFT_RIGHT` | | 185 | |`#define ENABLE_LED_MATRIX_WAVE_LEFT_RIGHT` |Enables `LED_MATRIX_WAVE_LEFT_RIGHT` | |
| 186 | |`#define DISABLE_LED_MATRIX_WAVE_UP_DOWN` |Disables `LED_MATRIX_WAVE_UP_DOWN` | | 186 | |`#define ENABLE_LED_MATRIX_WAVE_UP_DOWN` |Enables `LED_MATRIX_WAVE_UP_DOWN` | |
| 187 | 187 | ||
| 188 | ## Custom LED Matrix Effects :id=custom-led-matrix-effects | 188 | ## Custom LED Matrix Effects :id=custom-led-matrix-effects |
| 189 | 189 | ||
| @@ -262,7 +262,7 @@ For inspiration and examples, check out the built-in effects under `quantum/led_ | |||
| 262 | #define LED_MATRIX_FRAMEBUFFER_EFFECTS // enable framebuffer effects | 262 | #define LED_MATRIX_FRAMEBUFFER_EFFECTS // enable framebuffer effects |
| 263 | #define LED_DISABLE_TIMEOUT 0 // number of milliseconds to wait until led automatically turns off | 263 | #define LED_DISABLE_TIMEOUT 0 // number of milliseconds to wait until led automatically turns off |
| 264 | #define LED_DISABLE_AFTER_TIMEOUT 0 // OBSOLETE: number of ticks to wait until disabling effects | 264 | #define LED_DISABLE_AFTER_TIMEOUT 0 // OBSOLETE: number of ticks to wait until disabling effects |
| 265 | #define LED_DISABLE_WHEN_USB_SUSPENDED false // turn off effects when suspended | 265 | #define LED_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended |
| 266 | #define LED_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) | 266 | #define LED_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) |
| 267 | #define LED_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) | 267 | #define LED_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) |
| 268 | #define LED_MATRIX_MAXIMUM_BRIGHTNESS 255 // limits maximum brightness of LEDs | 268 | #define LED_MATRIX_MAXIMUM_BRIGHTNESS 255 // limits maximum brightness of LEDs |
| @@ -350,30 +350,3 @@ void led_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { | |||
| 350 | LED_MATRIX_INDICATOR_SET_VALUE(index, value); | 350 | LED_MATRIX_INDICATOR_SET_VALUE(index, value); |
| 351 | } | 351 | } |
| 352 | ``` | 352 | ``` |
| 353 | |||
| 354 | ## Suspended State :id=suspended-state | ||
| 355 | To use the suspend feature, make sure that `#define LED_DISABLE_WHEN_USB_SUSPENDED true` is added to the `config.h` file. | ||
| 356 | |||
| 357 | Additionally add this to your `<keyboard>.c`: | ||
| 358 | |||
| 359 | ```c | ||
| 360 | void suspend_power_down_kb(void) { | ||
| 361 | led_matrix_set_suspend_state(true); | ||
| 362 | suspend_power_down_user(); | ||
| 363 | } | ||
| 364 | |||
| 365 | void suspend_wakeup_init_kb(void) { | ||
| 366 | led_matrix_set_suspend_state(false); | ||
| 367 | suspend_wakeup_init_user(); | ||
| 368 | } | ||
| 369 | ``` | ||
| 370 | or add this to your `keymap.c`: | ||
| 371 | ```c | ||
| 372 | void suspend_power_down_user(void) { | ||
| 373 | led_matrix_set_suspend_state(true); | ||
| 374 | } | ||
| 375 | |||
| 376 | void suspend_wakeup_init_user(void) { | ||
| 377 | led_matrix_set_suspend_state(false); | ||
| 378 | } | ||
| 379 | ``` | ||
