user_version.h: use ESP_SDK* constants

Derive NODE_VERSION by concatenating string constants.
This commit is contained in:
Nathaniel Wesley Filardo 2018-03-13 19:34:42 -04:00
parent c972d86ea9
commit f3ebfa9bfe
1 changed files with 12 additions and 6 deletions

View File

@ -1,14 +1,20 @@
#ifndef __USER_VERSION_H__
#define __USER_VERSION_H__
#define NODE_VERSION_MAJOR 2U
#define NODE_VERSION_MINOR 1U
#define NODE_VERSION_REVISION 0U
#define NODE_VERSION_INTERNAL 0U
#include "version.h" /* ESP firmware header */
#define NODE_VERSION_MAJOR ESP_SDK_VERSION_MAJOR
#define NODE_VERSION_MINOR ESP_SDK_VERSION_MINOR
#define NODE_VERSION_REVISION ESP_SDK_VERSION_PATCH
#define NODE_VERSION_INTERNAL 0
#define NODE_VERSION_STR(x) #x
#define NODE_VERSION_XSTR(x) NODE_VERSION_STR(x)
#define NODE_VERSION "NodeMCU " ESP_SDK_VERSION_STRING "." NODE_VERSION_XSTR(NODE_VERSION_INTERNAL)
#define NODE_VERSION "NodeMCU 2.1.0"
#ifndef BUILD_DATE
#define BUILD_DATE "unspecified"
#define BUILD_DATE "unspecified"
#endif
extern char SDK_VERSION[];