/*-----------------------------------------------------------*/\r
\r
/*\r
- * Sets up the periodic ISR used for the RTOS tick.\r
+ * Sets up the periodic ISR used for the RTOS tick using the interval timer.\r
+ * The application writer can define configSETUP_TIMER_INTERRUPT() (in\r
+ * FreeRTOSConfig.h) such that their own tick interrupt configuration is used\r
+ * in place of prvSetupTimerInterrupt().\r
*/\r
static void prvSetupTimerInterrupt( void );\r
+#ifndef configSETUP_TIMER_INTERRUPT\r
+ /* The user has not provided their own tick interrupt configuration so use\r
+ the definition in this file (which uses the interval timer). */\r
+ #define configSETUP_TIMER_INTERRUPT() prvSetupTimerInterrupt()\r
+#endif /* configSETUP_TIMER_INTERRUPT */\r
\r
/*\r
* Defined in portasm.s87, this function starts the scheduler by loading the\r
first starts. */\r
*pxTopOfStack = ( portSTACK_TYPE ) portNO_CRITICAL_SECTION_NESTING;\r
\r
- /* Return a pointer to the top of the stack that has beene generated so it\r
+ /* Return a pointer to the top of the stack that has been generated so it\r
can be stored in the task control block for the task. */\r
return pxTopOfStack;\r
}\r
{\r
/* Setup the hardware to generate the tick. Interrupts are disabled when\r
this function is called. */\r
- prvSetupTimerInterrupt();\r
+ configSETUP_TIMER_INTERRUPT();\r
\r
/* Restore the context of the first task that is going to run. */\r
vPortStartFirstTask();\r
\r
- /* Execution should not reach here as the tasks are now running! */\r
+ /* Execution should not reach here as the tasks are now running!\r
+ prvSetupTimerInterrupt() is called here to prevent the compiler outputting\r
+ a warning about a statically declared function not being referenced in the\r
+ case that the application writer has provided their own tick interrupt\r
+ configuration routine (and defined configSETUP_TIMER_INTERRUPT() such that\r
+ their own routine will be called in place of prvSetupTimerInterrupt()). */\r
+ prvSetupTimerInterrupt();\r
return pdTRUE;\r
}\r
/*-----------------------------------------------------------*/\r
\r
void vPortEndScheduler( void )\r
{\r
- /* It is unlikely that the RL78/G13 port will get stopped. If required simply\r
- disable the tick interrupt here. */\r
+ /* It is unlikely that the RL78 port will get stopped. */\r
}\r
/*-----------------------------------------------------------*/\r
\r