Updated version to work with K64 and FW Update

Fork of mbed-cloud-connect-example-ethernet by NXP

Committer:
MarceloSalazar
Date:
Thu Sep 06 14:22:28 2018 +0100
Revision:
22:ca861d3f7a6c
Parent:
18:86e812c7e048
Restore update_default_resources.c

Who changed what in which revision?

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