Rename RGB/HSV structs: keyboard-level code (#24476)
This commit is contained in:
parent
5478051d74
commit
9884e4982b
43 changed files with 215 additions and 215 deletions
|
@ -46,7 +46,7 @@ static bool active_keys(effect_params_t* params) {
|
|||
|
||||
RGB_MATRIX_USE_LIMITS(led_min, led_max);
|
||||
uint8_t layer = get_highest_layer(layer_state);
|
||||
RGB rgb = hsv_to_rgb(rgb_matrix_config.hsv);
|
||||
rgb_t rgb = hsv_to_rgb(rgb_matrix_config.hsv);
|
||||
|
||||
for (uint8_t i = led_min; i < led_max; i++) {
|
||||
RGB_MATRIX_TEST_LED_FLAGS();
|
||||
|
@ -69,7 +69,7 @@ static bool active_keys(effect_params_t* params) {
|
|||
return led_max < RGB_MATRIX_LED_COUNT;
|
||||
}
|
||||
|
||||
RGB raw_rgb_data[RGB_MATRIX_LED_COUNT] = {0};
|
||||
rgb_t raw_rgb_data[RGB_MATRIX_LED_COUNT] = {0};
|
||||
|
||||
static uint8_t normalize_component(uint8_t component) {
|
||||
uint16_t x = (uint16_t)component;
|
||||
|
@ -78,9 +78,9 @@ static uint8_t normalize_component(uint8_t component) {
|
|||
return (uint8_t)x;
|
||||
}
|
||||
|
||||
static RGB normalize_index(uint8_t i) {
|
||||
RGB raw = raw_rgb_data[i];
|
||||
RGB rgb = {
|
||||
static rgb_t normalize_index(uint8_t i) {
|
||||
rgb_t raw = raw_rgb_data[i];
|
||||
rgb_t rgb = {
|
||||
.r = normalize_component(raw.r),
|
||||
.g = normalize_component(raw.g),
|
||||
.b = normalize_component(raw.b),
|
||||
|
@ -92,7 +92,7 @@ static bool raw_rgb(effect_params_t* params) {
|
|||
RGB_MATRIX_USE_LIMITS(led_min, led_max);
|
||||
for (uint8_t i = led_min; i < led_max; i++) {
|
||||
RGB_MATRIX_TEST_LED_FLAGS();
|
||||
RGB rgb = normalize_index(i);
|
||||
rgb_t rgb = normalize_index(i);
|
||||
rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
|
||||
}
|
||||
return led_max < RGB_MATRIX_LED_COUNT;
|
||||
|
@ -137,7 +137,7 @@ static bool unlocked(effect_params_t* params) {
|
|||
for (uint8_t i = led_min; i < led_max; i++) {
|
||||
RGB_MATRIX_TEST_LED_FLAGS();
|
||||
|
||||
HSV hsv = {
|
||||
hsv_t hsv = {
|
||||
.h = i + unlocked_ticks,
|
||||
.s = 0xFF,
|
||||
.v = 0x70,
|
||||
|
@ -149,7 +149,7 @@ static bool unlocked(effect_params_t* params) {
|
|||
}
|
||||
}
|
||||
|
||||
RGB rgb = hsv_to_rgb(hsv);
|
||||
rgb_t rgb = hsv_to_rgb(hsv);
|
||||
rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
|
||||
}
|
||||
return led_max < RGB_MATRIX_LED_COUNT;
|
||||
|
|
|
@ -135,7 +135,7 @@ static enum rgb_matrix_effects mode_map[] = {
|
|||
|
||||
_Static_assert(sizeof(mode_map) == MODE_LAST, "mode_map_length");
|
||||
|
||||
RGB raw_rgb_data[RGB_MATRIX_LED_COUNT];
|
||||
rgb_t raw_rgb_data[RGB_MATRIX_LED_COUNT];
|
||||
|
||||
// clang-format off
|
||||
rgb_config_t layer_rgb[DYNAMIC_KEYMAP_LAYER_COUNT] = {
|
||||
|
@ -322,7 +322,7 @@ void raw_hid_receive(uint8_t *data, uint8_t length) {
|
|||
if (!bootloader_unlocked) {
|
||||
uint8_t index = data[2];
|
||||
|
||||
RGB rgb = {
|
||||
rgb_t rgb = {
|
||||
.r = data[3],
|
||||
.g = data[4],
|
||||
.b = data[5],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue