Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: MAX44000 PWM_Tone_Library nexpaq_mdk
Fork of LED_Demo by
m2mconfig.h
00001 /* 00002 * Copyright (c) 2015 ARM Limited. All rights reserved. 00003 * SPDX-License-Identifier: Apache-2.0 00004 * Licensed under the Apache License, Version 2.0 (the License); you may 00005 * not use this file except in compliance with the License. 00006 * You may obtain a copy of the License at 00007 * 00008 * http://www.apache.org/licenses/LICENSE-2.0 00009 * 00010 * Unless required by applicable law or agreed to in writing, software 00011 * distributed under the License is distributed on an AS IS BASIS, WITHOUT 00012 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00013 * See the License for the specific language governing permissions and 00014 * limitations under the License. 00015 */ 00016 #ifndef M2MCONFIG_H 00017 #define M2MCONFIG_H 00018 00019 #include <stdlib.h> 00020 #include <cstring> 00021 #include <cstdio> 00022 #include "mbed-client/m2mstring.h" 00023 using namespace m2m; 00024 00025 #ifdef YOTTA_CFG_RECONNECTION_COUNT 00026 #define MBED_CLIENT_RECONNECTION_COUNT YOTTA_CFG_RECONNECTION_COUNT 00027 #elif defined MBED_CONF_MBED_CLIENT_RECONNECTION_COUNT 00028 #define MBED_CLIENT_RECONNECTION_COUNT MBED_CONF_MBED_CLIENT_RECONNECTION_COUNT 00029 #else 00030 #define MBED_CLIENT_RECONNECTION_COUNT 3 00031 #endif 00032 00033 #ifdef YOTTA_CFG_RECONNECTION_INTERVAL 00034 #define MBED_CLIENT_RECONNECTION_INTERVAL YOTTA_CFG_RECONNECTION_INTERVAL 00035 #elif defined MBED_CONF_MBED_CLIENT_RECONNECTION_INTERVAL 00036 #define MBED_CLIENT_RECONNECTION_INTERVAL MBED_CONF_MBED_CLIENT_RECONNECTION_INTERVAL 00037 #else 00038 #define MBED_CLIENT_RECONNECTION_INTERVAL 5 00039 #endif 00040 00041 #ifdef YOTTA_CFG_TCP_KEEPALIVE_TIME 00042 #define MBED_CLIENT_TCP_KEEPALIVE_TIME YOTTA_CFG_TCP_KEEPALIVE_TIME 00043 #elif defined MBED_CONF_MBED_CLIENT_TCP_KEEPALIVE_TIME 00044 #define MBED_CLIENT_TCP_KEEPALIVE_TIME MBED_CONF_MBED_CLIENT_TCP_KEEPALIVE_TIME 00045 #else 00046 #define MBED_CLIENT_TCP_KEEPALIVE_TIME 300 00047 #endif 00048 00049 #ifdef YOTTA_CFG_DISABLE_BOOTSTRAP_FEATURE 00050 #define MBED_CLIENT_DISABLE_BOOTSTRAP_FEATURE YOTTA_CFG_DISABLE_BOOTSTRAP_FEATURE 00051 #elif defined MBED_CONF_MBED_CLIENT_DISABLE_BOOTSTRAP_FEATURE 00052 #define MBED_CLIENT_DISABLE_BOOTSTRAP_FEATURE MBED_CONF_MBED_CLIENT_DISABLE_BOOTSTRAP_FEATURE 00053 #endif 00054 00055 #if defined (__ICCARM__) 00056 #define m2m_deprecated 00057 #else 00058 #define m2m_deprecated __attribute__ ((deprecated)) 00059 #endif 00060 00061 // This is valid for mbed-client-mbedtls 00062 // For other SSL implementation there 00063 // can be other 00064 00065 /* 00066 *\brief A callback function for Random number 00067 * required by the mbed-client-mbedtls module. 00068 */ 00069 typedef uint32_t (*random_number_cb)(void) ; 00070 00071 /* 00072 *\brief An entropy structure for mbedtls entropy source. 00073 * \param entropy_source_ptr Entropy function. 00074 * \param p_source Function data. 00075 * \param threshold Minimum required from source before entropy is released 00076 * (with mbedtls_entropy_func()) (in bytes). 00077 * \param strong MBEDTLS_ENTROPY_SOURCE_STRONG = 1 or 00078 * MBEDTSL_ENTROPY_SOURCE_WEAK = 0. 00079 * At least one strong source needs to be added. 00080 * Weaker sources (such as the cycle counter) can be used as 00081 * a complement. 00082 */ 00083 typedef struct mbedtls_entropy { 00084 int (*entropy_source_ptr)(void *, unsigned char *,size_t , size_t *); 00085 void *p_source; 00086 size_t threshold; 00087 int strong; 00088 }entropy_cb; 00089 00090 00091 #endif // M2MCONFIG_H
Generated on Tue Jul 12 2022 12:28:36 by
1.7.2
