Fix Terminal feature on ChibiOS
authorDrashna Jaelre <drashna@live.com>
Wed, 31 Oct 2018 01:00:43 +0000 (18:00 -0700)
committerJack Humbert <jack.humb@gmail.com>
Tue, 6 Nov 2018 05:40:02 +0000 (00:40 -0500)
common_features.mk
tmk_core/common.mk
tmk_core/common/print.h

index f44dfc4..8f53a82 100644 (file)
@@ -213,6 +213,7 @@ endif
 ifeq ($(strip $(TERMINAL_ENABLE)), yes)
     SRC += $(QUANTUM_DIR)/process_keycode/process_terminal.c
     OPT_DEFS += -DTERMINAL_ENABLE
+    OPT_DEFS += -DUSER_PRINT
 endif
 
 ifeq ($(strip $(USB_HID_ENABLE)), yes)
index 3844b13..65dcf96 100644 (file)
@@ -43,9 +43,11 @@ ifeq ($(PLATFORM),CHIBIOS)
     TMK_COMMON_DEFS += -DSTM32_EEPROM_ENABLE
   else
     TMK_COMMON_SRC += $(PLATFORM_COMMON_DIR)/eeprom_teensy.c
-endif
+  endif
   ifeq ($(strip $(AUTO_SHIFT_ENABLE)), yes)
     TMK_COMMON_SRC += $(CHIBIOS)/os/various/syscalls.c
+  else ifeq($(strip $(TERMINAL_ENABLE)), yes)
+    TMK_COMMON_SRC += $(CHIBIOS)/os/various/syscalls.c
   endif
 endif
 
index d945276..06c6cbd 100644 (file)
@@ -73,7 +73,9 @@ void print_set_sendchar(int8_t (*print_sendchar_func)(uint8_t));
 
 #elif defined(PROTOCOL_CHIBIOS) /* PROTOCOL_CHIBIOS */
 
+#ifndef TERMINAL_ENABLE
 #  include "chibios/printf.h"
+#endif
 
 #  ifdef USER_PRINT /* USER_PRINT */