Simple Mbed Cloud client application using features of K64 & K66 including Ethernet and SD Card

Fork of mbed-cloud-example_K64_K66 by Mac Lobdell

DEPRECATED

This example application is not maintained and not recommended. It uses an old version of Mbed OS, Pelion DM, and Arm toolchain. It doesn't work with Mbed Studio.

Please use: https://os.mbed.com/teams/mbed-os-examples/code/mbed-os-example-pelion/

Committer:
mmahadevan
Date:
Fri Oct 12 02:41:34 2018 +0000
Revision:
24:1c8be247f7fe
Parent:
11:ae1f6fe932dc
the sd-driver needs to be removed to avoid conflict with the driver that is in mbed-os now.

Who changed what in which revision?

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