mbed library sources. Supersedes mbed-src.
Dependents: Nucleo_Hello_Encoder BLE_iBeaconScan AM1805_DEMO DISCO-F429ZI_ExportTemplate1 ... more
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 /** MBED_MAJOR_VERSION 00029 * Mbed OS major version 00030 * 00031 * @note 99 is default value for development version (master branch) 00032 */ 00033 #define MBED_MAJOR_VERSION 5 00034 00035 /** MBED_MINOR_VERSION 00036 * Mbed OS minor version 00037 * 00038 * @note 99 is default value for development version (master branch) 00039 */ 00040 #define MBED_MINOR_VERSION 11 00041 00042 /** MBED_PATCH_VERSION 00043 * Mbed OS patch version 00044 * 00045 * @note 99 is default value for development version (master branch) 00046 */ 00047 #define MBED_PATCH_VERSION 5 00048 00049 #define MBED_ENCODE_VERSION(major, minor, patch) ((major)*10000 + (minor)*100 + (patch)) 00050 00051 /** MBED_VERSION 00052 * Mbed OS 5 version (MMmmpp - M(Major); m(minor); p(patch)) 00053 * 00054 * @note 999999 is default value for development version (master branch) 00055 */ 00056 #define MBED_VERSION MBED_ENCODE_VERSION(MBED_MAJOR_VERSION, MBED_MINOR_VERSION, MBED_PATCH_VERSION) 00057 00058 /** MBED_VERSION_CHECK 00059 * Macro can be used to check minimum Mbed OS version required for feature/library. If current version 00060 * is less than required, it will assert. 00061 * 00062 * @note: Version of master branch will be 999999 as default, hence no assert/warning is provided for 00063 * master branch code 00064 */ 00065 #define MBED_VERSION_CHECK(major, minor, patch) do { \ 00066 MBED_STATIC_ASSERT((MBED_VERSION >= MBED_ENCODE_VERSION((major),(minor),(patch))), "Incompatible mbed-os version detected!!"); \ 00067 } while(0) 00068 00069 #endif 00070 00071 /** @}*/ 00072 /** @}*/
Generated on Tue Jul 12 2022 20:41:15 by 1.7.2