Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setrgb(): Use arrow operator #10451

Merged
merged 1 commit into from
Sep 26, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions keyboards/mxss/rgblight.c
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,9 @@ extern LED_TYPE fleds[2];
hs_set fled_hs[2];

void copyrgb(LED_TYPE *src, LED_TYPE *dst) {
(*dst).r = (*src).r;
(*dst).g = (*src).g;
(*dst).b = (*src).b;
dst->r = src->r;
dst->g = src->g;
dst->b = src->b;
}

void rgblight_set_clipping_range(uint8_t start_pos, uint8_t num_leds) {
Expand Down Expand Up @@ -145,11 +145,11 @@ void sethsv_raw(uint8_t hue, uint8_t sat, uint8_t val, LED_TYPE *led1) {
void sethsv(uint8_t hue, uint8_t sat, uint8_t val, LED_TYPE *led1) { sethsv_raw(hue, sat, val > RGBLIGHT_LIMIT_VAL ? RGBLIGHT_LIMIT_VAL : val, led1); }

void setrgb(uint8_t r, uint8_t g, uint8_t b, LED_TYPE *led1) {
(*led1).r = r;
(*led1).g = g;
(*led1).b = b;
led1->r = r;
led1->g = g;
led1->b = b;
#ifdef RGBW
(*led1).w = 0;
led1->w = 0;
#endif
}

Expand Down
8 changes: 4 additions & 4 deletions quantum/rgblight.c
Original file line number Diff line number Diff line change
Expand Up @@ -132,11 +132,11 @@ void sethsv_raw(uint8_t hue, uint8_t sat, uint8_t val, LED_TYPE *led1) {
void sethsv(uint8_t hue, uint8_t sat, uint8_t val, LED_TYPE *led1) { sethsv_raw(hue, sat, val > RGBLIGHT_LIMIT_VAL ? RGBLIGHT_LIMIT_VAL : val, led1); }

void setrgb(uint8_t r, uint8_t g, uint8_t b, LED_TYPE *led1) {
(*led1).r = r;
(*led1).g = g;
(*led1).b = b;
led1->r = r;
led1->g = g;
led1->b = b;
#ifdef RGBW
(*led1).w = 0;
led1->w = 0;
#endif
}

Expand Down