Browse Source

Fix Terminal feature on ChibiOS

Drashna Jaelre 6 years ago
parent
commit
40313cfa3b
3 changed files with 6 additions and 1 deletions
  1. 1 0
      common_features.mk
  2. 3 1
      tmk_core/common.mk
  3. 2 0
      tmk_core/common/print.h

+ 1 - 0
common_features.mk

@@ -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)

+ 3 - 1
tmk_core/common.mk

@@ -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
 

+ 2 - 0
tmk_core/common/print.h

@@ -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 */