M5UnitUnified 0.6.3 git rev:e38fc73
Loading...
Searching...
No Matches
m5_unit_unified_version.hpp File Reference

Version of M5UnitUnified, to test at compile time (as ESP_IDF_VERSION) More...

Go to the source code of this file.

Macros

#define M5_UNIT_UNIFIED_VERSION_MAJOR   0
 
#define M5_UNIT_UNIFIED_VERSION_MINOR   6
 
#define M5_UNIT_UNIFIED_VERSION_PATCH   3
 
#define M5_UNIT_UNIFIED_VERSION_VAL(major, minor, patch)   (((major) << 16) | ((minor) << 8) | (patch))
 Make a version value comparable with M5_UNIT_UNIFIED_VERSION.
 
#define M5_UNIT_UNIFIED_VERSION
 Current version as a comparable value.
 

Detailed Description

Version of M5UnitUnified, to test at compile time (as ESP_IDF_VERSION)

Keep the values the same as library.properties / library.json / idf_component.yml. M5UnitUnified 0.6.0 and older do not have these macros, so test that they are defined first:

#if defined(M5_UNIT_UNIFIED_VERSION)
#if M5_UNIT_UNIFIED_VERSION >= M5_UNIT_UNIFIED_VERSION_VAL(0, 6, 1)
// Use what 0.6.1 added
#endif
#endif

(The two #if are needed: in one line, an undefined M5_UNIT_UNIFIED_VERSION_VAL() is an error even after a false defined() test.)

Macro Definition Documentation

◆ M5_UNIT_UNIFIED_VERSION

#define M5_UNIT_UNIFIED_VERSION
Value:
M5_UNIT_UNIFIED_VERSION_VAL(M5_UNIT_UNIFIED_VERSION_MAJOR, M5_UNIT_UNIFIED_VERSION_MINOR, \
M5_UNIT_UNIFIED_VERSION_PATCH)
#define M5_UNIT_UNIFIED_VERSION_VAL(major, minor, patch)
Make a version value comparable with M5_UNIT_UNIFIED_VERSION.
Definition m5_unit_unified_version.hpp:29

Current version as a comparable value.