]> git.sur5r.net Git - freertos/blobdiff - FreeRTOS-Plus/Demo/FreeRTOS_IoT_Libraries/mqtt/iot_config.h
Update projects to use the new directory name
[freertos] / FreeRTOS-Plus / Demo / FreeRTOS_IoT_Libraries / mqtt / iot_config.h
index 2889a2bfb67823e1f17939df0c902adfb0f3964e..a326f471e74003b4ccc95d2dd8beaa8ea5b2b936 100644 (file)
 #ifndef IOT_CONFIG_H_\r
 #define IOT_CONFIG_H_\r
 \r
+/* Use platform types on FreeRTOS. */\r
+#include "FreeRTOS.h"\r
+#include "platform/iot_platform_types_freertos.h" //_RB_Makes common config file FreeRTOS specific\r
+\r
+/*\r
+ * Set this to the number of recyclable tasks for the task pool to cache.\r
+ *\r
+ * Caching dynamically allocated tasks (recyclable tasks) helps the application\r
+ * to limit the number of allocations at runtime. Caching recyclable tasks may\r
+ * help making the application more responsive and predictable, by removing a\r
+ * potential for memory allocation failures, but it may also have negative\r
+ * repercussions on the amount of memory available at any given time. It is up\r
+ * to the application developer to strike the correct balance these competing\r
+ * needs. The task pool will cache when the application calling\r
+ * IotTaskPool_RecycleJob. Any recycled tasks in excess of\r
+ * IOT_TASKPOOL_JOBS_RECYCLE_LIMIT will be destroyed and its memory will be\r
+ * release.\r
+ *\r
+ * Default value (if undefined): 8\r
+ */\r
+#define IOT_TASKPOOL_JOBS_RECYCLE_LIMIT 8\r
+\r
+/*\r
+ * Set this to 1 to perform sanity checks when using the task pool library.\r
+ *\r
+ * Asserts are useful for debugging, but should be disabled in production code.\r
+ * If this is set to 1, IotTaskPool_Assert can be defined to set the assertion\r
+ * function; otherwise, the standard library's assert function will be used.\r
+ *\r
+ * Possible values: 0 (asserts disabled) or 1 (asserts enabled)\r
+ * Recommended values: 1 when debugging; 0 in production code.\r
+ * Default value (if undefined): 0\r
+ */\r
+#define IOT_TASKPOOL_ENABLE_ASSERTS 1\r
+\r
+/*\r
+ * Set the log level of the task pool library.\r
+ *\r
+ * Log messages from the task pool library at or below this setting will be\r
+ * printed.\r
+ *\r
+ * Possible values: One of the Log levels.\r
+ * Default value (if undefined): IOT_LOG_LEVEL_GLOBAL; if that is undefined,\r
+ * then IOT_LOG_NONE.\r
+ */\r
+#define IOT_LOG_LEVEL_TASKPOOL IOT_LOG_INFO\r
+\r
+/*\r
+ *\r
+ */\r
+#define IOT_TASKPOOL_NUMBER_OF_WORKERS 3\r
+\r
+/*\r
+ *\r
+ */\r
+#define IOT_TASKPOOL_WORKER_STACK_SIZE_BYTES 2048\r
+\r
 /* How long the MQTT library will wait for PINGRESPs or PUBACKs. */\r
-#define IOT_MQTT_RESPONSE_WAIT_MS            ( 10000 )\r
-\r
-/* MQTT demo configuration. */\r
-#define IOT_DEMO_MQTT_PUBLISH_BURST_COUNT    ( 10 )\r
-#define IOT_DEMO_MQTT_PUBLISH_BURST_SIZE     ( 2 )\r
-\r
-/* Shadow demo configuration. The demo publishes periodic Shadow updates and responds\r
- * to changing Shadows. */\r
-#define AWS_IOT_DEMO_SHADOW_UPDATE_COUNT        ( 20 )   /* Number of updates to publish. */\r
-#define AWS_IOT_DEMO_SHADOW_UPDATE_PERIOD_MS    ( 3000 ) /* Period of Shadow updates. */\r
-\r
-/* Library logging configuration. IOT_LOG_LEVEL_GLOBAL provides a global log\r
- * level for all libraries; the library-specific settings override the global\r
- * setting. If both the library-specific and global settings are undefined,\r
- * no logs will be printed. */\r
-#define IOT_LOG_LEVEL_GLOBAL                    IOT_LOG_INFO\r
-#define IOT_LOG_LEVEL_DEMO                      IOT_LOG_INFO\r
-#define IOT_LOG_LEVEL_PLATFORM                  IOT_LOG_NONE\r
-#define IOT_LOG_LEVEL_NETWORK                   IOT_LOG_INFO\r
-#define IOT_LOG_LEVEL_TASKPOOL                  IOT_LOG_NONE\r
-#define IOT_LOG_LEVEL_MQTT                      IOT_LOG_INFO\r
-#define AWS_IOT_LOG_LEVEL_SHADOW                IOT_LOG_INFO\r
-#define AWS_IOT_LOG_LEVEL_DEFENDER              IOT_LOG_INFO\r
-\r
-/* Platform thread stack size and priority. */\r
-#define IOT_THREAD_DEFAULT_STACK_SIZE    2048\r
-#define IOT_THREAD_DEFAULT_PRIORITY      5\r
-\r
-#define AWS_IOT_MQTT_ENABLE_METRICS 0 //_RB_ added\r
+#define IOT_MQTT_RESPONSE_WAIT_MS ( 10000 )\r
+\r
+#define AWS_IOT_MQTT_ENABLE_METRICS 0\r
 \r
 /* Include the common configuration file for FreeRTOS. */\r
 #include "iot_config_common.h"\r