* in main.c. This file implements the simply blinky style version.\r
*\r
* NOTE 2: This file only contains the source code that is specific to the\r
- * basic demo. Generic functions, such FreeRTOS hook functions, and functions\r
+ * blinky demo. Generic functions, such FreeRTOS hook functions, and functions\r
* required to configure the hardware are defined in main.c.\r
******************************************************************************\r
*\r
* in this file. prvQueueReceiveTask() sits in a loop where it repeatedly\r
* blocks on attempts to read data from the queue that was created within\r
* main_blinky(). When data is received, the task checks the value of the\r
- * data, and if the value equals the expected 100, writes 'Blink' to the UART\r
- * (the UART is used in place of the LED to allow easy execution in QEMU). The\r
- * 'block time' parameter passed to the queue receive function specifies that\r
- * the task should be held in the Blocked state indefinitely to wait for data to\r
- * be available on the queue. The queue receive task will only leave the\r
- * Blocked state when the queue send task writes to the queue. As the queue\r
- * send task writes to the queue every 1000 milliseconds, the queue receive\r
- * task leaves the Blocked state every 1000 milliseconds, and therefore toggles\r
- * the LED every 200 milliseconds.\r
+ * data, and if the value equals the expected 100, toggles an LED. The 'block\r
+ * time' parameter passed to the queue receive function specifies that the task\r
+ * should be held in the Blocked state indefinitely to wait for data to be\r
+ * available on the queue. The queue receive task will only leave the Blocked\r
+ * state when the queue send task writes to the queue. As the queue send task\r
+ * writes to the queue every 1000 milliseconds, the queue receive task leaves\r
+ * the Blocked state every 1000 milliseconds, and therefore toggles the LED\r
+ * every 200 milliseconds.\r
*/\r
\r
/* Standard includes. */\r
file. */\r
xTaskCreate( prvQueueReceiveTask, /* The function that implements the task. */\r
"Rx", /* The text name assigned to the task - for debug only as it is not used by the kernel. */\r
- configMINIMAL_STACK_SIZE * 2U, /* The size of the stack to allocate to the task. */\r
+ configMINIMAL_STACK_SIZE, /* The size of the stack to allocate to the task. */\r
NULL, /* The parameter passed to the task - not used in this case. */\r
mainQUEUE_RECEIVE_TASK_PRIORITY, /* The priority assigned to the task. */\r
NULL ); /* The task handle is not required, so NULL is passed. */\r
\r
- xTaskCreate( prvQueueSendTask, "TX", configMINIMAL_STACK_SIZE * 2U, NULL, mainQUEUE_SEND_TASK_PRIORITY, NULL );\r
+ xTaskCreate( prvQueueSendTask, "TX", configMINIMAL_STACK_SIZE, NULL, mainQUEUE_SEND_TASK_PRIORITY, NULL );\r
\r
/* Start the tasks and timer running. */\r
vTaskStartScheduler();\r
{\r
unsigned long ulReceivedValue;\r
const unsigned long ulExpectedValue = 100UL;\r
-const char * const pcPassMessage = "Blink\r\n";\r
-const char * const pcFailMessage = "Unexpected value received\r\n";\r
extern void vToggleLED( void );\r
\r
/* Remove compiler warning about unused parameter. */\r
is it the expected value? If it is, toggle the LED. */\r
if( ulReceivedValue == ulExpectedValue )\r
{\r
- write( STDOUT_FILENO, pcPassMessage, strlen( pcPassMessage ) );\r
vToggleLED();\r
ulReceivedValue = 0U;\r
}\r
- else\r
- {\r
- write( STDOUT_FILENO, pcFailMessage, strlen( pcFailMessage ) );\r
- }\r
}\r
}\r
/*-----------------------------------------------------------*/\r