feat(underglow): Convert HSB changes to absolute.
* Public type for HSB led color. * New API for calculating "next" HSB based on current state. * Update behavior to convert the increment/decrement commands to absolute command as well.
This commit is contained in:
parent
e6f168d6df
commit
2af794eed3
4 changed files with 132 additions and 87 deletions
|
|
@ -6,13 +6,22 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
struct zmk_led_hsb {
|
||||
uint16_t h;
|
||||
uint8_t s;
|
||||
uint8_t b;
|
||||
};
|
||||
|
||||
int zmk_rgb_underglow_toggle();
|
||||
int zmk_rgb_underglow_get_state(bool *state);
|
||||
int zmk_rgb_underglow_on();
|
||||
int zmk_rgb_underglow_off();
|
||||
int zmk_rgb_underglow_cycle_effect(int direction);
|
||||
struct zmk_led_hsb zmk_rgb_underglow_calc_hue(int direction);
|
||||
struct zmk_led_hsb zmk_rgb_underglow_calc_sat(int direction);
|
||||
struct zmk_led_hsb zmk_rgb_underglow_calc_brt(int direction);
|
||||
int zmk_rgb_underglow_change_hue(int direction);
|
||||
int zmk_rgb_underglow_change_sat(int direction);
|
||||
int zmk_rgb_underglow_change_brt(int direction);
|
||||
int zmk_rgb_underglow_change_spd(int direction);
|
||||
int zmk_rgb_underglow_set_hsb(uint16_t hue, uint8_t saturation, uint8_t brightness);
|
||||
int zmk_rgb_underglow_set_hsb(struct zmk_led_hsb color);
|
||||
Loading…
Add table
Add a link
Reference in a new issue