|
|
|
@ -40,15 +40,10 @@
|
|
|
|
|
/*
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* Scheduler includes. */
|
|
|
|
|
#include "FreeRTOS.h"
|
|
|
|
|
#include "task.h"
|
|
|
|
|
|
|
|
|
|
/* Constants required to handle interrupts. */
|
|
|
|
|
#define portTIMER_MATCH_ISR_BIT ( ( unsigned portCHAR ) 0x01 )
|
|
|
|
|
#define portCLEAR_VIC_INTERRUPT ( ( unsigned portLONG ) 0 )
|
|
|
|
|
|
|
|
|
|
/* Constants required to handle critical sections. */
|
|
|
|
|
#define portNO_CRITICAL_NESTING ( ( unsigned portLONG ) 0 )
|
|
|
|
|
|
|
|
|
@ -91,13 +86,11 @@ void vPortISRStartFirstTask( void )
|
|
|
|
|
\
|
|
|
|
|
/* And return - correcting the offset in the LR to obtain the */ \
|
|
|
|
|
/* correct address. */ \
|
|
|
|
|
"SUBS PC, LR, #4 \n\t" \
|
|
|
|
|
); \
|
|
|
|
|
"SUBS PC, LR, #4 \n\t" \
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
/*-----------------------------------------------------------*/
|
|
|
|
|
|
|
|
|
|
/* The preemptive scheduler is defined as "naked" as the full context is
|
|
|
|
|
saved on entry as part of the context switch. */
|
|
|
|
|
void vPortTickISR( void )
|
|
|
|
|
{
|
|
|
|
|
/* Increment the RTOS tick count, then look for the highest priority
|
|
|
|
@ -148,11 +141,8 @@ void vPortTickISR( void )
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endif /* THUMB_INTERWORK */
|
|
|
|
|
/*-----------------------------------------------------------*/
|
|
|
|
|
|
|
|
|
|
/* The code generated by the GCC compiler uses the stack in different ways at
|
|
|
|
|
different optimisation levels. The interrupt flags can therefore not always
|
|
|
|
|
be saved to the stack. Instead the critical section nesting level is stored
|
|
|
|
|
in a variable, which is then saved as part of the stack context. */
|
|
|
|
|
void vPortEnterCritical( void )
|
|
|
|
|
{
|
|
|
|
|
/* Disable interrupts as per portDISABLE_INTERRUPTS(); */
|
|
|
|
@ -168,6 +158,7 @@ void vPortEnterCritical( void )
|
|
|
|
|
portENTER_CRITICAL() has been called. */
|
|
|
|
|
ulCriticalNesting++;
|
|
|
|
|
}
|
|
|
|
|
/*-----------------------------------------------------------*/
|
|
|
|
|
|
|
|
|
|
void vPortExitCritical( void )
|
|
|
|
|
{
|
|
|
|
|