From 8449ad385bf86a8525bdd3ddec0c0e1840ab32a8 Mon Sep 17 00:00:00 2001 From: tmk Date: Wed, 29 May 2019 23:40:35 +0900 Subject: [PATCH] lufa: Print TMK version to console --- tmk_core/common.mk | 4 ++-- tmk_core/common/command.c | 2 +- tmk_core/protocol/lufa/lufa.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tmk_core/common.mk b/tmk_core/common.mk index 06507ecf..a38ff081 100644 --- a/tmk_core/common.mk +++ b/tmk_core/common.mk @@ -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 diff --git a/tmk_core/common/command.c b/tmk_core/common/command.c index e08f91e5..54050bd9 100644 --- a/tmk_core/common/command.c +++ b/tmk_core/common/command.c @@ -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 diff --git a/tmk_core/protocol/lufa/lufa.c b/tmk_core/protocol/lufa/lufa.c index 9dadd572..32bc6981 100644 --- a/tmk_core/protocol/lufa/lufa.c +++ b/tmk_core/protocol/lufa/lufa.c @@ -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(); -- 2.46.2