mbed client lightswitch demo

Dependencies:   mbed Socket lwip-eth lwip-sys lwip

Fork of mbed-client-classic-example-lwip by Austin Blackstone

Committer:
mbedAustin
Date:
Thu Jun 09 17:08:36 2016 +0000
Revision:
11:cada08fc8a70
Commit for public Consumption

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mbedAustin 11:cada08fc8a70 1 /**
mbedAustin 11:cada08fc8a70 2 * \file version.h
mbedAustin 11:cada08fc8a70 3 *
mbedAustin 11:cada08fc8a70 4 * \brief Run-time version information
mbedAustin 11:cada08fc8a70 5 *
mbedAustin 11:cada08fc8a70 6 * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved
mbedAustin 11:cada08fc8a70 7 * SPDX-License-Identifier: Apache-2.0
mbedAustin 11:cada08fc8a70 8 *
mbedAustin 11:cada08fc8a70 9 * Licensed under the Apache License, Version 2.0 (the "License"); you may
mbedAustin 11:cada08fc8a70 10 * not use this file except in compliance with the License.
mbedAustin 11:cada08fc8a70 11 * You may obtain a copy of the License at
mbedAustin 11:cada08fc8a70 12 *
mbedAustin 11:cada08fc8a70 13 * http://www.apache.org/licenses/LICENSE-2.0
mbedAustin 11:cada08fc8a70 14 *
mbedAustin 11:cada08fc8a70 15 * Unless required by applicable law or agreed to in writing, software
mbedAustin 11:cada08fc8a70 16 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
mbedAustin 11:cada08fc8a70 17 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
mbedAustin 11:cada08fc8a70 18 * See the License for the specific language governing permissions and
mbedAustin 11:cada08fc8a70 19 * limitations under the License.
mbedAustin 11:cada08fc8a70 20 *
mbedAustin 11:cada08fc8a70 21 * This file is part of mbed TLS (https://tls.mbed.org)
mbedAustin 11:cada08fc8a70 22 */
mbedAustin 11:cada08fc8a70 23 /*
mbedAustin 11:cada08fc8a70 24 * This set of compile-time defines and run-time variables can be used to
mbedAustin 11:cada08fc8a70 25 * determine the version number of the mbed TLS library used.
mbedAustin 11:cada08fc8a70 26 */
mbedAustin 11:cada08fc8a70 27 #ifndef MBEDTLS_VERSION_H
mbedAustin 11:cada08fc8a70 28 #define MBEDTLS_VERSION_H
mbedAustin 11:cada08fc8a70 29
mbedAustin 11:cada08fc8a70 30 #if !defined(MBEDTLS_CONFIG_FILE)
mbedAustin 11:cada08fc8a70 31 #include "config.h"
mbedAustin 11:cada08fc8a70 32 #else
mbedAustin 11:cada08fc8a70 33 #include MBEDTLS_CONFIG_FILE
mbedAustin 11:cada08fc8a70 34 #endif
mbedAustin 11:cada08fc8a70 35
mbedAustin 11:cada08fc8a70 36 /**
mbedAustin 11:cada08fc8a70 37 * The version number x.y.z is split into three parts.
mbedAustin 11:cada08fc8a70 38 * Major, Minor, Patchlevel
mbedAustin 11:cada08fc8a70 39 */
mbedAustin 11:cada08fc8a70 40 #define MBEDTLS_VERSION_MAJOR 2
mbedAustin 11:cada08fc8a70 41 #define MBEDTLS_VERSION_MINOR 2
mbedAustin 11:cada08fc8a70 42 #define MBEDTLS_VERSION_PATCH 0
mbedAustin 11:cada08fc8a70 43
mbedAustin 11:cada08fc8a70 44 /**
mbedAustin 11:cada08fc8a70 45 * The single version number has the following structure:
mbedAustin 11:cada08fc8a70 46 * MMNNPP00
mbedAustin 11:cada08fc8a70 47 * Major version | Minor version | Patch version
mbedAustin 11:cada08fc8a70 48 */
mbedAustin 11:cada08fc8a70 49 #define MBEDTLS_VERSION_NUMBER 0x02020000
mbedAustin 11:cada08fc8a70 50 #define MBEDTLS_VERSION_STRING "2.2.0"
mbedAustin 11:cada08fc8a70 51 #define MBEDTLS_VERSION_STRING_FULL "mbed TLS 2.2.0"
mbedAustin 11:cada08fc8a70 52
mbedAustin 11:cada08fc8a70 53 #if defined(MBEDTLS_VERSION_C)
mbedAustin 11:cada08fc8a70 54
mbedAustin 11:cada08fc8a70 55 #ifdef __cplusplus
mbedAustin 11:cada08fc8a70 56 extern "C" {
mbedAustin 11:cada08fc8a70 57 #endif
mbedAustin 11:cada08fc8a70 58
mbedAustin 11:cada08fc8a70 59 /**
mbedAustin 11:cada08fc8a70 60 * Get the version number.
mbedAustin 11:cada08fc8a70 61 *
mbedAustin 11:cada08fc8a70 62 * \return The constructed version number in the format
mbedAustin 11:cada08fc8a70 63 * MMNNPP00 (Major, Minor, Patch).
mbedAustin 11:cada08fc8a70 64 */
mbedAustin 11:cada08fc8a70 65 unsigned int mbedtls_version_get_number( void );
mbedAustin 11:cada08fc8a70 66
mbedAustin 11:cada08fc8a70 67 /**
mbedAustin 11:cada08fc8a70 68 * Get the version string ("x.y.z").
mbedAustin 11:cada08fc8a70 69 *
mbedAustin 11:cada08fc8a70 70 * \param string The string that will receive the value.
mbedAustin 11:cada08fc8a70 71 * (Should be at least 9 bytes in size)
mbedAustin 11:cada08fc8a70 72 */
mbedAustin 11:cada08fc8a70 73 void mbedtls_version_get_string( char *string );
mbedAustin 11:cada08fc8a70 74
mbedAustin 11:cada08fc8a70 75 /**
mbedAustin 11:cada08fc8a70 76 * Get the full version string ("mbed TLS x.y.z").
mbedAustin 11:cada08fc8a70 77 *
mbedAustin 11:cada08fc8a70 78 * \param string The string that will receive the value. The mbed TLS version
mbedAustin 11:cada08fc8a70 79 * string will use 18 bytes AT MOST including a terminating
mbedAustin 11:cada08fc8a70 80 * null byte.
mbedAustin 11:cada08fc8a70 81 * (So the buffer should be at least 18 bytes to receive this
mbedAustin 11:cada08fc8a70 82 * version string).
mbedAustin 11:cada08fc8a70 83 */
mbedAustin 11:cada08fc8a70 84 void mbedtls_version_get_string_full( char *string );
mbedAustin 11:cada08fc8a70 85
mbedAustin 11:cada08fc8a70 86 /**
mbedAustin 11:cada08fc8a70 87 * \brief Check if support for a feature was compiled into this
mbedAustin 11:cada08fc8a70 88 * mbed TLS binary. This allows you to see at runtime if the
mbedAustin 11:cada08fc8a70 89 * library was for instance compiled with or without
mbedAustin 11:cada08fc8a70 90 * Multi-threading support.
mbedAustin 11:cada08fc8a70 91 *
mbedAustin 11:cada08fc8a70 92 * \note only checks against defines in the sections "System
mbedAustin 11:cada08fc8a70 93 * support", "mbed TLS modules" and "mbed TLS feature
mbedAustin 11:cada08fc8a70 94 * support" in config.h
mbedAustin 11:cada08fc8a70 95 *
mbedAustin 11:cada08fc8a70 96 * \param feature The string for the define to check (e.g. "MBEDTLS_AES_C")
mbedAustin 11:cada08fc8a70 97 *
mbedAustin 11:cada08fc8a70 98 * \return 0 if the feature is present,
mbedAustin 11:cada08fc8a70 99 * -1 if the feature is not present and
mbedAustin 11:cada08fc8a70 100 * -2 if support for feature checking as a whole was not
mbedAustin 11:cada08fc8a70 101 * compiled in.
mbedAustin 11:cada08fc8a70 102 */
mbedAustin 11:cada08fc8a70 103 int mbedtls_version_check_feature( const char *feature );
mbedAustin 11:cada08fc8a70 104
mbedAustin 11:cada08fc8a70 105 #ifdef __cplusplus
mbedAustin 11:cada08fc8a70 106 }
mbedAustin 11:cada08fc8a70 107 #endif
mbedAustin 11:cada08fc8a70 108
mbedAustin 11:cada08fc8a70 109 #endif /* MBEDTLS_VERSION_C */
mbedAustin 11:cada08fc8a70 110
mbedAustin 11:cada08fc8a70 111 #endif /* version.h */