summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Sun <smn@amazon.com>2021-11-15 17:18:53 +0800
committerAndy Sun <smn@amazon.com>2021-11-15 17:18:53 +0800
commit6c128d26cf1201a36ee1d68dfe4d0a85cc5cecd9 (patch)
tree1d088d6ec628614aab259248a396c6ae9792e643
parenta6dfca9829e80bbe9e3ba4fd16b42ccdf7015d56 (diff)
downloadfreertos-git-fix_cellular_demo_log_warning.tar.gz
Fix build warning due to log configuration.fix_cellular_demo_log_warning
-rw-r--r--FreeRTOS-Plus/Demo/FreeRTOS_Cellular_Interface_Windows_Simulator/MQTT_Mutual_Auth_Demo_with_BG96/cellular_config.h39
-rw-r--r--FreeRTOS-Plus/Demo/FreeRTOS_Cellular_Interface_Windows_Simulator/MQTT_Mutual_Auth_Demo_with_HL7802/cellular_config.h39
-rw-r--r--FreeRTOS-Plus/Demo/FreeRTOS_Cellular_Interface_Windows_Simulator/MQTT_Mutual_Auth_Demo_with_SARA_R4/cellular_config.h39
-rw-r--r--FreeRTOS-Plus/Source/Utilities/mbedtls_freertos/mbedtls_bio_freertos_cellular.c3
4 files changed, 120 insertions, 0 deletions
diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_Cellular_Interface_Windows_Simulator/MQTT_Mutual_Auth_Demo_with_BG96/cellular_config.h b/FreeRTOS-Plus/Demo/FreeRTOS_Cellular_Interface_Windows_Simulator/MQTT_Mutual_Auth_Demo_with_BG96/cellular_config.h
index 67f37864f..b3a3ba15e 100644
--- a/FreeRTOS-Plus/Demo/FreeRTOS_Cellular_Interface_Windows_Simulator/MQTT_Mutual_Auth_Demo_with_BG96/cellular_config.h
+++ b/FreeRTOS-Plus/Demo/FreeRTOS_Cellular_Interface_Windows_Simulator/MQTT_Mutual_Auth_Demo_with_BG96/cellular_config.h
@@ -32,6 +32,45 @@
#ifndef __CELLULAR_CONFIG_H__
#define __CELLULAR_CONFIG_H__
+/**************************************************/
+/******* DO NOT CHANGE the following order ********/
+/**************************************************/
+
+/* Include logging header files and define logging macros in the following order:
+ * 1. Include the header file "logging_levels.h".
+ * 2. Define the LIBRARY_LOG_NAME and LIBRARY_LOG_LEVEL macros depending on
+ * the logging configuration for DEMO.
+ * 3. Include the header file "logging_stack.h", if logging is enabled for DEMO.
+ */
+
+#include "logging_levels.h"
+
+/* Logging configuration for the Demo. */
+#ifndef LIBRARY_LOG_NAME
+ #define LIBRARY_LOG_NAME "CellularLib"
+#endif
+
+#ifndef LIBRARY_LOG_LEVEL
+ #define LIBRARY_LOG_LEVEL LOG_INFO
+#endif
+
+/* Prototype for the function used to print to console on Windows simulator
+ * of FreeRTOS.
+ * The function prints to the console before the network is connected;
+ * then a UDP port after the network has connected. */
+extern void vLoggingPrintf( const char * pcFormatString,
+ ... );
+
+/* Map the SdkLog macro to the logging function to enable logging
+ * on Windows simulator. */
+#ifndef SdkLog
+ #define SdkLog( message ) vLoggingPrintf message
+#endif
+
+#include "logging_stack.h"
+
+/************ End of logging configuration ****************/
+
/* This is a project specific file and is used to override config values defined
* in cellular_config_defaults.h. */
diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_Cellular_Interface_Windows_Simulator/MQTT_Mutual_Auth_Demo_with_HL7802/cellular_config.h b/FreeRTOS-Plus/Demo/FreeRTOS_Cellular_Interface_Windows_Simulator/MQTT_Mutual_Auth_Demo_with_HL7802/cellular_config.h
index 3679bc629..a1b288893 100644
--- a/FreeRTOS-Plus/Demo/FreeRTOS_Cellular_Interface_Windows_Simulator/MQTT_Mutual_Auth_Demo_with_HL7802/cellular_config.h
+++ b/FreeRTOS-Plus/Demo/FreeRTOS_Cellular_Interface_Windows_Simulator/MQTT_Mutual_Auth_Demo_with_HL7802/cellular_config.h
@@ -32,6 +32,45 @@
#ifndef __CELLULAR_CONFIG_H__
#define __CELLULAR_CONFIG_H__
+/**************************************************/
+/******* DO NOT CHANGE the following order ********/
+/**************************************************/
+
+/* Include logging header files and define logging macros in the following order:
+ * 1. Include the header file "logging_levels.h".
+ * 2. Define the LIBRARY_LOG_NAME and LIBRARY_LOG_LEVEL macros depending on
+ * the logging configuration for DEMO.
+ * 3. Include the header file "logging_stack.h", if logging is enabled for DEMO.
+ */
+
+#include "logging_levels.h"
+
+/* Logging configuration for the Demo. */
+#ifndef LIBRARY_LOG_NAME
+ #define LIBRARY_LOG_NAME "CellularLib"
+#endif
+
+#ifndef LIBRARY_LOG_LEVEL
+ #define LIBRARY_LOG_LEVEL LOG_INFO
+#endif
+
+/* Prototype for the function used to print to console on Windows simulator
+ * of FreeRTOS.
+ * The function prints to the console before the network is connected;
+ * then a UDP port after the network has connected. */
+extern void vLoggingPrintf( const char * pcFormatString,
+ ... );
+
+/* Map the SdkLog macro to the logging function to enable logging
+ * on Windows simulator. */
+#ifndef SdkLog
+ #define SdkLog( message ) vLoggingPrintf message
+#endif
+
+#include "logging_stack.h"
+
+/************ End of logging configuration ****************/
+
/* This is a project specific file and is used to override config values defined
* in cellular_config_defaults.h. */
diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_Cellular_Interface_Windows_Simulator/MQTT_Mutual_Auth_Demo_with_SARA_R4/cellular_config.h b/FreeRTOS-Plus/Demo/FreeRTOS_Cellular_Interface_Windows_Simulator/MQTT_Mutual_Auth_Demo_with_SARA_R4/cellular_config.h
index 93de31562..49ac6154e 100644
--- a/FreeRTOS-Plus/Demo/FreeRTOS_Cellular_Interface_Windows_Simulator/MQTT_Mutual_Auth_Demo_with_SARA_R4/cellular_config.h
+++ b/FreeRTOS-Plus/Demo/FreeRTOS_Cellular_Interface_Windows_Simulator/MQTT_Mutual_Auth_Demo_with_SARA_R4/cellular_config.h
@@ -32,6 +32,45 @@
#ifndef __CELLULAR_CONFIG_H__
#define __CELLULAR_CONFIG_H__
+/**************************************************/
+/******* DO NOT CHANGE the following order ********/
+/**************************************************/
+
+/* Include logging header files and define logging macros in the following order:
+ * 1. Include the header file "logging_levels.h".
+ * 2. Define the LIBRARY_LOG_NAME and LIBRARY_LOG_LEVEL macros depending on
+ * the logging configuration for DEMO.
+ * 3. Include the header file "logging_stack.h", if logging is enabled for DEMO.
+ */
+
+#include "logging_levels.h"
+
+/* Logging configuration for the Demo. */
+#ifndef LIBRARY_LOG_NAME
+ #define LIBRARY_LOG_NAME "CellularLib"
+#endif
+
+#ifndef LIBRARY_LOG_LEVEL
+ #define LIBRARY_LOG_LEVEL LOG_INFO
+#endif
+
+/* Prototype for the function used to print to console on Windows simulator
+ * of FreeRTOS.
+ * The function prints to the console before the network is connected;
+ * then a UDP port after the network has connected. */
+extern void vLoggingPrintf( const char * pcFormatString,
+ ... );
+
+/* Map the SdkLog macro to the logging function to enable logging
+ * on Windows simulator. */
+#ifndef SdkLog
+ #define SdkLog( message ) vLoggingPrintf message
+#endif
+
+#include "logging_stack.h"
+
+/************ End of logging configuration ****************/
+
/* This is a project specific file and is used to override config values defined
* in cellular_config_defaults.h. */
diff --git a/FreeRTOS-Plus/Source/Utilities/mbedtls_freertos/mbedtls_bio_freertos_cellular.c b/FreeRTOS-Plus/Source/Utilities/mbedtls_freertos/mbedtls_bio_freertos_cellular.c
index 7c4d916aa..829784b9a 100644
--- a/FreeRTOS-Plus/Source/Utilities/mbedtls_freertos/mbedtls_bio_freertos_cellular.c
+++ b/FreeRTOS-Plus/Source/Utilities/mbedtls_freertos/mbedtls_bio_freertos_cellular.c
@@ -33,6 +33,9 @@
#include "FreeRTOS.h"
#include "FreeRTOS_Sockets.h"
+/* Sockets wrapper includes. */
+#include "sockets_wrapper.h"
+
/* mbed TLS includes. */
#include "mbedtls_config.h"
#include "threading_alt.h"