]> git.friedersdorff.com Git - max/tmk_keyboard.git/commitdiff
lufa: Print TMK version to console
authortmk <hasu@tmk-kbd.com>
Wed, 29 May 2019 14:40:35 +0000 (23:40 +0900)
committertmk <hasu@tmk-kbd.com>
Wed, 29 May 2019 14:42:56 +0000 (23:42 +0900)
tmk_core/common.mk
tmk_core/common/command.c
tmk_core/protocol/lufa/lufa.c

index 06507ecf2d0474cd4509eecb24fccc853f6e368a..a38ff081ddd6937a3b94a7f27a5d16d0d0c4164e 100644 (file)
@@ -99,8 +99,8 @@ ifeq (yes,$(strip $(KEYMAP_SECTION_ENABLE)))
 endif
 
 # Version string
-VERSION := $(shell (git describe --always --dirty || echo 'unknown') 2> /dev/null)
-OPT_DEFS += -DVERSION=$(VERSION)
+TMK_VERSION := $(shell (git describe --always --dirty=+ || echo 'unknown') 2> /dev/null)
+OPT_DEFS += -DTMK_VERSION=$(TMK_VERSION)
 
 
 # Search Path
index e08f91e51376ebd0fe26cd67716acce2b5ae2381..54050bd950bb83113b00069a98aa7f04167d0cac 100644 (file)
@@ -284,7 +284,7 @@ static bool command_common(uint8_t code)
             print("VID: " STR(VENDOR_ID) "(" STR(MANUFACTURER) ") "
                   "PID: " STR(PRODUCT_ID) "(" STR(PRODUCT) ") "
                   "VER: " STR(DEVICE_VER) "\n");
-            print("BUILD: " STR(VERSION) " (" __TIME__ " " __DATE__ ")\n");
+            print("BUILD: " STR(TMK_VERSION) " (" __TIME__ " " __DATE__ ")\n");
             /* build options */
             print("OPTIONS:"
 #ifdef PROTOCOL_PJRC
index 9dadd5728d477fa56a247055651753f2e16a71ea..32bc698109b577537ca14f1c144b99232ee2ccef 100644 (file)
@@ -642,7 +642,7 @@ int main(void)
     print_set_sendchar(sendchar);
     host_set_driver(&lufa_driver);
 
-    print("\n\nKeyboard init.\n");
+    print("\n\nTMK:" STR(TMK_VERSION) "/LUFA\n\n");
     hook_early_init();
     keyboard_setup();
     setup_usb();