Skip to content

Commit

Permalink
Merge pull request qmk#972 from mechkeys/rgb_compat
Browse files Browse the repository at this point in the history
Add extern for 'led' global, set 'weak' attribute for rgblight_set()
  • Loading branch information
jackhumbert authored Dec 30, 2016
2 parents 223cffd + b8e74c3 commit 8a76075
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions quantum/rgblight.c
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,7 @@ void rgblight_setrgb(uint8_t r, uint8_t g, uint8_t b) {
rgblight_set();
}

__attribute__ ((weak))
void rgblight_set(void) {
if (rgblight_config.enable) {
#ifdef RGBW
Expand Down
2 changes: 2 additions & 0 deletions quantum/rgblight.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@
#include "eeconfig.h"
#include "light_ws2812.h"

extern LED_TYPE led[RGBLED_NUM];

extern const uint8_t RGBLED_BREATHING_INTERVALS[4] PROGMEM;
extern const uint8_t RGBLED_RAINBOW_MOOD_INTERVALS[3] PROGMEM;
extern const uint8_t RGBLED_RAINBOW_SWIRL_INTERVALS[3] PROGMEM;
Expand Down

0 comments on commit 8a76075

Please sign in to comment.