diff options
Diffstat (limited to 'quantum/rgb_matrix.c')
| -rw-r--r-- | quantum/rgb_matrix.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/quantum/rgb_matrix.c b/quantum/rgb_matrix.c index 3fae9d737..91032b656 100644 --- a/quantum/rgb_matrix.c +++ b/quantum/rgb_matrix.c | |||
| @@ -440,6 +440,8 @@ void rgb_matrix_set_suspend_state(bool state) { | |||
| 440 | g_suspend_state = state; | 440 | g_suspend_state = state; |
| 441 | } | 441 | } |
| 442 | 442 | ||
| 443 | bool rgb_matrix_get_suspend_state(void) { return g_suspend_state; } | ||
| 444 | |||
| 443 | void rgb_matrix_toggle(void) { | 445 | void rgb_matrix_toggle(void) { |
| 444 | rgb_matrix_config.enable ^= 1; | 446 | rgb_matrix_config.enable ^= 1; |
| 445 | rgb_task_state = STARTING; | 447 | rgb_task_state = STARTING; |
| @@ -466,6 +468,8 @@ void rgb_matrix_disable_noeeprom(void) { | |||
| 466 | rgb_matrix_config.enable = 0; | 468 | rgb_matrix_config.enable = 0; |
| 467 | } | 469 | } |
| 468 | 470 | ||
| 471 | uint8_t rgb_matrix_is_enabled(void) { return rgb_matrix_config.enable; } | ||
| 472 | |||
| 469 | void rgb_matrix_step(void) { | 473 | void rgb_matrix_step(void) { |
| 470 | rgb_matrix_config.mode++; | 474 | rgb_matrix_config.mode++; |
| 471 | if (rgb_matrix_config.mode >= RGB_MATRIX_EFFECT_MAX) rgb_matrix_config.mode = 1; | 475 | if (rgb_matrix_config.mode >= RGB_MATRIX_EFFECT_MAX) rgb_matrix_config.mode = 1; |
| @@ -521,6 +525,8 @@ void rgb_matrix_decrease_speed(void) { | |||
| 521 | eeconfig_update_rgb_matrix(); | 525 | eeconfig_update_rgb_matrix(); |
| 522 | } | 526 | } |
| 523 | 527 | ||
| 528 | uint8_t rgb_matrix_get_speed(void) { return rgb_matrix_config.speed; } | ||
| 529 | |||
| 524 | led_flags_t rgb_matrix_get_flags(void) { return rgb_effect_params.flags; } | 530 | led_flags_t rgb_matrix_get_flags(void) { return rgb_effect_params.flags; } |
| 525 | 531 | ||
| 526 | void rgb_matrix_set_flags(led_flags_t flags) { rgb_effect_params.flags = flags; } | 532 | void rgb_matrix_set_flags(led_flags_t flags) { rgb_effect_params.flags = flags; } |
| @@ -546,3 +552,8 @@ void rgb_matrix_sethsv_noeeprom(uint16_t hue, uint8_t sat, uint8_t val) { | |||
| 546 | rgb_matrix_config.hsv.v = val; | 552 | rgb_matrix_config.hsv.v = val; |
| 547 | if (rgb_matrix_config.hsv.v > RGB_MATRIX_MAXIMUM_BRIGHTNESS) rgb_matrix_config.hsv.v = RGB_MATRIX_MAXIMUM_BRIGHTNESS; | 553 | if (rgb_matrix_config.hsv.v > RGB_MATRIX_MAXIMUM_BRIGHTNESS) rgb_matrix_config.hsv.v = RGB_MATRIX_MAXIMUM_BRIGHTNESS; |
| 548 | } | 554 | } |
| 555 | |||
| 556 | HSV rgb_matrix_get_hsv(void) { return rgb_matrix_config.hsv; } | ||
| 557 | uint8_t rgb_matrix_get_hue(void) { return rgb_matrix_config.hsv.h; } | ||
| 558 | uint8_t rgb_matrix_get_sat(void) { return rgb_matrix_config.hsv.s; } | ||
| 559 | uint8_t rgb_matrix_get_val(void) { return rgb_matrix_config.hsv.v; } | ||
