]> git.sur5r.net Git - freertos/blobdiff - FreeRTOS/Demo/CORTEX_EFM32_Gecko_Starter_Kit_Simplicity_Studio/Source/Low_Power_Demo/main_low_power.c
Add Pearl Gecko demo.
[freertos] / FreeRTOS / Demo / CORTEX_EFM32_Gecko_Starter_Kit_Simplicity_Studio / Source / Low_Power_Demo / main_low_power.c
index fe4824d8c6c90bb7dfbddbbe61bc084d4c6f62c4..3fffc65aec585b25355f26fa30d9e432cbc888ce 100644 (file)
@@ -1,5 +1,5 @@
 /*\r
-    FreeRTOS V8.2.3 - Copyright (C) 2015 Real Time Engineers Ltd.\r
+    FreeRTOS V9.0.0rc1 - Copyright (C) 2016 Real Time Engineers Ltd.\r
     All rights reserved\r
 \r
     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.\r
  * NOTE 1:  This project provides two demo applications.  A simple blinky demo\r
  * that demonstrates tickless low power operation, and a more comprehensive\r
  * test and demo application.  The configCREATE_LOW_POWER_DEMO setting in\r
- * FreeRTOSConfig.h is used to select between the two.  See the notes on using\r
- * configCREATE_LOW_POWER_DEMO in main.c.  This file implements the low power\r
- * version.\r
+ * FreeRTOSConfig.h is used to select between the two, and to select the clock\r
+ * used when tickless low power operation is demonstrated.  See the notes on\r
+ * using configCREATE_LOW_POWER_DEMO in main.c.  This file implements the low\r
+ * power version.\r
  *\r
  * NOTE 2:  This file only contains the source code that is specific to the\r
  * low power demo.  Generic functions, such FreeRTOS hook functions, and\r
  * main_low_power() creates one queue, and two tasks.  It then starts the\r
  * scheduler.\r
  *\r
- * TBD\r
+ * The Queue Send Task:\r
+ * The queue send task is implemented by the prvQueueSendTask() function in\r
+ * this file.  It sends the value 100 to the queue every second.\r
+ *\r
+ * The Queue Receive Task:\r
+ * The queue receive task is implemented by the prvQueueReceiveTask() function\r
+ * in this file.  prvQueueReceiveTask() blocks on the queue, blipping (quickly\r
+ * turn on then off again) the LED each time it received the value 100 from the\r
+ * queue send task.  The queue send task writes to the queue every second, so\r
+ * the LED will blip once a second.\r
+ *\r
+ * The RTOS tick is turned off when the queue send task and queue receive task\r
+ * are both in the Blocked state.\r
+ *\r
  */\r
 \r
-#warning Description of demo in comments above is not correct.\r
 \r
 /* Kernel includes. */\r
 #include "FreeRTOS.h"\r
@@ -211,7 +224,7 @@ const TickType_t xShortDelay = pdMS_TO_TICKS( 10 );
                if( ulReceivedValue == ulExpectedValue )\r
                {\r
                        /* Turn the LED on for a brief time only so it doens't distort the\r
-                       enerty reading. */\r
+                       energy reading. */\r
                        BSP_LedSet( mainTASK_LED );\r
                        vTaskDelay( xShortDelay );\r
                        BSP_LedClear( mainTASK_LED );\r