]> git.donarmstrong.com Git - tmk_firmware.git/commitdiff
Add COMMAND_ENABLE build option
authortmk <nobody@nowhere>
Tue, 19 Mar 2013 07:05:53 +0000 (16:05 +0900)
committertmk <nobody@nowhere>
Tue, 19 Mar 2013 07:05:53 +0000 (16:05 +0900)
common.mk
common/command.h
keyboard/gh60/Makefile.lufa

index 2ce4e32da50a48d6e5bab4ddc88a384e67905841..e4c9fb26954cf6bb30cb9d342923b5ea2a93b575 100644 (file)
--- a/common.mk
+++ b/common.mk
@@ -5,7 +5,6 @@ SRC +=  $(COMMON_DIR)/host.c \
        $(COMMON_DIR)/action_macro.c \
        $(COMMON_DIR)/layer_switch.c \
        $(COMMON_DIR)/keymap.c \
-       $(COMMON_DIR)/command.c \
        $(COMMON_DIR)/timer.c \
        $(COMMON_DIR)/print.c \
        $(COMMON_DIR)/debug.c \
@@ -36,6 +35,11 @@ else
     OPT_DEFS += -DNO_DEBUG
 endif
 
+ifdef COMMAND_ENABLE
+    SRC += $(COMMON_DIR)/command.c
+    OPT_DEFS += -DCOMMAND_ENABLE
+endif
+
 ifdef NKRO_ENABLE
     OPT_DEFS += -DNKRO_ENABLE
 endif
index dafd4d0f38c0e68de555b08e90fc60d8e7af5ae3..be739fafe822d17b3ceda61048df010f6cfd44d1 100644 (file)
@@ -18,8 +18,12 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #ifndef COMMAND_H
 #define COMMAND
 
+#ifdef COMMAND_ENABLE
 bool command_proc(uint8_t code);
 /* This allows to extend commands. Return 0 when command is not processed. */
 bool command_extra(uint8_t code);
+#else
+#define command_proc(code)      false
+#endif
 
 #endif
index 8042ff3f49610462ae0347375061a90ae551bcc7..f740dea848919bc74d3923231803822c4837c7a5 100644 (file)
@@ -103,6 +103,7 @@ BOOTMAGIC_ENABLE = yes      # Virtual DIP switch configuration(+1000)
 MOUSEKEY_ENABLE = yes  # Mouse keys(+4700)
 EXTRAKEY_ENABLE = yes  # Audio control and System control(+450)
 CONSOLE_ENABLE = yes   # Console for debug(+400)
+COMMAND_ENABLE = yes    # Magic command
 SLEEP_LED_ENABLE = yes  # Breathing sleep LED during USB suspend
 #NKRO_ENABLE = yes     # USB Nkey Rollover - not yet supported in LUFA
 #PS2_MOUSE_ENABLE = yes        # PS/2 mouse(TrackPoint) support