]> git.sur5r.net Git - freertos/commitdiff
Add event groups demo to SAM4E demo.
authorrtel <rtel@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Sun, 16 Feb 2014 22:03:39 +0000 (22:03 +0000)
committerrtel <rtel@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Sun, 16 Feb 2014 22:03:39 +0000 (22:03 +0000)
git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@2206 1d2547de-c912-0410-9cb9-b8ca96c0e9e2

FreeRTOS/Demo/CORTEX_M4_ATSAM4E_Atmel_Studio/RTOSDemo.atsuo
FreeRTOS/Demo/CORTEX_M4_ATSAM4E_Atmel_Studio/RTOSDemo.cproj
FreeRTOS/Demo/CORTEX_M4_ATSAM4E_Atmel_Studio/src/config/FreeRTOSConfig.h
FreeRTOS/Demo/CORTEX_M4_ATSAM4E_Atmel_Studio/src/main_full.c

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