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

RGBLight/Backlight: add prefixed driver defines #22089

Merged
merged 3 commits into from
Sep 21, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
4 changes: 3 additions & 1 deletion builddefs/common_features.mk
Original file line number Diff line number Diff line change
Expand Up @@ -335,15 +335,17 @@ ifeq ($(strip $(RGBLIGHT_ENABLE)), yes)
endif

fauxpark marked this conversation as resolved.
Show resolved Hide resolved
ifeq ($(strip $(RGBLIGHT_DRIVER)), ws2812)
OPT_DEFS += -DRGBLIGHT_WS2812
WS2812_DRIVER_REQUIRED := yes
endif

ifeq ($(strip $(RGBLIGHT_DRIVER)), apa102)
OPT_DEFS += -DRGBLIGHT_APA102
APA102_DRIVER_REQUIRED := yes
endif

ifeq ($(strip $(RGBLIGHT_DRIVER)), custom)
OPT_DEFS += -DRGBLIGHT_CUSTOM_DRIVER
OPT_DEFS += -DRGBLIGHT_CUSTOM
endif
endif

Expand Down
2 changes: 1 addition & 1 deletion keyboards/mxss/rgblight.c
Original file line number Diff line number Diff line change
Expand Up @@ -739,7 +739,7 @@ void rgblight_unblink_layers(void) {

__attribute__((weak)) void rgblight_call_driver(rgb_led_t *start_led, uint8_t num_leds) { ws2812_setleds(start_led, num_leds); }

#ifndef RGBLIGHT_CUSTOM_DRIVER
#ifndef RGBLIGHT_CUSTOM
void rgblight_set(void) {
rgb_led_t *start_led;
uint8_t num_leds = rgblight_ranges.clipping_num_leds;
Expand Down
2 changes: 1 addition & 1 deletion quantum/rgb_matrix/rgb_matrix_drivers.c
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ const rgb_matrix_driver_t rgb_matrix_driver = {
};

#elif defined(WS2812)
# if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_CUSTOM_DRIVER)
# if defined(RGBLIGHT_WS2812)
# pragma message "Cannot use RGBLIGHT and RGB Matrix using WS2812 at the same time."
# pragma message "You need to use a custom driver, or re-implement the WS2812 driver to use a different configuration."
# endif
Expand Down
2 changes: 1 addition & 1 deletion quantum/rgblight/rgblight.c
Original file line number Diff line number Diff line change
Expand Up @@ -901,7 +901,7 @@ __attribute__((weak)) void rgblight_call_driver(rgb_led_t *start_led, uint8_t nu
ws2812_setleds(start_led, num_leds);
}

#ifndef RGBLIGHT_CUSTOM_DRIVER
#ifndef RGBLIGHT_CUSTOM

void rgblight_set(void) {
rgb_led_t *start_led;
Expand Down