diff --git a/FreeRTOS-Plus/Demo/AWS/Device_Defender_Windows_Simulator/Device_Defender_Demo/DemoTasks/DefenderDemoExample.c b/FreeRTOS-Plus/Demo/AWS/Device_Defender_Windows_Simulator/Device_Defender_Demo/DemoTasks/DefenderDemoExample.c index 544f3f2e7..e6a704975 100644 --- a/FreeRTOS-Plus/Demo/AWS/Device_Defender_Windows_Simulator/Device_Defender_Demo/DemoTasks/DefenderDemoExample.c +++ b/FreeRTOS-Plus/Demo/AWS/Device_Defender_Windows_Simulator/Device_Defender_Demo/DemoTasks/DefenderDemoExample.c @@ -219,6 +219,10 @@ static uint32_t ulReportId = 0UL; /*-----------------------------------------------------------*/ +extern BaseType_t xPlatformIsNetworkUp( void ); + +/*-----------------------------------------------------------*/ + /** * @brief Callback to receive the incoming publish messages from the MQTT broker. * diff --git a/FreeRTOS-Plus/Demo/AWS/Device_Shadow_Windows_Simulator/Device_Shadow_Demo/DemoTasks/ShadowDemoMainExample.c b/FreeRTOS-Plus/Demo/AWS/Device_Shadow_Windows_Simulator/Device_Shadow_Demo/DemoTasks/ShadowDemoMainExample.c index 18451d9a2..a611d3f17 100644 --- a/FreeRTOS-Plus/Demo/AWS/Device_Shadow_Windows_Simulator/Device_Shadow_Demo/DemoTasks/ShadowDemoMainExample.c +++ b/FreeRTOS-Plus/Demo/AWS/Device_Shadow_Windows_Simulator/Device_Shadow_Demo/DemoTasks/ShadowDemoMainExample.c @@ -375,6 +375,10 @@ static BaseType_t prvWaitForDeleteResponse( MQTTContext_t * pxMQTTContext ); /*-----------------------------------------------------------*/ +extern BaseType_t xPlatformIsNetworkUp( void ); + +/*-----------------------------------------------------------*/ + static BaseType_t prvWaitForDeleteResponse( MQTTContext_t * pxMQTTContext ) { uint8_t ucCount = 0U; diff --git a/FreeRTOS-Plus/Demo/AWS/Jobs_Windows_Simulator/Jobs_Demo/DemoTasks/JobsDemoExample.c b/FreeRTOS-Plus/Demo/AWS/Jobs_Windows_Simulator/Jobs_Demo/DemoTasks/JobsDemoExample.c index 8b816c521..950fe30d0 100644 --- a/FreeRTOS-Plus/Demo/AWS/Jobs_Windows_Simulator/Jobs_Demo/DemoTasks/JobsDemoExample.c +++ b/FreeRTOS-Plus/Demo/AWS/Jobs_Windows_Simulator/Jobs_Demo/DemoTasks/JobsDemoExample.c @@ -388,7 +388,7 @@ static void prvSendUpdateForJob( char * pcJobId, static void prvProcessJobDocument( char * pcJobId, uint16_t usJobIdLength, char * pcJobDocument, - uint16_t jobDocumentLength ); + size_t uxJobDocumentLength ); /** * @brief The task used to demonstrate the Jobs library API. @@ -398,6 +398,9 @@ static void prvProcessJobDocument( char * pcJobId, */ void prvJobsDemoTask( void * pvParameters ); +/*-----------------------------------------------------------*/ + +extern BaseType_t xPlatformIsNetworkUp( void ); /*-----------------------------------------------------------*/ @@ -473,7 +476,7 @@ static void prvSendUpdateForJob( char * pcJobId, static void prvProcessJobDocument( char * pcJobId, uint16_t usJobIdLength, char * pcJobDocument, - uint16_t jobDocumentLength ) + size_t uxJobDocumentLength ) { char * pcAction = NULL; size_t uActionLength = 0U; @@ -482,10 +485,10 @@ static void prvProcessJobDocument( char * pcJobId, configASSERT( pcJobId != NULL ); configASSERT( usJobIdLength > 0 ); configASSERT( pcJobDocument != NULL ); - configASSERT( jobDocumentLength > 0 ); + configASSERT( uxJobDocumentLength > 0 ); xJsonStatus = JSON_Search( pcJobDocument, - jobDocumentLength, + uxJobDocumentLength, jobsexampleQUERY_KEY_FOR_ACTION, jobsexampleQUERY_KEY_FOR_ACTION_LENGTH, &pcAction, @@ -516,7 +519,7 @@ static void prvProcessJobDocument( char * pcJobId, LogInfo( ( "Received job contains \"print\" action." ) ); xJsonStatus = JSON_Search( pcJobDocument, - jobDocumentLength, + uxJobDocumentLength, jobsexampleQUERY_KEY_FOR_MESSAGE, jobsexampleQUERY_KEY_FOR_MESSAGE_LENGTH, &pcMessage, @@ -548,7 +551,7 @@ static void prvProcessJobDocument( char * pcJobId, size_t ulTopicLength = 0U; xJsonStatus = JSON_Search( pcJobDocument, - jobDocumentLength, + uxJobDocumentLength, jobsexampleQUERY_KEY_FOR_TOPIC, jobsexampleQUERY_KEY_FOR_TOPIC_LENGTH, &pcTopic, @@ -563,7 +566,7 @@ static void prvProcessJobDocument( char * pcJobId, else { xJsonStatus = JSON_Search( pcJobDocument, - jobDocumentLength, + uxJobDocumentLength, jobsexampleQUERY_KEY_FOR_MESSAGE, jobsexampleQUERY_KEY_FOR_MESSAGE_LENGTH, &pcMessage, @@ -968,8 +971,8 @@ void prvJobsDemoTask( void * pvParameters ) { /* Handler function to process Jobs message payload. */ prvNextJobHandler( pxJobMessagePublishInfo ); - vPortFree( pxJobMessagePublishInfo->pTopicName ); - vPortFree( pxJobMessagePublishInfo->pPayload ); + vPortFree( ( void * ) ( pxJobMessagePublishInfo->pTopicName ) ); + vPortFree( ( void * ) ( pxJobMessagePublishInfo->pPayload ) ); vPortFree( pxJobMessagePublishInfo ); } diff --git a/FreeRTOS-Plus/Demo/AWS/Jobs_Windows_Simulator/Jobs_Demo/main.c b/FreeRTOS-Plus/Demo/AWS/Jobs_Windows_Simulator/Jobs_Demo/main.c index f8ac23524..7a3ff3f2e 100644 --- a/FreeRTOS-Plus/Demo/AWS/Jobs_Windows_Simulator/Jobs_Demo/main.c +++ b/FreeRTOS-Plus/Demo/AWS/Jobs_Windows_Simulator/Jobs_Demo/main.c @@ -54,6 +54,7 @@ extern void prvJobsDemoTask( void * pvParameters ); extern void vPlatformInitLogging( void ); +extern void vPlatformInitIpStack( void ); /*-----------------------------------------------------------*/ diff --git a/FreeRTOS-Plus/Demo/AWS/Mqtt_Demo_Helpers/mqtt_demo_helpers.c b/FreeRTOS-Plus/Demo/AWS/Mqtt_Demo_Helpers/mqtt_demo_helpers.c index c7dde38a9..7e35306f4 100644 --- a/FreeRTOS-Plus/Demo/AWS/Mqtt_Demo_Helpers/mqtt_demo_helpers.c +++ b/FreeRTOS-Plus/Demo/AWS/Mqtt_Demo_Helpers/mqtt_demo_helpers.c @@ -363,6 +363,10 @@ static MQTTStatus_t prvProcessLoopWithTimeout( MQTTContext_t * pMqttContext, /*-----------------------------------------------------------*/ +extern UBaseType_t uxRand( void ); + +/*-----------------------------------------------------------*/ + static int32_t prvGenerateRandomNumber() { return( uxRand() & INT32_MAX ); diff --git a/FreeRTOS-Plus/Demo/Common/Logging/windows/Logging_WinSim.c b/FreeRTOS-Plus/Demo/Common/Logging/windows/Logging_WinSim.c index dd0c9a601..8f298d9e6 100644 --- a/FreeRTOS-Plus/Demo/Common/Logging/windows/Logging_WinSim.c +++ b/FreeRTOS-Plus/Demo/Common/Logging/windows/Logging_WinSim.c @@ -38,6 +38,7 @@ #include #include #include +#include #include #include @@ -209,7 +210,7 @@ void vLoggingInit( BaseType_t xLogToStdout, xLogStreamBuffer->LENGTH = dlLOGGING_STREAM_BUFFER_SIZE + 1; /* Create the Windows event. */ - pvLoggingThreadEvent = CreateEvent( NULL, FALSE, TRUE, "StdoutLoggingEvent" ); + pvLoggingThreadEvent = CreateEvent( NULL, FALSE, TRUE, L"StdoutLoggingEvent" ); /* Create the thread itself. */ Win32Thread = CreateThread(