platform/mbed_version.h@0:06036f8bee2d, 2022-10-24 (annotated)
- Committer:
- ganlikun
- Date:
- Mon Oct 24 15:19:39 2022 +0000
- Revision:
- 0:06036f8bee2d
11
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
ganlikun | 0:06036f8bee2d | 1 | |
ganlikun | 0:06036f8bee2d | 2 | /** \addtogroup platform */ |
ganlikun | 0:06036f8bee2d | 3 | /** @{*/ |
ganlikun | 0:06036f8bee2d | 4 | /** |
ganlikun | 0:06036f8bee2d | 5 | * \defgroup platform_version Version macros |
ganlikun | 0:06036f8bee2d | 6 | * @{ |
ganlikun | 0:06036f8bee2d | 7 | */ |
ganlikun | 0:06036f8bee2d | 8 | /* mbed Microcontroller Library |
ganlikun | 0:06036f8bee2d | 9 | * Copyright (c) 2018 ARM Limited |
ganlikun | 0:06036f8bee2d | 10 | * SPDX-License-Identifier: Apache-2.0 |
ganlikun | 0:06036f8bee2d | 11 | * |
ganlikun | 0:06036f8bee2d | 12 | * Licensed under the Apache License, Version 2.0 (the "License"); |
ganlikun | 0:06036f8bee2d | 13 | * you may not use this file except in compliance with the License. |
ganlikun | 0:06036f8bee2d | 14 | * You may obtain a copy of the License at |
ganlikun | 0:06036f8bee2d | 15 | * |
ganlikun | 0:06036f8bee2d | 16 | * http://www.apache.org/licenses/LICENSE-2.0 |
ganlikun | 0:06036f8bee2d | 17 | * |
ganlikun | 0:06036f8bee2d | 18 | * Unless required by applicable law or agreed to in writing, software |
ganlikun | 0:06036f8bee2d | 19 | * distributed under the License is distributed on an "AS IS" BASIS, |
ganlikun | 0:06036f8bee2d | 20 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
ganlikun | 0:06036f8bee2d | 21 | * See the License for the specific language governing permissions and |
ganlikun | 0:06036f8bee2d | 22 | * limitations under the License. |
ganlikun | 0:06036f8bee2d | 23 | */ |
ganlikun | 0:06036f8bee2d | 24 | |
ganlikun | 0:06036f8bee2d | 25 | #ifndef MBED_VERSION_H |
ganlikun | 0:06036f8bee2d | 26 | #define MBED_VERSION_H |
ganlikun | 0:06036f8bee2d | 27 | |
ganlikun | 0:06036f8bee2d | 28 | #define MBED_LIBRARY_VERSION 165 |
ganlikun | 0:06036f8bee2d | 29 | |
ganlikun | 0:06036f8bee2d | 30 | /** MBED_MAJOR_VERSION |
ganlikun | 0:06036f8bee2d | 31 | * Mbed 2 major version |
ganlikun | 0:06036f8bee2d | 32 | */ |
ganlikun | 0:06036f8bee2d | 33 | #define MBED_MAJOR_VERSION 2 |
ganlikun | 0:06036f8bee2d | 34 | |
ganlikun | 0:06036f8bee2d | 35 | /** MBED_MINOR_VERSION |
ganlikun | 0:06036f8bee2d | 36 | * Mbed 2 minor version |
ganlikun | 0:06036f8bee2d | 37 | */ |
ganlikun | 0:06036f8bee2d | 38 | #define MBED_MINOR_VERSION 0 |
ganlikun | 0:06036f8bee2d | 39 | |
ganlikun | 0:06036f8bee2d | 40 | /** MBED_PATCH_VERSION |
ganlikun | 0:06036f8bee2d | 41 | * Mbed 2 patch version |
ganlikun | 0:06036f8bee2d | 42 | */ |
ganlikun | 0:06036f8bee2d | 43 | #define MBED_PATCH_VERSION 165 |
ganlikun | 0:06036f8bee2d | 44 | |
ganlikun | 0:06036f8bee2d | 45 | #define MBED_ENCODE_VERSION(major, minor, patch) ((major)*10000 + (minor)*100 + (patch)) |
ganlikun | 0:06036f8bee2d | 46 | |
ganlikun | 0:06036f8bee2d | 47 | #define MBED_VERSION MBED_ENCODE_VERSION(MBED_MAJOR_VERSION, MBED_MINOR_VERSION, MBED_PATCH_VERSION) |
ganlikun | 0:06036f8bee2d | 48 | |
ganlikun | 0:06036f8bee2d | 49 | #define MBED_VERSION_CHECK(major, minor, patch) do { \ |
ganlikun | 0:06036f8bee2d | 50 | MBED_STATIC_ASSERT((MBED_VERSION >= MBED_ENCODE_VERSION((major),(minor),(patch))), "Incompatible mbed-os version detected!!"); \ |
ganlikun | 0:06036f8bee2d | 51 | } while(0) |
ganlikun | 0:06036f8bee2d | 52 | |
ganlikun | 0:06036f8bee2d | 53 | #endif |
ganlikun | 0:06036f8bee2d | 54 | |
ganlikun | 0:06036f8bee2d | 55 | /** @}*/ |
ganlikun | 0:06036f8bee2d | 56 | /** @}*/ |