2 * Copyright (C) 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
\r
4 * Permission is hereby granted, free of charge, to any person obtaining a copy of
\r
5 * this software and associated documentation files (the "Software"), to deal in
\r
6 * the Software without restriction, including without limitation the rights to
\r
7 * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
\r
8 * the Software, and to permit persons to whom the Software is furnished to do so,
\r
9 * subject to the following conditions:
\r
11 * The above copyright notice and this permission notice shall be included in all
\r
12 * copies or substantial portions of the Software.
\r
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
\r
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
\r
16 * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
\r
17 * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
\r
18 * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
\r
19 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
\r
22 /* This file contains configuration settings for the demos. */
\r
24 #ifndef IOT_CONFIG_H_
\r
25 #define IOT_CONFIG_H_
\r
27 /* Use platform types on FreeRTOS. */
\r
28 #include "FreeRTOS.h"
\r
29 #include "platform/iot_platform_types_freertos.h" //_RB_Makes common config file FreeRTOS specific
\r
32 * Set this to the number of recyclable tasks for the task pool to cache.
\r
34 * Caching dynamically allocated tasks (recyclable tasks) helps the application
\r
35 * to limit the number of allocations at runtime. Caching recyclable tasks may
\r
36 * help making the application more responsive and predictable, by removing a
\r
37 * potential for memory allocation failures, but it may also have negative
\r
38 * repercussions on the amount of memory available at any given time. It is up
\r
39 * to the application developer to strike the correct balance these competing
\r
40 * needs. The task pool will cache when the application calling
\r
41 * IotTaskPool_RecycleJob. Any recycled tasks in excess of
\r
42 * IOT_TASKPOOL_JOBS_RECYCLE_LIMIT will be destroyed and its memory will be
\r
45 * Default value (if undefined): 8
\r
47 #define IOT_TASKPOOL_JOBS_RECYCLE_LIMIT 8
\r
50 * Set this to 1 to perform sanity checks when using the task pool library.
\r
52 * Asserts are useful for debugging, but should be disabled in production code.
\r
53 * If this is set to 1, IotTaskPool_Assert can be defined to set the assertion
\r
54 * function; otherwise, the standard library's assert function will be used.
\r
56 * Possible values: 0 (asserts disabled) or 1 (asserts enabled)
\r
57 * Recommended values: 1 when debugging; 0 in production code.
\r
58 * Default value (if undefined): 0
\r
60 #define IOT_TASKPOOL_ENABLE_ASSERTS 1
\r
63 * Set the log level of the task pool library.
\r
65 * Log messages from the task pool library at or below this setting will be
\r
68 * Possible values: One of the Log levels.
\r
69 * Default value (if undefined): IOT_LOG_LEVEL_GLOBAL; if that is undefined,
\r
70 * then IOT_LOG_NONE.
\r
72 #define IOT_LOG_LEVEL_TASKPOOL IOT_LOG_INFO
\r
77 #define IOT_TASKPOOL_NUMBER_OF_WORKERS 3
\r
82 #define IOT_TASKPOOL_WORKER_STACK_SIZE_BYTES 2048
\r
84 /* Include the common configuration file for FreeRTOS. */
\r
85 #include "iot_config_common.h"
\r
87 #endif /* ifndef IOT_CONFIG_H_ */
\r