Marco Zecchini
/
Example_RTOS
Rtos API example
Embed:
(wiki syntax)
Show/hide line numbers
version.h
Go to the documentation of this file.
00001 /** 00002 * \file version.h 00003 * 00004 * \brief Run-time version information 00005 * 00006 * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved 00007 * SPDX-License-Identifier: Apache-2.0 00008 * 00009 * Licensed under the Apache License, Version 2.0 (the "License"); you may 00010 * not use this file except in compliance with the License. 00011 * You may obtain a copy of the License at 00012 * 00013 * http://www.apache.org/licenses/LICENSE-2.0 00014 * 00015 * Unless required by applicable law or agreed to in writing, software 00016 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 00017 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00018 * See the License for the specific language governing permissions and 00019 * limitations under the License. 00020 * 00021 * This file is part of mbed TLS (https://tls.mbed.org) 00022 */ 00023 /* 00024 * This set of compile-time defines and run-time variables can be used to 00025 * determine the version number of the mbed TLS library used. 00026 */ 00027 #ifndef MBEDTLS_VERSION_H 00028 #define MBEDTLS_VERSION_H 00029 00030 #if !defined(MBEDTLS_CONFIG_FILE) 00031 #include "config.h" 00032 #else 00033 #include MBEDTLS_CONFIG_FILE 00034 #endif 00035 00036 /** 00037 * The version number x.y.z is split into three parts. 00038 * Major, Minor, Patchlevel 00039 */ 00040 #define MBEDTLS_VERSION_MAJOR 2 00041 #define MBEDTLS_VERSION_MINOR 6 00042 #define MBEDTLS_VERSION_PATCH 0 00043 00044 /** 00045 * The single version number has the following structure: 00046 * MMNNPP00 00047 * Major version | Minor version | Patch version 00048 */ 00049 #define MBEDTLS_VERSION_NUMBER 0x02060000 00050 #define MBEDTLS_VERSION_STRING "2.6.0" 00051 #define MBEDTLS_VERSION_STRING_FULL "mbed TLS 2.6.0" 00052 00053 #if defined(MBEDTLS_VERSION_C) 00054 00055 #ifdef __cplusplus 00056 extern "C" { 00057 #endif 00058 00059 /** 00060 * Get the version number. 00061 * 00062 * \return The constructed version number in the format 00063 * MMNNPP00 (Major, Minor, Patch). 00064 */ 00065 unsigned int mbedtls_version_get_number( void ); 00066 00067 /** 00068 * Get the version string ("x.y.z"). 00069 * 00070 * \param string The string that will receive the value. 00071 * (Should be at least 9 bytes in size) 00072 */ 00073 void mbedtls_version_get_string( char *string ); 00074 00075 /** 00076 * Get the full version string ("mbed TLS x.y.z"). 00077 * 00078 * \param string The string that will receive the value. The mbed TLS version 00079 * string will use 18 bytes AT MOST including a terminating 00080 * null byte. 00081 * (So the buffer should be at least 18 bytes to receive this 00082 * version string). 00083 */ 00084 void mbedtls_version_get_string_full( char *string ); 00085 00086 /** 00087 * \brief Check if support for a feature was compiled into this 00088 * mbed TLS binary. This allows you to see at runtime if the 00089 * library was for instance compiled with or without 00090 * Multi-threading support. 00091 * 00092 * \note only checks against defines in the sections "System 00093 * support", "mbed TLS modules" and "mbed TLS feature 00094 * support" in config.h 00095 * 00096 * \param feature The string for the define to check (e.g. "MBEDTLS_AES_C") 00097 * 00098 * \return 0 if the feature is present, 00099 * -1 if the feature is not present and 00100 * -2 if support for feature checking as a whole was not 00101 * compiled in. 00102 */ 00103 int mbedtls_version_check_feature( const char *feature ); 00104 00105 #ifdef __cplusplus 00106 } 00107 #endif 00108 00109 #endif /* MBEDTLS_VERSION_C */ 00110 00111 #endif /* version.h */
Generated on Sun Jul 17 2022 08:25:33 by 1.7.2