/*\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
FEATURES AND PORTS ARE ADDED TO FREERTOS ALL THE TIME. PLEASE VISIT\r
***************************************************************************\r
\r
\r
- http://www.FreeRTOS.org - Documentation, books, training, latest versions, \r
+ http://www.FreeRTOS.org - Documentation, books, training, latest versions,\r
license and Real Time Engineers Ltd. contact details.\r
\r
http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,\r
including FreeRTOS+Trace - an indispensable productivity tool, and our new\r
fully thread aware and reentrant UDP/IP stack.\r
\r
- http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High \r
- Integrity Systems, who sell the code with commercial support, \r
+ http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High\r
+ Integrity Systems, who sell the code with commercial support,\r
indemnification and middleware, under the OpenRTOS brand.\r
- \r
- http://www.SafeRTOS.com - High Integrity Systems also provide a safety \r
- engineered and independently SIL3 certified version for use in safety and \r
+\r
+ http://www.SafeRTOS.com - High Integrity Systems also provide a safety\r
+ engineered and independently SIL3 certified version for use in safety and\r
mission critical applications that require provable dependability.\r
*/\r
\r
/* This variable is incremented each time the demo timer expires. */\r
static volatile unsigned long ulDemoSoftwareTimerCounter = 0UL;\r
\r
-/* RL78/G13 Option Byte Definition. Watchdog disabled, LVI enabled, OCD interface\r
+/* RL78 Option Byte Definition. Watchdog disabled, LVI enabled, OCD interface\r
enabled. */\r
__root __far const unsigned char OptionByte[] @ 0x00C0 =\r
{\r
- WATCHDOG_DISABLED, LVI_ENABLED, RESERVED_FF, OCD_ENABLED\r
+ 0x6eU, 0xffU, 0xe8U, 0x85U\r
};\r
\r
/* Security byte definition */\r
\r
/* Create the RegTest tasks as described at the top of this file. */\r
xTaskCreate( vRegTest1, "Reg1", configMINIMAL_STACK_SIZE, NULL, 0, NULL );\r
- xTaskCreate( vRegTest2, "Reg2", configMINIMAL_STACK_SIZE, NULL, 0, NULL ); \r
+ xTaskCreate( vRegTest2, "Reg2", configMINIMAL_STACK_SIZE, NULL, 0, NULL );\r
\r
/* Create the software timer that performs the 'check' functionality,\r
as described at the top of this file. */\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
+\r
/* Create the software timer that just increments a variable for demo\r
purposes. */\r
xDemoTimer = xTimerCreate( "DemoTimer",/* A text name, purely to help debugging. */\r
( void * ) 0, /* The ID is not used, so can be set to anything. */\r
prvDemoTimerCallback /* The callback function that inspects the status of all the other tasks. */\r
);\r
- \r
+\r
/* Start both the check timer and the demo timer. The timers won't actually\r
start until the scheduler is started. */\r
xTimerStart( xCheckTimer, mainDONT_BLOCK );\r
xTimerStart( xDemoTimer, mainDONT_BLOCK );\r
- \r
+\r
/* Finally start the scheduler running. */\r
vTaskStartScheduler();\r
\r
{\r
xErrorStatus = pdFAIL;\r
}\r
- \r
+\r
if( xArePollingQueuesStillRunning() != pdTRUE )\r
{\r
xErrorStatus = pdFAIL;\r
}\r
- \r
+\r
if( xAreBlockTimeTestTasksStillRunning() != pdTRUE )\r
{\r
xErrorStatus = pdFAIL;\r
{\r
xErrorStatus = pdFAIL;\r
}\r
- \r
+\r
/* Ensure that the demo software timer has expired\r
mainDEMO_TIMER_INCREMENTS_PER_CHECK_TIMER_TIMEOUT times in between\r
each call of this function. A critical section is not required to access\r
{\r
ulDemoSoftwareTimerCounter = 0UL;\r
}\r
- \r
+\r
if( ( xErrorStatus == pdFAIL ) && ( xChangedTimerPeriodAlready == pdFALSE ) )\r
{\r
/* An error has occurred, but the timer's period has not yet been changed,\r
timer's period means the LED will toggle at a faster rate, giving a\r
visible indication that something has gone wrong. */\r
xChangedTimerPeriodAlready = pdTRUE;\r
- \r
+\r
/* This call to xTimerChangePeriod() uses a zero block time. Functions\r
called from inside of a timer callback function must *never* attempt to\r
block. */\r
xTimerChangePeriod( xCheckTimer, ( mainERROR_CHECK_TIMER_PERIOD_MS ), mainDONT_BLOCK );\r
}\r
- \r
+\r
/* Toggle the LED. The toggle rate will depend on whether or not an error\r
has been found in any tasks. */\r
mainLED_0 = !mainLED_0;\r
/* Set fMX */\r
CMC = 0x00;\r
MSTOP = 1U;\r
- \r
+\r
/* Set fMAIN */\r
MCM0 = 0U;\r
- \r
+\r
/* Set fSUB */\r
XTSTOP = 1U;\r
OSMC = 0x10;\r
- \r
+\r
/* Set fCLK */\r
CSS = 0U;\r
- \r
+\r
/* Set fIH */\r
HIOSTOP = 0U;\r
}\r
#else\r
{\r
- unsigned char ucTempStabset, ucTempStabWait; \r
+ unsigned char ucTempStabset, ucTempStabWait;\r
\r
/* Set fMX */\r
CMC = 0x41;\r
OSTS = 0x07;\r
MSTOP = 0U;\r
ucTempStabset = 0xFF;\r
- \r
+\r
do\r
{\r
ucTempStabWait = OSTC;\r
ucTempStabWait &= ucTempStabset;\r
}\r
while( ucTempStabWait != ucTempStabset );\r
- \r
+\r
/* Set fMAIN */\r
MCM0 = 1U;\r
- \r
+\r
/* Set fSUB */\r
XTSTOP = 1U;\r
OSMC = 0x10;\r
- \r
+\r
/* Set fCLK */\r
CSS = 0U;\r
- \r
+\r
/* Set fIH */\r
HIOSTOP = 0U;\r
}\r
#endif /* configCLOCK_SOURCE == 1 */\r
- \r
+\r
/* LED port initialization - set port register. */\r
P7 &= 0x7F;\r
- \r
+\r
/* Set port mode register. */\r
PM7 &= 0x7F;\r
- \r
+\r
/* Switch pin initialization - enable pull-up resistor. */\r
PU12_bit.no0 = 1;\r
\r
management options. If there is a lot of heap memory free then the\r
configTOTAL_HEAP_SIZE value in FreeRTOSConfig.h can be reduced to free up\r
RAM. */\r
- xFreeHeapSpace = xPortGetFreeHeapSize(); \r
+ xFreeHeapSpace = xPortGetFreeHeapSize();\r
}\r
\r