/*\r
- FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. \r
+ FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd.\r
All rights reserved\r
\r
VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.\r
{\r
/* Start the two application specific demo tasks, as described in the\r
comments at the top of this file. */\r
- xTaskCreate( prvQueueReceiveTask, ( signed char * ) "Rx", configMINIMAL_STACK_SIZE, NULL, mainQUEUE_RECEIVE_TASK_PRIORITY, NULL );\r
- xTaskCreate( prvQueueSendTask, ( signed char * ) "TX", configMINIMAL_STACK_SIZE, NULL, mainQUEUE_SEND_TASK_PRIORITY, NULL );\r
+ xTaskCreate( prvQueueReceiveTask, "Rx", configMINIMAL_STACK_SIZE, NULL, mainQUEUE_RECEIVE_TASK_PRIORITY, NULL );\r
+ xTaskCreate( prvQueueSendTask, "TX", configMINIMAL_STACK_SIZE, NULL, mainQUEUE_SEND_TASK_PRIORITY, NULL );\r
\r
/* Create the software timer that is responsible for turning off the LED\r
if the button is not pushed within 5000ms, as described at the top of\r
this file. */\r
- xLEDTimer = xTimerCreate( ( const signed char * ) "LEDTimer", /* A text name, purely to help debugging. */\r
- ( mainLED_TIMER_PERIOD_MS ), /* The timer period, in this case 5000ms (5s). */\r
- pdFALSE, /* This is a one shot timer, so xAutoReload is set to pdFALSE. */\r
- ( void * ) 0, /* The ID is not used, so can be set to anything. */\r
- prvLEDTimerCallback /* The callback function that switches the LED off. */\r
+ xLEDTimer = xTimerCreate( "LEDTimer", /* A text name, purely to help debugging. */\r
+ ( mainLED_TIMER_PERIOD_MS ),/* The timer period, in this case 5000ms (5s). */\r
+ pdFALSE, /* This is a one shot timer, so xAutoReload is set to pdFALSE. */\r
+ ( void * ) 0, /* The ID is not used, so can be set to anything. */\r
+ prvLEDTimerCallback /* The callback function that switches the LED off. */\r
);\r
\r
/* Create the software timer that performs the 'check' functionality,\r
as described at the top of this file. */\r
- xCheckTimer = xTimerCreate( ( const signed char * ) "CheckTimer",/* A text name, purely to help debugging. */\r
- ( mainCHECK_TIMER_PERIOD_MS ), /* The timer period, in this case 3000ms (3s). */\r
- pdTRUE, /* This is an auto-reload timer, so xAutoReload is set to pdTRUE. */\r
- ( void * ) 0, /* The ID is not used, so can be set to anything. */\r
- prvCheckTimerCallback /* The callback function that inspects the status of all the other tasks. */\r
+ xCheckTimer = xTimerCreate( "CheckTimer", /* A text name, purely to help debugging. */\r
+ ( mainCHECK_TIMER_PERIOD_MS ), /* The timer period, in this case 3000ms (3s). */\r
+ pdTRUE, /* This is an auto-reload timer, so xAutoReload is set to pdTRUE. */\r
+ ( void * ) 0, /* The ID is not used, so can be set to anything. */\r
+ prvCheckTimerCallback /* The callback function that inspects the status of all the other tasks. */\r
);\r
\r
/* Create the software timer that performs the 'digit counting'\r
functionality, as described at the top of this file. */\r
- xDigitCounterTimer = xTimerCreate( ( const signed char * ) "DigitCounter", /* A text name, purely to help debugging. */\r
- ( mainDIGIT_COUNTER_TIMER_PERIOD_MS ), /* The timer period, in this case 3000ms (3s). */\r
- pdTRUE, /* This is an auto-reload timer, so xAutoReload is set to pdTRUE. */\r
- ( void * ) 0, /* The ID is not used, so can be set to anything. */\r
- prvDigitCounterTimerCallback /* The callback function that inspects the status of all the other tasks. */\r
- ); \r
- \r
+ xDigitCounterTimer = xTimerCreate( "DigitCounter", /* A text name, purely to help debugging. */\r
+ ( mainDIGIT_COUNTER_TIMER_PERIOD_MS ), /* The timer period, in this case 3000ms (3s). */\r
+ pdTRUE, /* This is an auto-reload timer, so xAutoReload is set to pdTRUE. */\r
+ ( void * ) 0, /* The ID is not used, so can be set to anything. */\r
+ prvDigitCounterTimerCallback /* The callback function that inspects the status of all the other tasks. */\r
+ );\r
+\r
/* Create a lot of 'standard demo' tasks. Over 40 tasks are created in\r
this demo. For a much simpler demo, select the 'blinky' build\r
configuration. */\r
vStartPolledQueueTasks( mainQUEUE_POLL_PRIORITY );\r
vStartCountingSemaphoreTasks();\r
vStartDynamicPriorityTasks();\r
- \r
+\r
/* The suicide tasks must be created last, as they need to know how many\r
tasks were running prior to their creation in order to ascertain whether\r
or not the correct/expected number of tasks are running at any given\r
{\r
pcStatusMessage = "Error: ComTest\r\n";\r
}\r
- \r
+\r
if( xAreTimerDemoTasksStillRunning( ( mainCHECK_TIMER_PERIOD_MS ) ) != pdTRUE )\r
{\r
pcStatusMessage = "Error: TimerDemo";\r
{\r
pcStatusMessage = "Error: CountSem";\r
}\r
- \r
+\r
if( xAreDynamicPriorityTasksStillRunning() != pdTRUE )\r
{\r
pcStatusMessage = "Error: DynamicPriority";\r
}\r
- \r
+\r
/* Toggle the check LED to give an indication of the system status. If\r
the LED toggles every mainCHECK_TIMER_PERIOD_MS milliseconds then\r
everything is ok. A faster toggle indicates an error. vParTestToggleLED()\r
the state of the check LED. A critical section is not required to access\r
the port as only one timer can be executing at any one time. */\r
usCheckLEDState = ( FM3_GPIO->PDOR3 & mainCHECK_LED );\r
- \r
+\r
/* Display the next number, counting up. */\r
FM3_GPIO->PDOR3 = usNumbersPatterns[ lCounter ] | usCheckLEDState;\r
\r
- /* Move onto the next digit. */ \r
+ /* Move onto the next digit. */\r
lCounter++;\r
- \r
+\r
/* Ensure the counter does not go off the end of the array. */\r
if( lCounter >= lNumberOfDigits )\r
{\r
SystemCoreClockUpdate();\r
\r
/* Initialise the IO used for the LEDs on the 7 segment displays. */\r
- vParTestInitialise(); \r
- \r
+ vParTestInitialise();\r
+\r
/* Set the switches to input (P18->P1F). */\r
FM3_GPIO->DDR5 = 0x0000;\r
FM3_GPIO->PFR5 = 0x0000;\r
\r
/* Assign the button input as GPIO. */\r
FM3_GPIO->PFR5 |= usButtonInputBit;\r
- \r
+\r
/* Button interrupt on falling edge. */\r
FM3_EXTI->ELVR = 0x0003;\r
\r
\r
/* Enable the button interrupt. */\r
FM3_EXTI->ENIR |= usButtonInputBit;\r
- \r
+\r
/* Setup the GPIO and the NVIC for the switch used in this simple demo. */\r
NVIC_SetPriority( EXINT0_7_IRQn, configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY );\r
NVIC_EnableIRQ( EXINT0_7_IRQn );\r
/* Call the periodic timer test, which tests the timer API functions that\r
can be called from an ISR. */\r
vTimerPeriodicISRTests();\r
-} \r
+}\r
/*-----------------------------------------------------------*/\r
\r