diff options
author | Ryan <fauxpark@gmail.com> | 2021-03-28 17:59:44 +1100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-28 17:59:44 +1100 |
commit | 2ae38e9c43cc689be65f04ea5c101b9f46a38c5e (patch) | |
tree | 918b2c9d8a87513edf5a5aec9f930f626c16d179 /quantum/led_matrix.h | |
parent | 0d1162f1809bc9828d9b4655b8d3cf3db60c4b55 (diff) | |
download | qmk_firmware-2ae38e9c43cc689be65f04ea5c101b9f46a38c5e.tar.gz qmk_firmware-2ae38e9c43cc689be65f04ea5c101b9f46a38c5e.zip |
LED Matrix: Config functions (#12361)
Diffstat (limited to 'quantum/led_matrix.h')
-rw-r--r-- | quantum/led_matrix.h | 32 |
1 files changed, 26 insertions, 6 deletions
diff --git a/quantum/led_matrix.h b/quantum/led_matrix.h index e4322a150..fd7ef7d29 100644 --- a/quantum/led_matrix.h +++ b/quantum/led_matrix.h | |||
@@ -28,6 +28,14 @@ | |||
28 | # include "is31fl3731-simple.h" | 28 | # include "is31fl3731-simple.h" |
29 | #endif | 29 | #endif |
30 | 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 | ||
37 | #endif | ||
38 | |||
31 | enum led_matrix_effects { | 39 | enum led_matrix_effects { |
32 | LED_MATRIX_UNIFORM_BRIGHTNESS = 1, | 40 | LED_MATRIX_UNIFORM_BRIGHTNESS = 1, |
33 | // All new effects go above this line | 41 | // All new effects go above this line |
@@ -38,7 +46,7 @@ void led_matrix_set_index_value(int index, uint8_t value); | |||
38 | void led_matrix_set_index_value_all(uint8_t value); | 46 | void led_matrix_set_index_value_all(uint8_t value); |
39 | 47 | ||
40 | // This runs after another backlight effect and replaces | 48 | // This runs after another backlight effect and replaces |
41 | // colors already set | 49 | // values already set |
42 | void led_matrix_indicators(void); | 50 | void led_matrix_indicators(void); |
43 | void led_matrix_indicators_kb(void); | 51 | void led_matrix_indicators_kb(void); |
44 | void led_matrix_indicators_user(void); | 52 | void led_matrix_indicators_user(void); |
@@ -62,21 +70,33 @@ bool process_led_matrix(uint16_t keycode, keyrecord_t *record); | |||
62 | uint32_t led_matrix_get_tick(void); | 70 | uint32_t led_matrix_get_tick(void); |
63 | 71 | ||
64 | void led_matrix_toggle(void); | 72 | void led_matrix_toggle(void); |
73 | void led_matrix_toggle_noeeprom(void); | ||
65 | void led_matrix_enable(void); | 74 | void led_matrix_enable(void); |
66 | void led_matrix_enable_noeeprom(void); | 75 | void led_matrix_enable_noeeprom(void); |
67 | void led_matrix_disable(void); | 76 | void led_matrix_disable(void); |
68 | 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); | ||
69 | void led_matrix_step(void); | 82 | void led_matrix_step(void); |
83 | void led_matrix_step_noeeprom(void); | ||
70 | 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); | ||
71 | void led_matrix_increase_val(void); | 89 | void led_matrix_increase_val(void); |
90 | void led_matrix_increase_val_noeeprom(void); | ||
72 | 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); | ||
73 | void led_matrix_increase_speed(void); | 96 | void led_matrix_increase_speed(void); |
97 | void led_matrix_increase_speed_noeeprom(void); | ||
74 | void led_matrix_decrease_speed(void); | 98 | void led_matrix_decrease_speed(void); |
75 | void led_matrix_mode(uint8_t mode, bool eeprom_write); | 99 | void led_matrix_decrease_speed_noeeprom(void); |
76 | void led_matrix_mode_noeeprom(uint8_t mode); | ||
77 | uint8_t led_matrix_get_mode(void); | ||
78 | void led_matrix_set_value(uint8_t mode); | ||
79 | void led_matrix_set_value_noeeprom(uint8_t mode); | ||
80 | 100 | ||
81 | typedef struct { | 101 | typedef struct { |
82 | /* Perform any initialisation required for the other driver functions to work. */ | 102 | /* Perform any initialisation required for the other driver functions to work. */ |