Simple interface for Mbed Cloud Client
Embed:
(wiki syntax)
Show/hide line numbers
arm_uc_config.h
00001 // ---------------------------------------------------------------------------- 00002 // Copyright 2016-2017 ARM Ltd. 00003 // 00004 // SPDX-License-Identifier: Apache-2.0 00005 // 00006 // Licensed under the Apache License, Version 2.0 (the "License"); 00007 // you may not use this file except in compliance with the License. 00008 // You may obtain a copy of the License at 00009 // 00010 // http://www.apache.org/licenses/LICENSE-2.0 00011 // 00012 // Unless required by applicable law or agreed to in writing, software 00013 // distributed under the License is distributed on an "AS IS" BASIS, 00014 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00015 // See the License for the specific language governing permissions and 00016 // limitations under the License. 00017 // ---------------------------------------------------------------------------- 00018 00019 #ifndef ARM_UPDATE_CONFIG_H 00020 #define ARM_UPDATE_CONFIG_H 00021 00022 #ifdef MBED_CLOUD_CLIENT_USER_CONFIG_FILE 00023 #include MBED_CLOUD_CLIENT_USER_CONFIG_FILE 00024 #endif 00025 00026 #ifndef MAX_SOURCES 00027 #define MAX_SOURCES 10 00028 #endif 00029 00030 #ifndef ARM_UC_SOCKET_MAX_RETRY 00031 #define ARM_UC_SOCKET_MAX_RETRY 3 00032 #endif 00033 00034 /* Total memory allocated for download buffers. 00035 For HTTP sources, this number cannot be below 1 KiB. 00036 */ 00037 #ifdef MBED_CLOUD_CLIENT_UPDATE_BUFFER 00038 #if MBED_CLOUD_CLIENT_UPDATE_BUFFER < 1024 00039 #error MBED_CLOUD_CLIENT_UPDATE_BUFFER must be 1024 bytes or more 00040 #else 00041 #define ARM_UC_BUFFER_SIZE MBED_CLOUD_CLIENT_UPDATE_BUFFER 00042 #endif 00043 #endif 00044 00045 #ifndef ARM_UC_BUFFER_SIZE 00046 #define ARM_UC_BUFFER_SIZE 1024 00047 #endif 00048 00049 #ifndef ARM_UC_USE_KCM 00050 #define ARM_UC_USE_KCM 1 00051 #define ARM_UPDATE_USE_KCM 1 00052 #endif 00053 00054 #ifndef ARM_UC_USE_PAL_CRYPTO 00055 #define ARM_UC_USE_PAL_CRYPTO 1 00056 #endif 00057 00058 #define MBED_CLOUD_CLIENT_UPDATE_CERTIFICATE_PREFIX "mbed.UpdateAuthCert." 00059 #define MBED_CLOUD_CLIENT_UPDATE_CERTIFICATE_DEFAULT "mbed.UpdateAuthCert" 00060 #define MBED_CLOUD_SHA256_BYTES (256/8) 00061 #define MBED_CLOUD_BASE64_SIZE(X) (((X + 2)/3)*4) 00062 #define MBED_CLOUD_CLIENT_UPDATE_CERTIFICATE_NAME_SIZE (MBED_CLOUD_BASE64_SIZE(MBED_CLOUD_SHA256_BYTES) + sizeof(MBED_CLOUD_CLIENT_UPDATE_CERTIFICATE_PREFIX)) 00063 00064 00065 // NOTE: The charset must be sorted except for the trailing character which is used as a padding character. 00066 #define MBED_CLOUD_UPDATE_BASE64_CHARSET "0123456789@ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz-" 00067 00068 #endif // ARM_UPDATE_CONFIG_H
Generated on Tue Jul 12 2022 19:01:32 by 1.7.2