|
|
@ -73,9 +73,9 @@
|
|
|
|
* This file implements the code that is not demo specific, including the
|
|
|
|
* This file implements the code that is not demo specific, including the
|
|
|
|
* hardware setup and FreeRTOS hook functions.
|
|
|
|
* hardware setup and FreeRTOS hook functions.
|
|
|
|
*
|
|
|
|
*
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* Additional code:
|
|
|
|
* Additional code:
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* This demo does not contain a non-kernel interrupt service routine that
|
|
|
|
* This demo does not contain a non-kernel interrupt service routine that
|
|
|
|
* can be used as an example for application writers to use as a reference.
|
|
|
|
* can be used as an example for application writers to use as a reference.
|
|
|
|
* Therefore, the framework of a dummy (not installed) handler is provided
|
|
|
|
* Therefore, the framework of a dummy (not installed) handler is provided
|
|
|
@ -110,9 +110,9 @@ or 0 to run the more comprehensive test and demo application. */
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
static void prvSetupHardware( void );
|
|
|
|
static void prvSetupHardware( void );
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
/*
|
|
|
|
* main_blinky() is used when mainCREATE_SIMPLE_BLINKY_DEMO_ONLY is set to 1.
|
|
|
|
* main_blinky() is used when mainCREATE_SIMPLE_BLINKY_DEMO_ONLY is set to 1.
|
|
|
|
* main_full() is used when mainCREATE_SIMPLE_BLINKY_DEMO_ONLY is set to 0.
|
|
|
|
* main_full() is used when mainCREATE_SIMPLE_BLINKY_DEMO_ONLY is set to 0.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
extern void main_blinky( void );
|
|
|
|
extern void main_blinky( void );
|
|
|
|
extern void main_full( void );
|
|
|
|
extern void main_full( void );
|
|
|
@ -195,7 +195,7 @@ void vApplicationStackOverflowHook( xTaskHandle pxTask, signed char *pcTaskName
|
|
|
|
|
|
|
|
|
|
|
|
void vApplicationTickHook( void )
|
|
|
|
void vApplicationTickHook( void )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
/* This function will be called by each tick interrupt if
|
|
|
|
/* This function will be called by each tick interrupt if
|
|
|
|
configUSE_TICK_HOOK is set to 1 in FreeRTOSConfig.h. User code can be
|
|
|
|
configUSE_TICK_HOOK is set to 1 in FreeRTOSConfig.h. User code can be
|
|
|
|
added here, but the tick hook is called from an interrupt context, so
|
|
|
|
added here, but the tick hook is called from an interrupt context, so
|
|
|
|
code must not attempt to block, and only the interrupt safe FreeRTOS API
|
|
|
|
code must not attempt to block, and only the interrupt safe FreeRTOS API
|
|
|
@ -211,19 +211,19 @@ long lHigherPriorityTaskWoken = pdFALSE;
|
|
|
|
|
|
|
|
|
|
|
|
/* Clear the interrupt if necessary. */
|
|
|
|
/* Clear the interrupt if necessary. */
|
|
|
|
Dummy_ClearITPendingBit();
|
|
|
|
Dummy_ClearITPendingBit();
|
|
|
|
|
|
|
|
|
|
|
|
/* This interrupt does nothing more than demonstrate how to synchronise a
|
|
|
|
/* This interrupt does nothing more than demonstrate how to synchronise a
|
|
|
|
task with an interrupt. A semaphore is used for this purpose. Note
|
|
|
|
task with an interrupt. A semaphore is used for this purpose. Note
|
|
|
|
lHigherPriorityTaskWoken is initialised to zero. */
|
|
|
|
lHigherPriorityTaskWoken is initialised to zero. */
|
|
|
|
xSemaphoreGiveFromISR( xTestSemaphore, &lHigherPriorityTaskWoken );
|
|
|
|
xSemaphoreGiveFromISR( xTestSemaphore, &lHigherPriorityTaskWoken );
|
|
|
|
|
|
|
|
|
|
|
|
/* If there was a task that was blocked on the semaphore, and giving the
|
|
|
|
/* If there was a task that was blocked on the semaphore, and giving the
|
|
|
|
semaphore caused the task to unblock, and the unblocked task has a priority
|
|
|
|
semaphore caused the task to unblock, and the unblocked task has a priority
|
|
|
|
higher than the current Running state task (the task that this interrupt
|
|
|
|
higher than the current Running state task (the task that this interrupt
|
|
|
|
interrupted), then lHigherPriorityTaskWoken will have been set to pdTRUE
|
|
|
|
interrupted), then lHigherPriorityTaskWoken will have been set to pdTRUE
|
|
|
|
internally within xSemaphoreGiveFromISR(). Passing pdTRUE into the
|
|
|
|
internally within xSemaphoreGiveFromISR(). Passing pdTRUE into the
|
|
|
|
portEND_SWITCHING_ISR() macro will result in a context switch being pended to
|
|
|
|
portEND_SWITCHING_ISR() macro will result in a context switch being pended to
|
|
|
|
ensure this interrupt returns directly to the unblocked, higher priority,
|
|
|
|
ensure this interrupt returns directly to the unblocked, higher priority,
|
|
|
|
task. Passing pdFALSE into portEND_SWITCHING_ISR() has no effect. */
|
|
|
|
task. Passing pdFALSE into portEND_SWITCHING_ISR() has no effect. */
|
|
|
|
portEND_SWITCHING_ISR( lHigherPriorityTaskWoken );
|
|
|
|
portEND_SWITCHING_ISR( lHigherPriorityTaskWoken );
|
|
|
|
}
|
|
|
|
}
|
|
|
|