version info also for client, still cmake to do

This commit is contained in:
Philippe Teuwen 2020-05-20 15:53:47 +02:00
commit ef586c2a41
12 changed files with 69 additions and 53 deletions

View file

@ -36,6 +36,16 @@
#define PACKED __attribute__((packed))
#define VERSION_INFORMATION_MAGIC 0x56334d50 // "PM3V"
struct version_information {
int magic; /* Magic sequence to identify this as a correct version information structure. Must be VERSION_INFORMATION_MAGIC */
char versionversion; /* Must be 1 */
char present; /* 1 if the version information could be created at compile time, otherwise 0 and the remaining fields (except for magic) are empty */
char clean; /* 1: Tree was clean, no local changes. 0: Tree was unclean. 2: Couldn't be determined */
char gitversion[50]; /* String with the git revision */
char buildtime[30]; /* string with the build time */
} PACKED;
// debug
#define DBG_NONE 0 // no messages
#define DBG_ERROR 1 // errors only

View file

@ -115,15 +115,7 @@
//NVDD goes LOW when USB is attached.
#define USB_ATTACHED() !((AT91C_BASE_PIOA->PIO_PDSR & GPIO_NVDD_ON) == GPIO_NVDD_ON)
#define VERSION_INFORMATION_MAGIC 0x56334d50 // "PM3V"
struct version_information {
int magic; /* Magic sequence to identify this as a correct version information structure. Must be VERSION_INFORMATION_MAGIC */
char versionversion; /* Must be 1 */
char present; /* 1 if the version information could be created at compile time, otherwise 0 and the remaining fields (except for magic) are empty */
char clean; /* 1: Tree was clean, no local changes. 0: Tree was unclean. 2: Couldn't be determined */
char gitversion[50]; /* String with the git revision */
char buildtime[30]; /* string with the build time */
} PACKED;
// VERSION_INFORMATION is now in common.h
#define COMMON_AREA_MAGIC 0x43334d50 // "PM3C"
#define COMMON_AREA_COMMAND_NONE 0