organize version header info

This commit is contained in:
Conor Patrick 2019-02-12 16:11:06 -05:00
parent 9957a83746
commit 020fe21546
3 changed files with 25 additions and 12 deletions

View File

@ -22,6 +22,7 @@
#ifndef _APP_H_
#define _APP_H_
#include <stdint.h>
#include "version.h"
#define DEBUG_UART USART1
@ -65,12 +66,7 @@
#define SKIP_BUTTON_CHECK_WITH_DELAY 0
#define SKIP_BUTTON_CHECK_FAST 1
#define BOOT_VERSION_MAJ 1
#define BOOT_VERSION_MIN 0
#define __STR_HELPER(x) #x
#define __STR(x) __STR_HELPER(x)
#define SOLO_PRODUCT_NAME "Solo Bootloader " __STR(BOOT_VERSION_MAJ) "." __STR(BOOT_VERSION_MIN)
#define SOLO_PRODUCT_NAME "Solo Bootloader " VERSION
void printing_init();
void hw_init(void);

View File

@ -22,6 +22,7 @@
#ifndef _APP_H_
#define _APP_H_
#include <stdint.h>
#include "version.h"
#define DEBUG_UART USART1
@ -43,15 +44,12 @@
// #define DISABLE_CTAPHID_PING
// #define DISABLE_CTAPHID_WINK
// #define DISABLE_CTAPHID_CBOR
#define SOLO_VERSION_MAJ 1
#define SOLO_VERSION_MIN 0
#define __STR_HELPER(x) #x
#define __STR(x) __STR_HELPER(x)
#if defined(SOLO_HACKER)
#define SOLO_PRODUCT_NAME "Solo Hacker " __STR(SOLO_VERSION_MAJ) "." __STR(SOLO_VERSION_MIN)
#define SOLO_PRODUCT_NAME "Solo Hacker " VERSION
#else
#define SOLO_PRODUCT_NAME "Solo " __STR(SOLO_VERSION_MAJ) "." __STR(SOLO_VERSION_MIN)
#define SOLO_PRODUCT_NAME "Solo " VERSION
#endif
void printing_init();

View File

@ -0,0 +1,19 @@
#ifndef _VERSION_H_
#define _VERSION_H_
#ifndef SOLO_VERSION_MAJ
#define SOLO_VERSION_MAJ 0
#define SOLO_VERSION_MIN 0
#define SOLO_VERSION_PATCH 0
#endif
#define __STR_HELPER(x) #x
#define __STR(x) __STR_HELPER(x)
#define VERSION __STR(SOLO_VERSION_MAJ) "." __STR(SOLO_VERSION_MIN) "." __STR(SOLO_VERSION_PATCH)
#endif