mbed library sources. Supersedes mbed-src.

Dependents:   Nucleo_Hello_Encoder BLE_iBeaconScan AM1805_DEMO DISCO-F429ZI_ExportTemplate1 ... more

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers mbed_version.h Source File

mbed_version.h

00001 
00002 /** \addtogroup platform */
00003 /** @{*/
00004 /**
00005  * \defgroup platform_version Version macros
00006  * @{
00007  */
00008 /* mbed Microcontroller Library
00009  * Copyright (c) 2018 ARM Limited
00010  * SPDX-License-Identifier: Apache-2.0
00011  *
00012  * Licensed under the Apache License, Version 2.0 (the "License");
00013  * you may not use this file except in compliance with the License.
00014  * You may obtain a copy of the License at
00015  *
00016  *     http://www.apache.org/licenses/LICENSE-2.0
00017  *
00018  * Unless required by applicable law or agreed to in writing, software
00019  * distributed under the License is distributed on an "AS IS" BASIS,
00020  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00021  * See the License for the specific language governing permissions and
00022  * limitations under the License.
00023  */
00024 
00025 #ifndef MBED_VERSION_H
00026 #define MBED_VERSION_H
00027 
00028 #define MBED_LIBRARY_VERSION 165
00029 
00030 /** MBED_MAJOR_VERSION
00031   * Mbed 2 major version
00032   */
00033 #define MBED_MAJOR_VERSION 2
00034 
00035 /** MBED_MINOR_VERSION
00036   * Mbed 2 minor version
00037   */
00038 #define MBED_MINOR_VERSION 0
00039 
00040 /** MBED_PATCH_VERSION
00041   * Mbed 2 patch version
00042   */
00043 #define MBED_PATCH_VERSION 165
00044 
00045 #define MBED_ENCODE_VERSION(major, minor, patch) ((major)*10000 + (minor)*100 + (patch))
00046 
00047 #define MBED_VERSION MBED_ENCODE_VERSION(MBED_MAJOR_VERSION, MBED_MINOR_VERSION, MBED_PATCH_VERSION)
00048 
00049 #define MBED_VERSION_CHECK(major, minor, patch) do { \
00050                                        MBED_STATIC_ASSERT((MBED_VERSION >= MBED_ENCODE_VERSION((major),(minor),(patch))), "Incompatible mbed-os version detected!!"); \
00051                                      } while(0)
00052 
00053 #endif
00054 
00055 /** @}*/
00056 /** @}*/