Skip to content

Commit 55a2a7f

Browse files
committed
Cleanup mbed_cloud_client_user_config file
Make Blocksize to be 512 KiB and update buffer 1 KiB by default. This saves some RAM and 512 is going to be the client default in future.
1 parent 40606e0 commit 55a2a7f

File tree

1 file changed

+7
-22
lines changed

1 file changed

+7
-22
lines changed

mbed_cloud_client_user_config.h

Lines changed: 7 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// ----------------------------------------------------------------------------
2-
// Copyright 2016-2017 ARM Ltd.
2+
// Copyright 2019 ARM Ltd.
33
//
44
// SPDX-License-Identifier: Apache-2.0
55
//
@@ -16,37 +16,22 @@
1616
// limitations under the License.
1717
// ----------------------------------------------------------------------------
1818

19-
2019
#ifndef MBED_CLOUD_CLIENT_USER_CONFIG_H
2120
#define MBED_CLOUD_CLIENT_USER_CONFIG_H
2221

2322
#define MBED_CLOUD_CLIENT_ENDPOINT_TYPE "default"
2423
#define MBED_CLOUD_CLIENT_TRANSPORT_MODE_TCP
2524
#define MBED_CLOUD_CLIENT_LIFETIME 3600
2625

27-
#ifdef __FREERTOS__
28-
#define SN_COAP_MAX_BLOCKWISE_PAYLOAD_SIZE 512
29-
#else
30-
#define SN_COAP_MAX_BLOCKWISE_PAYLOAD_SIZE 1024
31-
#endif
26+
#define SN_COAP_MAX_BLOCKWISE_PAYLOAD_SIZE 512
3227

3328
/* set flag to enable update support in mbed Cloud client */
34-
#ifndef __FREERTOS__
35-
#define MBED_CLOUD_CLIENT_SUPPORT_UPDATE
36-
#endif
37-
/* set download buffer size in bytes (min. 1024 bytes) */
29+
#define MBED_CLOUD_CLIENT_SUPPORT_UPDATE
3830

39-
/* Use larger buffers in Linux */
40-
#ifdef __linux__
41-
#define MBED_CLOUD_CLIENT_UPDATE_BUFFER (2 * 1024 * 1024)
42-
#else
43-
#define MBED_CLOUD_CLIENT_UPDATE_BUFFER 2048
44-
#endif
31+
/* set download buffer size in bytes (min. 1024 bytes) */
32+
#define MBED_CLOUD_CLIENT_UPDATE_BUFFER 1024
4533

46-
/* Developer flags for Update feature */
47-
#if MBED_CONF_APP_DEVELOPER_MODE == 1
48-
#define MBED_CLOUD_DEV_UPDATE_CERT
49-
#define MBED_CLOUD_DEV_UPDATE_ID
50-
#endif /* MBED_CONF_APP_DEVELOPER_MODE */
34+
#define MBED_CLOUD_DEV_UPDATE_CERT
35+
#define MBED_CLOUD_DEV_UPDATE_ID
5136

5237
#endif /* MBED_CLOUD_CLIENT_USER_CONFIG_H */

0 commit comments

Comments
 (0)