Skip to content

Commit

Permalink
Integrate WS2812 code into quantum core
Browse files Browse the repository at this point in the history
  • Loading branch information
yangliu committed Jan 25, 2016
1 parent 0a40654 commit ba9ac45
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 15 deletions.
8 changes: 1 addition & 7 deletions keyboard/planck/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -143,18 +143,12 @@ BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
# AUDIO_ENABLE = YES # Audio output on port C6
# UNICODE_ENABLE = YES # Unicode
# BLUETOOTH_ENABLE = yes # Enable Bluetooth with the Adafruit EZ-Key HID
RGBLIGHT_ENABLE = yes # Enable WS2812 bottom RGB light
RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with MIDI at the same time.

ifdef BACKLIGHT_ENABLE
SRC += backlight.c
endif

ifdef RGBLIGHT_ENABLE
SRC += light_ws2812.c
SRC += rgblight.c
OPT_DEFS += -DRGBLIGHT_ENABLE
endif


# Optimize size but this may cause error "relocation truncated to fit"
#EXTRALDFLAGS = -Wl,--relax
Expand Down
6 changes: 0 additions & 6 deletions keyboard/planck/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define ws2812_DDRREG DDRD
#define ws2812_pin PD1
#define RGBLED_NUM 28 // Number of LEDs
#ifndef RGBLIGHT_HUE_STEP
#define RGBLIGHT_HUE_STEP 10
#endif
#ifndef RGBLIGHT_SAT_STEP
#define RGBLIGHT_SAT_STEP 17
#endif
#ifndef RGBLIGHT_VAL_STEP
#define RGBLIGHT_VAL_STEP 17
#endif

/*
* Feature disable options
Expand Down
File renamed without changes.
File renamed without changes.
9 changes: 7 additions & 2 deletions quantum/quantum.mk
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ QUANTUM_DIR = quantum

# # project specific files
SRC += $(QUANTUM_DIR)/keymap_common.c \
$(QUANTUM_DIR)/led.c
$(QUANTUM_DIR)/led.c

# ifdef KEYMAP_FILE
# ifneq (,$(shell grep USING_MIDI '$(KEYMAP_FILE)'))
Expand Down Expand Up @@ -35,6 +35,12 @@ ifdef UNICODE_ENABLE
SRC += $(QUANTUM_DIR)/keymap_unicode.c
endif

ifdef RGBLIGHT_ENABLE
SRC += $(QUANTUM_DIR)/light_ws2812.c
SRC += $(QUANTUM_DIR)/rgblight.c
OPT_DEFS += -DRGBLIGHT_ENABLE
endif

# Optimize size but this may cause error "relocation truncated to fit"
#EXTRALDFLAGS = -Wl,--relax

Expand All @@ -45,4 +51,3 @@ include $(TMK_DIR)/protocol/lufa.mk

include $(TMK_DIR)/common.mk
include $(TMK_DIR)/rules.mk

File renamed without changes.
File renamed without changes.

0 comments on commit ba9ac45

Please sign in to comment.