Skip to content

Commit

Permalink
Merge pull request #16 from FreeRTOS/adamds/device_advisor_integration
Browse files Browse the repository at this point in the history
Adamds/device advisor integration
  • Loading branch information
adam-scislowicz authored May 16, 2022
2 parents 62abee5 + 09ce7b4 commit 89105ea
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 25 deletions.
51 changes: 26 additions & 25 deletions examples/evkbmimxrt1060/test/app_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@
#include "test_execution_config.h"


#define appmainRUN_DEVICE_ADVISOR_TEST_SUITE ( 0 )

#define appmainPROVISIONING_MODE ( 0 )


Expand Down Expand Up @@ -70,6 +68,32 @@ extern void vCLITask( void * pvParam );

extern void vOTAUpdateTask( void * pvParam );

int RunDeviceAdvisorDemo( void )
{
BaseType_t xResult = pdFAIL;

if( xGetMQTTAgentState() < MQTT_AGENT_STATE_INITIALIZED )
{
xResult = xMQTTAgentInit( appmainMQTT_AGENT_TASK_STACK_SIZE, appmainMQTT_AGENT_TASK_PRIORITY );
}
else
{
xResult = pdPASS;
}

if( xResult == pdPASS )
{
xResult = xTaskCreate( vSubscribePublishTestTask,
"TEST",
appmainTEST_TASK_STACK_SIZE,
NULL,
appmainTEST_TASK_PRIORITY,
NULL );
}

return ( xResult == pdPASS ) ? 0 : -1;
}

int app_main( void )
{
BaseType_t xResult = pdFAIL;
Expand Down Expand Up @@ -126,28 +150,5 @@ int app_main( void )
}
}



#if ( appmainRUN_DEVICE_ADVISOR_TEST_SUITE == 1 )
{
if( xResult == pdPASS )
{
xResult = xMQTTAgentInit( appmainMQTT_AGENT_TASK_STACK_SIZE, appmainMQTT_AGENT_TASK_PRIORITY );
}

if( xResult == pdPASS )
{
xResult = xTaskCreate( vSubscribePublishTestTask,
"TEST",
appmainTEST_TASK_STACK_SIZE,
NULL,
appmainTEST_TASK_PRIORITY,
NULL );
}
}
#endif /* if ( appmainRUN_DEVICE_ADVISOR_TEST_SUITE == 1 ) */



return pdPASS;
}
7 changes: 7 additions & 0 deletions examples/evkbmimxrt1060/test/include/test_execution_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,13 @@
#ifndef TEST_EXECUTION_CONFIG_H
#define TEST_EXECUTION_CONFIG_H

/**
* @brief Configuration to enable Device Advisor testing.
*
* #define DEVICE_ADVISOR_TEST_ENABLED (0)
*/
#define DEVICE_ADVISOR_TEST_ENABLED ( 0 )

/**
* @brief Configuration to enable the MQTT test.
*
Expand Down

0 comments on commit 89105ea

Please sign in to comment.