/*\r
- FreeRTOS V8.2.3 - Copyright (C) 2015 Real Time Engineers Ltd.\r
+ FreeRTOS V9.0.0rc2 - Copyright (C) 2016 Real Time Engineers Ltd.\r
All rights reserved\r
\r
VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.\r
/* Constants required to set up the initial stack. */\r
#define portINITIAL_XPSR ( 0x01000000 )\r
\r
-/* Constants used with memory barrier intrinsics. */\r
-#define portSY_FULL_READ_WRITE ( 15 )\r
-\r
/* The systick is a 24-bit counter. */\r
#define portMAX_24_BIT_NUMBER ( 0xffffffUL )\r
\r
}\r
/*-----------------------------------------------------------*/\r
\r
-void vPortYield( void )\r
-{\r
- /* Set a PendSV to request a context switch. */\r
- portNVIC_INT_CTRL_REG = portNVIC_PENDSVSET_BIT;\r
-\r
- /* Barriers are normally not required but do ensure the code is completely\r
- within the specified behaviour for the architecture. */\r
- __dsb( portSY_FULL_READ_WRITE );\r
- __isb( portSY_FULL_READ_WRITE );\r
-}\r
-/*-----------------------------------------------------------*/\r
-\r
void vPortEnterCritical( void )\r
{\r
portDISABLE_INTERRUPTS();\r
uxCriticalNesting++;\r
- __dsb( portSY_FULL_READ_WRITE );\r
- __isb( portSY_FULL_READ_WRITE );\r
\r
/* This is not the interrupt safe version of the enter critical function so\r
assert() if it is being called from an interrupt context. Only API\r
stmdb sp!, {r3, r14}\r
mov r0, #configMAX_SYSCALL_INTERRUPT_PRIORITY\r
msr basepri, r0\r
+ dsb\r
+ isb\r
bl vTaskSwitchContext\r
mov r0, #0\r
msr basepri, r0\r
/* The SysTick runs at the lowest interrupt priority, so when this interrupt\r
executes all interrupts must be unmasked. There is therefore no need to\r
save and then restore the interrupt mask value as its value is already\r
- known. */\r
- ( void ) portSET_INTERRUPT_MASK_FROM_ISR();\r
+ known - therefore the slightly faster vPortRaiseBASEPRI() function is used\r
+ in place of portSET_INTERRUPT_MASK_FROM_ISR(). */\r
+ vPortRaiseBASEPRI();\r
{\r
/* Increment the RTOS tick. */\r
if( xTaskIncrementTick() != pdFALSE )\r
portNVIC_INT_CTRL_REG = portNVIC_PENDSVSET_BIT;\r
}\r
}\r
- portCLEAR_INTERRUPT_MASK_FROM_ISR( 0 );\r
+ vPortClearBASEPRIFromISR();\r
}\r
/*-----------------------------------------------------------*/\r
\r
#endif /* configOVERRIDE_DEFAULT_TICK_CONFIGURATION */\r
/*-----------------------------------------------------------*/\r
\r
-__asm uint32_t ulPortSetInterruptMask( void )\r
-{\r
- PRESERVE8\r
-\r
- mrs r0, basepri\r
- mov r1, #configMAX_SYSCALL_INTERRUPT_PRIORITY\r
- msr basepri, r1\r
- bx r14\r
-}\r
-/*-----------------------------------------------------------*/\r
-\r
-__asm void vPortClearInterruptMask( uint32_t ulNewMask )\r
-{\r
- PRESERVE8\r
-\r
- msr basepri, r0\r
- bx r14\r
-}\r
-/*-----------------------------------------------------------*/\r
-\r
__asm uint32_t vPortGetIPSR( void )\r
{\r
PRESERVE8\r