Mbed OS Reference
Loading...
Searching...
No Matches
Version macros

Macros

#define MBED_MAJOR_VERSION   6
 MBED_MAJOR_VERSION Mbed OS major version. More...
 
#define MBED_MINOR_VERSION   17
 MBED_MINOR_VERSION Mbed OS minor version. More...
 
#define MBED_PATCH_VERSION   0
 MBED_PATCH_VERSION Mbed OS patch version. More...
 
#define MBED_VERSION   MBED_ENCODE_VERSION(MBED_MAJOR_VERSION, MBED_MINOR_VERSION, MBED_PATCH_VERSION)
 MBED_VERSION Mbed OS 5 version (MMmmpp - M(Major); m(minor); p(patch)) More...
 
#define MBED_VERSION_CHECK(major, minor, patch)
 MBED_VERSION_CHECK Macro can be used to check minimum Mbed OS version required for feature/library. More...
 

Detailed Description

Macro Definition Documentation

◆ MBED_MAJOR_VERSION

#define MBED_MAJOR_VERSION   6

MBED_MAJOR_VERSION Mbed OS major version.

Note
99 is default value for development version (master branch)

Definition at line 34 of file mbed_version.h.

◆ MBED_MINOR_VERSION

#define MBED_MINOR_VERSION   17

MBED_MINOR_VERSION Mbed OS minor version.

Note
99 is default value for development version (master branch)

Definition at line 41 of file mbed_version.h.

◆ MBED_PATCH_VERSION

#define MBED_PATCH_VERSION   0

MBED_PATCH_VERSION Mbed OS patch version.

Note
99 is default value for development version (master branch)

Definition at line 48 of file mbed_version.h.

◆ MBED_VERSION

#define MBED_VERSION   MBED_ENCODE_VERSION(MBED_MAJOR_VERSION, MBED_MINOR_VERSION, MBED_PATCH_VERSION)

MBED_VERSION Mbed OS 5 version (MMmmpp - M(Major); m(minor); p(patch))

Note
999999 is default value for development version (master branch)

Definition at line 57 of file mbed_version.h.

◆ MBED_VERSION_CHECK

#define MBED_VERSION_CHECK (   major,
  minor,
  patch 
)
Value:
do { \
static_assert((MBED_VERSION >= MBED_ENCODE_VERSION((major),(minor),(patch))), "Incompatible mbed-os version detected!!"); \
} while(0)
#define MBED_VERSION
MBED_VERSION Mbed OS 5 version (MMmmpp - M(Major); m(minor); p(patch))
Definition: mbed_version.h:57

MBED_VERSION_CHECK Macro can be used to check minimum Mbed OS version required for feature/library.

If current version is less than required, it will assert.

Note
: Version of master branch will be 999999 as default, hence no assert/warning is provided for master branch code

Definition at line 66 of file mbed_version.h.