summaryrefslogtreecommitdiffstats
path: root/tmk_core
diff options
context:
space:
mode:
Diffstat (limited to 'tmk_core')
-rw-r--r--tmk_core/common/avr/eeconfig.c5
-rw-r--r--tmk_core/common/command.c3
-rw-r--r--tmk_core/common/command.h1
-rw-r--r--tmk_core/common/eeconfig.h1
-rw-r--r--tmk_core/common/led.h3
-rw-r--r--tmk_core/protocol/lufa/bluetooth.c1
-rw-r--r--tmk_core/protocol/lufa/bluetooth.h2
-rw-r--r--tmk_core/rules.mk35
8 files changed, 38 insertions, 13 deletions
diff --git a/tmk_core/common/avr/eeconfig.c b/tmk_core/common/avr/eeconfig.c
index c5391f5cf..656938fb3 100644
--- a/tmk_core/common/avr/eeconfig.c
+++ b/tmk_core/common/avr/eeconfig.c
@@ -14,7 +14,10 @@ void eeconfig_init(void)
eeprom_update_byte(EECONFIG_BACKLIGHT, 0);
#endif
#ifdef AUDIO_ENABLE
- eeprom_update_byte(EECONFIG_AUDIO, 0xFF); // On by default
+ eeprom_update_byte(EECONFIG_AUDIO, 0xFF); // On by default
+#endif
+#ifdef RGBLIGHT_ENABLE
+ eeprom_update_dword(EECONFIG_RGBLIGHT, 0);
#endif
}
diff --git a/tmk_core/common/command.c b/tmk_core/common/command.c
index 024d7c67a..187a2b949 100644
--- a/tmk_core/common/command.c
+++ b/tmk_core/common/command.c
@@ -66,7 +66,6 @@ static bool mousekey_console(uint8_t code);
static void mousekey_console_help(void);
#endif
-static uint8_t numkey2num(uint8_t code);
static void switch_default_layer(uint8_t layer);
@@ -763,7 +762,7 @@ static bool mousekey_console(uint8_t code)
/***********************************************************
* Utilities
***********************************************************/
-static uint8_t numkey2num(uint8_t code)
+uint8_t numkey2num(uint8_t code)
{
switch (code) {
case KC_1: return 1;
diff --git a/tmk_core/common/command.h b/tmk_core/common/command.h
index 92b18849b..a729e4b1e 100644
--- a/tmk_core/common/command.h
+++ b/tmk_core/common/command.h
@@ -27,6 +27,7 @@ bool command_extra(uint8_t code);
bool command_console_extra(uint8_t code);
#ifdef COMMAND_ENABLE
+uint8_t numkey2num(uint8_t code);
bool command_proc(uint8_t code);
#else
#define command_proc(code) false
diff --git a/tmk_core/common/eeconfig.h b/tmk_core/common/eeconfig.h
index ca47e0d2f..d8caa346f 100644
--- a/tmk_core/common/eeconfig.h
+++ b/tmk_core/common/eeconfig.h
@@ -32,6 +32,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define EECONFIG_MOUSEKEY_ACCEL (uint8_t *)5
#define EECONFIG_BACKLIGHT (uint8_t *)6
#define EECONFIG_AUDIO (uint8_t *)7
+#define EECONFIG_RGBLIGHT (uint32_t *)8
/* debug bit */
diff --git a/tmk_core/common/led.h b/tmk_core/common/led.h
index 2e18dc2af..9dc898780 100644
--- a/tmk_core/common/led.h
+++ b/tmk_core/common/led.h
@@ -37,6 +37,9 @@ void led_set(uint8_t usb_led);
/* keyboard-specific LED functionality */
void led_set_kb(uint8_t usb_led);
+
+void led_init_ports(void);
+
#ifdef __cplusplus
}
#endif
diff --git a/tmk_core/protocol/lufa/bluetooth.c b/tmk_core/protocol/lufa/bluetooth.c
index ed66e52c1..549606162 100644
--- a/tmk_core/protocol/lufa/bluetooth.c
+++ b/tmk_core/protocol/lufa/bluetooth.c
@@ -19,7 +19,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "report.h"
#include "print.h"
#include "debug.h"
-#include "../serial.h"
#include "bluetooth.h"
void bluefruit_keyboard_print_report(report_keyboard_t *report)
diff --git a/tmk_core/protocol/lufa/bluetooth.h b/tmk_core/protocol/lufa/bluetooth.h
index 01f07e8e6..78ece1cd0 100644
--- a/tmk_core/protocol/lufa/bluetooth.h
+++ b/tmk_core/protocol/lufa/bluetooth.h
@@ -18,6 +18,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#ifndef BLUETOOTH_H
#define BLUETOOTH_H
+#include "../serial.h"
+
void bluefruit_serial_send(uint8_t data);
/*
diff --git a/tmk_core/rules.mk b/tmk_core/rules.mk
index d9a0fd33f..e9ef5ca7b 100644
--- a/tmk_core/rules.mk
+++ b/tmk_core/rules.mk
@@ -632,17 +632,34 @@ all-keyboards-defaults-%:
all-keyboards-defaults: all-keyboards-defaults-all
KEYBOARDS := $(SUBDIRS:$(TOP_DIR)/keyboard/%/=/keyboard/%)
-all-keyboards-%: $(KEYBOARDS)
-/keyboard/%:
- $(eval KEYBOARD=$(patsubst /keyboard/%,%,$@))
- $(eval KEYMAPS=$(notdir $(patsubst %/.,%,$(wildcard $(TOP_DIR)$@/keymaps/*/.))))
- @for x in $(KEYMAPS) ; do \
- printf "Compiling $(BOLD)$(KEYBOARD)$(NO_COLOR) with $(BOLD)$$x$(NO_COLOR)" | $(AWK) '{ printf "%-88s", $$0; }'; \
- LOG=$$($(MAKE) -C $(TOP_DIR)$@ $(subst all-keyboards-,,$@) keymap=$$x VERBOSE=$(VERBOSE) COLOR=$(COLOR) SILENT=true 2>&1) ; if [ $$? -gt 0 ]; then $(PRINT_ERROR_PLAIN); elif [ "$$LOG" != "" ] ; then $(PRINT_WARNING_PLAIN); else $(PRINT_OK); fi; \
- done
-
+all-keyboards-all: $(addsuffix -all,$(KEYBOARDS))
+all-keyboards-quick: $(addsuffix -quick,$(KEYBOARDS))
+all-keyboards-clean: $(addsuffix -clean,$(KEYBOARDS))
all-keyboards: all-keyboards-all
+define make_keyboard
+$(eval KEYBOARD=$(patsubst /keyboard/%,%,$1))
+$(eval KEYMAPS=$(notdir $(patsubst %/.,%,$(wildcard $(TOP_DIR)$1/keymaps/*/.))))
+@for x in $(KEYMAPS) ; do \
+ printf "Compiling $(BOLD)$(KEYBOARD)$(NO_COLOR) with $(BOLD)$$x$(NO_COLOR)" | $(AWK) '{ printf "%-88s", $$0; }'; \
+ LOG=$$($(MAKE) -C $(TOP_DIR)$1 $2 keymap=$$x VERBOSE=$(VERBOSE) COLOR=$(COLOR) SILENT=true 2>&1) ; if [ $$? -gt 0 ]; then $(PRINT_ERROR_PLAIN); elif [ "$$LOG" != "" ] ; then $(PRINT_WARNING_PLAIN); else $(PRINT_OK); fi; \
+done
+endef
+
+define make_keyboard_helper
+# Just remove the -quick, -all and so on from the first argument and pass it forward
+$(call make_keyboard,$(subst -$2,,$1),$2)
+endef
+
+/keyboard/%-quick:
+ $(call make_keyboard_helper,$@,quick)
+/keyboard/%-all:
+ $(call make_keyboard_helper,$@,all)
+/keyboard/%-clean:
+ $(call make_keyboard_helper,$@,clean)
+/keyboard/%:
+ $(call make_keyboard_helper,$@,all)
+
all-keymaps-%:
$(eval MAKECONFIG=$(call get_target,all-keymaps,$@))
$(eval KEYMAPS=$(notdir $(patsubst %/.,%,$(wildcard $(TOP_DIR)/keyboard/$(KEYBOARD)/keymaps/*/.))))