Add event groups demo to SAM4E demo.
This commit is contained in:
parent
b7eb76904a
commit
853696a991
Binary file not shown.
@ -557,6 +557,10 @@
|
|||||||
<SubType>compile</SubType>
|
<SubType>compile</SubType>
|
||||||
<Link>src\FreeRTOS+\FreeRTOS+FAT SL\PSP\Target\RTC\psp_rtc.c</Link>
|
<Link>src\FreeRTOS+\FreeRTOS+FAT SL\PSP\Target\RTC\psp_rtc.c</Link>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="..\..\Source\event_groups.c">
|
||||||
|
<SubType>compile</SubType>
|
||||||
|
<Link>src\FreeRTOS\event_groups.c</Link>
|
||||||
|
</Compile>
|
||||||
<Compile Include="..\Common\Minimal\blocktim.c">
|
<Compile Include="..\Common\Minimal\blocktim.c">
|
||||||
<SubType>compile</SubType>
|
<SubType>compile</SubType>
|
||||||
<Link>src\Common Demo Tasks\blocktim.c</Link>
|
<Link>src\Common Demo Tasks\blocktim.c</Link>
|
||||||
@ -569,6 +573,10 @@
|
|||||||
<SubType>compile</SubType>
|
<SubType>compile</SubType>
|
||||||
<Link>src\Common Demo Tasks\dynamic.c</Link>
|
<Link>src\Common Demo Tasks\dynamic.c</Link>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="..\Common\Minimal\EventGroupsDemo.c">
|
||||||
|
<SubType>compile</SubType>
|
||||||
|
<Link>src\Common Demo Tasks\EventGroupsDemo.c</Link>
|
||||||
|
</Compile>
|
||||||
<Compile Include="..\Common\Minimal\flash_timer.c">
|
<Compile Include="..\Common\Minimal\flash_timer.c">
|
||||||
<SubType>compile</SubType>
|
<SubType>compile</SubType>
|
||||||
<Link>src\Common Demo Tasks\flash_timer.c</Link>
|
<Link>src\Common Demo Tasks\flash_timer.c</Link>
|
||||||
|
@ -143,6 +143,8 @@ to exclude the API function. */
|
|||||||
#define INCLUDE_vTaskSuspend 1
|
#define INCLUDE_vTaskSuspend 1
|
||||||
#define INCLUDE_vTaskDelayUntil 1
|
#define INCLUDE_vTaskDelayUntil 1
|
||||||
#define INCLUDE_vTaskDelay 1
|
#define INCLUDE_vTaskDelay 1
|
||||||
|
#define INCLUDE_eTaskGetState 1
|
||||||
|
#define INCLUDE_xTimerPendFunctionCall 1
|
||||||
|
|
||||||
/* Cortex-M specific definitions. */
|
/* Cortex-M specific definitions. */
|
||||||
#ifdef __NVIC_PRIO_BITS
|
#ifdef __NVIC_PRIO_BITS
|
||||||
|
@ -135,6 +135,7 @@
|
|||||||
#include "QueueOverwrite.h"
|
#include "QueueOverwrite.h"
|
||||||
#include "QueueSet.h"
|
#include "QueueSet.h"
|
||||||
#include "recmutex.h"
|
#include "recmutex.h"
|
||||||
|
#include "EventGroupsDemo.h"
|
||||||
|
|
||||||
/* The period after which the check timer will expire, in ms, provided no errors
|
/* The period after which the check timer will expire, in ms, provided no errors
|
||||||
have been reported by any of the standard demo tasks. ms are converted to the
|
have been reported by any of the standard demo tasks. ms are converted to the
|
||||||
@ -178,10 +179,11 @@ http://www.FreeRTOS.org/udp */
|
|||||||
#define mainCONNECTED_IP_TASK_PRIORITY ( configMAX_PRIORITIES - 1 )
|
#define mainCONNECTED_IP_TASK_PRIORITY ( configMAX_PRIORITIES - 1 )
|
||||||
#define mainDISCONNECTED_IP_TASK_PRIORITY ( tskIDLE_PRIORITY )
|
#define mainDISCONNECTED_IP_TASK_PRIORITY ( tskIDLE_PRIORITY )
|
||||||
|
|
||||||
/* UDP command server task parameters. */
|
/* UDP command server and echo task parameters. */
|
||||||
#define mainUDP_CLI_TASK_PRIORITY ( tskIDLE_PRIORITY )
|
#define mainUDP_CLI_TASK_PRIORITY ( tskIDLE_PRIORITY )
|
||||||
#define mainUDP_CLI_PORT_NUMBER ( 5001UL )
|
#define mainUDP_CLI_PORT_NUMBER ( 5001UL )
|
||||||
#define mainUDP_CLI_TASK_STACK_SIZE ( configMINIMAL_STACK_SIZE * 2U )
|
#define mainUDP_CLI_TASK_STACK_SIZE ( configMINIMAL_STACK_SIZE * 2U )
|
||||||
|
#define mainECHO_CLIENT_STACK_SIZE ( configMINIMAL_STACK_SIZE + 30 )
|
||||||
|
|
||||||
/* Set to 1 to include the UDP echo client tasks in the build. The echo clients
|
/* Set to 1 to include the UDP echo client tasks in the build. The echo clients
|
||||||
require the IP address of the echo server to be defined using the
|
require the IP address of the echo server to be defined using the
|
||||||
@ -293,6 +295,7 @@ TimerHandle_t xTimer = NULL;
|
|||||||
vStartQueueOverwriteTask( mainQUEUE_OVERWRITE_TASK_PRIORITY );
|
vStartQueueOverwriteTask( mainQUEUE_OVERWRITE_TASK_PRIORITY );
|
||||||
vStartQueueSetTasks();
|
vStartQueueSetTasks();
|
||||||
vStartRecursiveMutexTasks();
|
vStartRecursiveMutexTasks();
|
||||||
|
vStartEventGroupTasks();
|
||||||
|
|
||||||
/* Create the software timer that performs the 'check' functionality, as
|
/* Create the software timer that performs the 'check' functionality, as
|
||||||
described at the top of this file. */
|
described at the top of this file. */
|
||||||
@ -365,6 +368,10 @@ unsigned long ulErrorOccurred = pdFALSE;
|
|||||||
{
|
{
|
||||||
ulErrorOccurred |= ( 0x01UL << 12UL );
|
ulErrorOccurred |= ( 0x01UL << 12UL );
|
||||||
}
|
}
|
||||||
|
else if( xAreEventGroupTasksStillRunning() != pdTRUE )
|
||||||
|
{
|
||||||
|
ulErrorOccurred |= ( 0x01UL << 13UL );
|
||||||
|
}
|
||||||
|
|
||||||
if( ulErrorOccurred != pdFALSE )
|
if( ulErrorOccurred != pdFALSE )
|
||||||
{
|
{
|
||||||
@ -422,7 +429,7 @@ char cIPAddress[ 20 ];
|
|||||||
address of the echo server to be defined using the
|
address of the echo server to be defined using the
|
||||||
configECHO_SERVER_ADDR0 to configECHO_SERVER_ADDR3 constants in
|
configECHO_SERVER_ADDR0 to configECHO_SERVER_ADDR3 constants in
|
||||||
FreeRTOSConfig.h. */
|
FreeRTOSConfig.h. */
|
||||||
vStartEchoClientTasks( configMINIMAL_STACK_SIZE, tskIDLE_PRIORITY );
|
vStartEchoClientTasks( mainECHO_CLIENT_STACK_SIZE, tskIDLE_PRIORITY );
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@ -487,6 +494,9 @@ void vFullDemoTickHook( void )
|
|||||||
|
|
||||||
/* Call the periodic queue set ISR test function. */
|
/* Call the periodic queue set ISR test function. */
|
||||||
vQueueSetAccessQueueSetFromISR();
|
vQueueSetAccessQueueSetFromISR();
|
||||||
|
|
||||||
|
/* Call the event group ISR tests. */
|
||||||
|
vPeriodicEventGroupsProcessing();
|
||||||
}
|
}
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user