Add versioning information to mbed OS 5.5 release branch

pull/4556/head mbed-os-5.5.0-rc1
Sam Grove 2017-06-04 12:03:26 -05:00
parent 40042f0b00
commit 92fbf2a9b3
1 changed files with 22 additions and 0 deletions

22
mbed.h
View File

@ -16,6 +16,28 @@
#ifndef MBED_H
#define MBED_H
#define MBED_LIBRARY_VERSION -1
#if MBED_CONF_RTOS_PRESENT
// RTOS present, this is valid only for mbed OS 5
#define MBED_MAJOR_VERSION 5
#define MBED_MINOR_VERSION 5
#define MBED_PATCH_VERSION -1
#else
// mbed 2
#define MBED_MAJOR_VERSION 2
#define MBED_MINOR_VERSION 0
#define MBED_PATCH_VERSION MBED_LIBRARY_VERSION
#endif
#define MBED_ENCODE_VERSION(major, minor, patch) ((major)*10000 + (minor)*100 + (patch))
#define MBED_VERSION MBED_ENCODE_VERSION(MBED_MAJOR_VERSION, MBED_MINOR_VERSION, MBED_PATCH_VERSION)
#if MBED_CONF_RTOS_PRESENT
#include "rtos/rtos.h"
#endif
#if MBED_CONF_RTOS_PRESENT
#include "rtos/rtos.h"
#endif