Prepare example app Connect+FW Update

Fork of example-DISCO_L475_IOT-mbed-Cloud-connect by ST

Committer:
MarceloSalazar
Date:
Sun Oct 14 19:01:53 2018 +0100
Revision:
9:265744785d33
Parent:
4:cf7342047b4d
Add support for FW Update

Who changed what in which revision?

UserRevisionLine numberNew contents of line
adustm 1:e86b1cffc402 1 // ----------------------------------------------------------------------------
adustm 1:e86b1cffc402 2 // Copyright 2016-2017 ARM Ltd.
adustm 1:e86b1cffc402 3 //
adustm 1:e86b1cffc402 4 // SPDX-License-Identifier: Apache-2.0
adustm 1:e86b1cffc402 5 //
adustm 1:e86b1cffc402 6 // Licensed under the Apache License, Version 2.0 (the "License");
adustm 1:e86b1cffc402 7 // you may not use this file except in compliance with the License.
adustm 1:e86b1cffc402 8 // You may obtain a copy of the License at
adustm 1:e86b1cffc402 9 //
adustm 1:e86b1cffc402 10 // http://www.apache.org/licenses/LICENSE-2.0
adustm 1:e86b1cffc402 11 //
adustm 1:e86b1cffc402 12 // Unless required by applicable law or agreed to in writing, software
adustm 1:e86b1cffc402 13 // distributed under the License is distributed on an "AS IS" BASIS,
adustm 1:e86b1cffc402 14 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
adustm 1:e86b1cffc402 15 // See the License for the specific language governing permissions and
adustm 1:e86b1cffc402 16 // limitations under the License.
adustm 1:e86b1cffc402 17 // ----------------------------------------------------------------------------
adustm 1:e86b1cffc402 18
adustm 1:e86b1cffc402 19 // This file is a template and it's intented to be copied to the application
adustm 1:e86b1cffc402 20 // Enable this configuration
adustm 1:e86b1cffc402 21
adustm 1:e86b1cffc402 22 #ifndef MBED_CLOUD_CLIENT_USER_CONFIG_H
adustm 1:e86b1cffc402 23 #define MBED_CLOUD_CLIENT_USER_CONFIG_H
adustm 1:e86b1cffc402 24
adustm 4:cf7342047b4d 25 #ifdef MBED_CONF_APP_ENDPOINT_TYPE
adustm 4:cf7342047b4d 26 #define MBED_CLOUD_CLIENT_ENDPOINT_TYPE MBED_CONF_APP_ENDPOINT_TYPE
adustm 4:cf7342047b4d 27 #else
adustm 1:e86b1cffc402 28 #define MBED_CLOUD_CLIENT_ENDPOINT_TYPE "default"
adustm 4:cf7342047b4d 29 #endif
adustm 1:e86b1cffc402 30
adustm 1:e86b1cffc402 31 // Enable either TCP or UDP, but no both
adustm 1:e86b1cffc402 32 #define MBED_CLOUD_CLIENT_TRANSPORT_MODE_TCP
adustm 1:e86b1cffc402 33 // MBED_CLOUD_CLIENT_TRANSPORT_MODE_UDP
adustm 1:e86b1cffc402 34
adustm 1:e86b1cffc402 35 #define MBED_CLOUD_CLIENT_LIFETIME 3600
adustm 1:e86b1cffc402 36
adustm 1:e86b1cffc402 37 #define MBED_CLOUD_CLIENT_SUPPORT_UPDATE
adustm 1:e86b1cffc402 38 #define SN_COAP_MAX_BLOCKWISE_PAYLOAD_SIZE 1024
adustm 1:e86b1cffc402 39
adustm 1:e86b1cffc402 40 // set flag to enable update support in mbed Cloud client
adustm 1:e86b1cffc402 41 #define MBED_CLOUD_CLIENT_SUPPORT_UPDATE
adustm 1:e86b1cffc402 42
adustm 1:e86b1cffc402 43 // set download buffer size in bytes (min. 1024 bytes)
adustm 1:e86b1cffc402 44
adustm 1:e86b1cffc402 45 // Use larger buffers in Linux //
adustm 1:e86b1cffc402 46 #ifdef __linux__
adustm 1:e86b1cffc402 47 #define MBED_CLOUD_CLIENT_UPDATE_BUFFER (2 * 1024 * 1024)
adustm 1:e86b1cffc402 48 #else
adustm 1:e86b1cffc402 49 #define MBED_CLOUD_CLIENT_UPDATE_BUFFER 2048
adustm 1:e86b1cffc402 50 #endif
adustm 1:e86b1cffc402 51
adustm 1:e86b1cffc402 52 // Developer flags for Update feature
adustm 1:e86b1cffc402 53 #if MBED_CONF_APP_DEVELOPER_MODE == 1
adustm 1:e86b1cffc402 54 #define MBED_CLOUD_DEV_UPDATE_CERT
adustm 1:e86b1cffc402 55 #define MBED_CLOUD_DEV_UPDATE_ID
adustm 1:e86b1cffc402 56 #endif // MBED_CONF_APP_DEVELOPER_MODE
adustm 1:e86b1cffc402 57
adustm 1:e86b1cffc402 58 #endif // MBED_CLOUD_CLIENT_USER_CONFIG_H
adustm 1:e86b1cffc402 59