diff options
Diffstat (limited to 'quantum/led_matrix.h')
| -rw-r--r-- | quantum/led_matrix.h | 39 |
1 files changed, 31 insertions, 8 deletions
diff --git a/quantum/led_matrix.h b/quantum/led_matrix.h index 85bae43c1..fd7ef7d29 100644 --- a/quantum/led_matrix.h +++ b/quantum/led_matrix.h | |||
| @@ -19,10 +19,21 @@ | |||
| 19 | 19 | ||
| 20 | #pragma once | 20 | #pragma once |
| 21 | 21 | ||
| 22 | #include <stdint.h> | ||
| 23 | #include <stdbool.h> | ||
| 22 | #include "led_matrix_types.h" | 24 | #include "led_matrix_types.h" |
| 25 | #include "quantum.h" | ||
| 23 | 26 | ||
| 24 | #ifndef BACKLIGHT_ENABLE | 27 | #ifdef IS31FL3731 |
| 25 | # error You must define BACKLIGHT_ENABLE with LED_MATRIX_ENABLE | 28 | # include "is31fl3731-simple.h" |
| 29 | #endif | ||
| 30 | |||
| 31 | #ifndef LED_MATRIX_LED_FLUSH_LIMIT | ||
| 32 | # define LED_MATRIX_LED_FLUSH_LIMIT 16 | ||
| 33 | #endif | ||
| 34 | |||
| 35 | #ifndef LED_MATRIX_LED_PROCESS_LIMIT | ||
| 36 | # define LED_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 | ||
| 26 | #endif | 37 | #endif |
| 27 | 38 | ||
| 28 | enum led_matrix_effects { | 39 | enum led_matrix_effects { |
| @@ -35,7 +46,7 @@ void led_matrix_set_index_value(int index, uint8_t value); | |||
| 35 | void led_matrix_set_index_value_all(uint8_t value); | 46 | void led_matrix_set_index_value_all(uint8_t value); |
| 36 | 47 | ||
| 37 | // This runs after another backlight effect and replaces | 48 | // This runs after another backlight effect and replaces |
| 38 | // colors already set | 49 | // values already set |
| 39 | void led_matrix_indicators(void); | 50 | void led_matrix_indicators(void); |
| 40 | void led_matrix_indicators_kb(void); | 51 | void led_matrix_indicators_kb(void); |
| 41 | void led_matrix_indicators_user(void); | 52 | void led_matrix_indicators_user(void); |
| @@ -59,21 +70,33 @@ bool process_led_matrix(uint16_t keycode, keyrecord_t *record); | |||
| 59 | uint32_t led_matrix_get_tick(void); | 70 | uint32_t led_matrix_get_tick(void); |
| 60 | 71 | ||
| 61 | void led_matrix_toggle(void); | 72 | void led_matrix_toggle(void); |
| 73 | void led_matrix_toggle_noeeprom(void); | ||
| 62 | void led_matrix_enable(void); | 74 | void led_matrix_enable(void); |
| 63 | void led_matrix_enable_noeeprom(void); | 75 | void led_matrix_enable_noeeprom(void); |
| 64 | void led_matrix_disable(void); | 76 | void led_matrix_disable(void); |
| 65 | void led_matrix_disable_noeeprom(void); | 77 | void led_matrix_disable_noeeprom(void); |
| 78 | uint8_t led_matrix_is_enabled(void); | ||
| 79 | void led_matrix_mode(uint8_t mode); | ||
| 80 | void led_matrix_mode_noeeprom(uint8_t mode); | ||
| 81 | uint8_t led_matrix_get_mode(void); | ||
| 66 | void led_matrix_step(void); | 82 | void led_matrix_step(void); |
| 83 | void led_matrix_step_noeeprom(void); | ||
| 67 | void led_matrix_step_reverse(void); | 84 | void led_matrix_step_reverse(void); |
| 85 | void led_matrix_step_reverse_noeeprom(void); | ||
| 86 | void led_matrix_set_val(uint8_t val); | ||
| 87 | void led_matrix_set_val_noeeprom(uint8_t val); | ||
| 88 | uint8_t led_matrix_get_val(void); | ||
| 68 | void led_matrix_increase_val(void); | 89 | void led_matrix_increase_val(void); |
| 90 | void led_matrix_increase_val_noeeprom(void); | ||
| 69 | void led_matrix_decrease_val(void); | 91 | void led_matrix_decrease_val(void); |
| 92 | void led_matrix_decrease_val_noeeprom(void); | ||
| 93 | void led_matrix_set_speed(uint8_t speed); | ||
| 94 | void led_matrix_set_speed_noeeprom(uint8_t speed); | ||
| 95 | uint8_t led_matrix_get_speed(void); | ||
| 70 | void led_matrix_increase_speed(void); | 96 | void led_matrix_increase_speed(void); |
| 97 | void led_matrix_increase_speed_noeeprom(void); | ||
| 71 | void led_matrix_decrease_speed(void); | 98 | void led_matrix_decrease_speed(void); |
| 72 | void led_matrix_mode(uint8_t mode, bool eeprom_write); | 99 | void led_matrix_decrease_speed_noeeprom(void); |
| 73 | void led_matrix_mode_noeeprom(uint8_t mode); | ||
| 74 | uint8_t led_matrix_get_mode(void); | ||
| 75 | void led_matrix_set_value(uint8_t mode); | ||
| 76 | void led_matrix_set_value_noeeprom(uint8_t mode); | ||
| 77 | 100 | ||
| 78 | typedef struct { | 101 | typedef struct { |
| 79 | /* Perform any initialisation required for the other driver functions to work. */ | 102 | /* Perform any initialisation required for the other driver functions to work. */ |
