mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-08-01 08:54:14 -04:00
Multiple tidy up, documentation corrections and typo corrections highlighted by Tamas Kleiber's diligent review.
This commit is contained in:
parent
2e42d7690a
commit
00ad1a0200
107 changed files with 518 additions and 430 deletions
|
@ -90,7 +90,7 @@
|
|||
#define portMAX_DELAY ( portTickType ) 0xffff
|
||||
#else
|
||||
typedef unsigned portLONG portTickType;
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffff
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffffUL
|
||||
#endif
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
|
|
@ -90,7 +90,7 @@
|
|||
#define portMAX_DELAY ( portTickType ) 0xffff
|
||||
#else
|
||||
typedef unsigned portLONG portTickType;
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffff
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffffUL
|
||||
#endif
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd.
|
||||
FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd.
|
||||
All rights reserved
|
||||
|
||||
VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.
|
||||
|
@ -258,8 +258,9 @@ portBASE_TYPE xPortStartScheduler(void)
|
|||
*/
|
||||
void vPortEndScheduler(void)
|
||||
{
|
||||
/* It is unlikely that the port will require this function as there
|
||||
is nothing to return to. */
|
||||
/* Not implemented in ports where there is nothing to return to.
|
||||
Artificially force an assert. */
|
||||
configASSERT( ulCriticalNesting == 1000UL );
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
|
|
@ -99,7 +99,7 @@
|
|||
#define portMAX_DELAY ( portTickType ) 0xffff
|
||||
#else
|
||||
typedef unsigned portLONG portTickType;
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffff
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffffUL
|
||||
#endif
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
|
|
@ -94,7 +94,7 @@ extern "C" {
|
|||
#define portMAX_DELAY ( portTickType ) 0xffff
|
||||
#else
|
||||
typedef unsigned portLONG portTickType;
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffff
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffffUL
|
||||
#endif
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
|
|
@ -94,7 +94,7 @@ extern "C" {
|
|||
#define portMAX_DELAY ( portTickType ) 0xffff
|
||||
#else
|
||||
typedef unsigned portLONG portTickType;
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffff
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffffUL
|
||||
#endif
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
|
|
@ -91,7 +91,7 @@
|
|||
#define portMAX_DELAY ( portTickType ) 0xffff
|
||||
#else
|
||||
typedef unsigned portLONG portTickType;
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffff
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffffUL
|
||||
#endif
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
|
|
@ -117,7 +117,7 @@ extern "C" {
|
|||
#define portMAX_DELAY ( portTickType ) 0xffff
|
||||
#else
|
||||
typedef unsigned portLONG portTickType;
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffff
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffffUL
|
||||
#endif
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
|
|
@ -117,7 +117,7 @@ extern "C" {
|
|||
#define portMAX_DELAY ( portTickType ) 0xffff
|
||||
#else
|
||||
typedef unsigned portLONG portTickType;
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffff
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffffUL
|
||||
#endif
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
|
|
@ -94,7 +94,7 @@ extern "C" {
|
|||
#define portMAX_DELAY ( portTickType ) 0xffff
|
||||
#else
|
||||
typedef unsigned portLONG portTickType;
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffff
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffffUL
|
||||
#endif
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
|
|
@ -117,7 +117,7 @@ extern "C" {
|
|||
#define portMAX_DELAY ( portTickType ) 0xffff
|
||||
#else
|
||||
typedef unsigned portLONG portTickType;
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffff
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffffUL
|
||||
#endif
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
|
|
@ -185,7 +185,7 @@ void vPortStartFirstTask( void )
|
|||
" pop {pc} \n" /* Finally, pop the PC to jump to the user defined task code. */
|
||||
" \n"
|
||||
" .align 2 \n"
|
||||
"pxCurrentTCBConst2: .word pxCurrentTCB "
|
||||
"pxCurrentTCBConst2: .word pxCurrentTCB "
|
||||
);
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
@ -208,7 +208,7 @@ portBASE_TYPE xPortStartScheduler( void )
|
|||
|
||||
/* Start the first task. */
|
||||
vPortStartFirstTask();
|
||||
|
||||
|
||||
/* Should never get here as the tasks will now be executing! Call the task
|
||||
exit error function to prevent compiler warnings about a static function
|
||||
not being called in the case that the application writer overrides this
|
||||
|
@ -222,8 +222,9 @@ portBASE_TYPE xPortStartScheduler( void )
|
|||
|
||||
void vPortEndScheduler( void )
|
||||
{
|
||||
/* It is unlikely that the CM0 port will require this function as there
|
||||
is nothing to return to. */
|
||||
/* Not implemented in ports where there is nothing to return to.
|
||||
Artificially force an assert. */
|
||||
configASSERT( uxCriticalNesting == 1000UL );
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
@ -250,6 +251,7 @@ void vPortEnterCritical( void )
|
|||
|
||||
void vPortExitCritical( void )
|
||||
{
|
||||
configASSERT( uxCriticalNesting );
|
||||
uxCriticalNesting--;
|
||||
if( uxCriticalNesting == 0 )
|
||||
{
|
||||
|
|
|
@ -95,7 +95,7 @@ extern "C" {
|
|||
#define portMAX_DELAY ( portTickType ) 0xffff
|
||||
#else
|
||||
typedef unsigned portLONG portTickType;
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffff
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffffUL
|
||||
#endif
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
|
|
@ -95,7 +95,7 @@ extern "C" {
|
|||
#define portMAX_DELAY ( portTickType ) 0xffff
|
||||
#else
|
||||
typedef unsigned portLONG portTickType;
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffff
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffffUL
|
||||
#endif
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd.
|
||||
FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd.
|
||||
All rights reserved
|
||||
|
||||
VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.
|
||||
|
@ -370,8 +370,9 @@ portBASE_TYPE xPortStartScheduler( void )
|
|||
|
||||
void vPortEndScheduler( void )
|
||||
{
|
||||
/* It is unlikely that the CM3 port will require this function as there
|
||||
is nothing to return to. */
|
||||
/* Not implemented in ports where there is nothing to return to.
|
||||
Artificially force an assert. */
|
||||
configASSERT( uxCriticalNesting == 1000UL );
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
@ -390,6 +391,7 @@ void vPortExitCritical( void )
|
|||
{
|
||||
portBASE_TYPE xRunningPrivileged = prvRaisePrivilege();
|
||||
|
||||
configASSERT( uxCriticalNesting );
|
||||
uxCriticalNesting--;
|
||||
if( uxCriticalNesting == 0 )
|
||||
{
|
||||
|
|
|
@ -95,7 +95,7 @@ extern "C" {
|
|||
#define portMAX_DELAY ( portTickType ) 0xffff
|
||||
#else
|
||||
typedef unsigned portLONG portTickType;
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffff
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffffUL
|
||||
#endif
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
|
|
@ -95,7 +95,7 @@ extern "C" {
|
|||
#define portMAX_DELAY ( portTickType ) 0xffff
|
||||
#else
|
||||
typedef unsigned portLONG portTickType;
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffff
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffffUL
|
||||
#endif
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
|
|
@ -101,7 +101,7 @@ extern "C" {
|
|||
#define portMAX_DELAY ( portTickType ) 0xffff
|
||||
#else
|
||||
typedef unsigned portLONG portTickType;
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffff
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffffUL
|
||||
#endif
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
|
|
@ -119,7 +119,7 @@ extern "C" {
|
|||
#define portMAX_DELAY ( portTickType ) 0xffff
|
||||
#else
|
||||
typedef unsigned portLONG portTickType;
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffff
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffffUL
|
||||
#endif
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
|
|
@ -96,7 +96,7 @@ extern "C" {
|
|||
#define portMAX_DELAY ( portTickType ) 0xffff
|
||||
#else
|
||||
typedef unsigned portLONG portTickType;
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffff
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffffUL
|
||||
#endif
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
|
|
@ -94,7 +94,7 @@ extern "C" {
|
|||
#define portMAX_DELAY ( portTickType ) 0xffff
|
||||
#else
|
||||
typedef unsigned portLONG portTickType;
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffff
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffffUL
|
||||
#endif
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
|
|
@ -95,7 +95,7 @@ extern "C" {
|
|||
#define portMAX_DELAY ( portTickType ) 0xffff
|
||||
#else
|
||||
typedef unsigned portLONG portTickType;
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffff
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffffUL
|
||||
#endif
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
|
|
@ -95,7 +95,7 @@ extern "C" {
|
|||
#define portMAX_DELAY ( portTickType ) 0xffff
|
||||
#else
|
||||
typedef unsigned portLONG portTickType;
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffff
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffffUL
|
||||
#endif
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
|
|
@ -72,7 +72,7 @@ extern "C" {
|
|||
#define portMAX_DELAY ( portTickType ) 0xffff
|
||||
#else
|
||||
typedef unsigned portLONG portTickType;
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffff
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffffUL
|
||||
#endif
|
||||
|
||||
/* ------------------------ Architecture specifics ------------------------ */
|
||||
|
|
|
@ -94,7 +94,7 @@ extern "C" {
|
|||
#define portMAX_DELAY ( portTickType ) 0xffff
|
||||
#else
|
||||
typedef unsigned portLONG portTickType;
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffff
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffffUL
|
||||
#endif
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
|
|
@ -94,7 +94,7 @@ extern "C" {
|
|||
#define portMAX_DELAY ( portTickType ) 0xffff
|
||||
#else
|
||||
typedef unsigned portLONG portTickType;
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffff
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffffUL
|
||||
#endif
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd.
|
||||
FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd.
|
||||
All rights reserved
|
||||
|
||||
VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.
|
||||
|
@ -80,8 +80,8 @@
|
|||
#include <xil_exception.h>
|
||||
#include <microblaze_exceptions_g.h>
|
||||
|
||||
/* Tasks are started with a critical section nesting of 0 - however, prior to
|
||||
the scheduler being commenced interrupts should not be enabled, so the critical
|
||||
/* Tasks are started with a critical section nesting of 0 - however, prior to
|
||||
the scheduler being commenced interrupts should not be enabled, so the critical
|
||||
nesting variable is initialised to a non-zero value. */
|
||||
#define portINITIAL_NESTING_VALUE ( 0xff )
|
||||
|
||||
|
@ -100,14 +100,14 @@ created. */
|
|||
*/
|
||||
static long prvInitialiseInterruptController( void );
|
||||
|
||||
/* Ensure the interrupt controller instance variable is initialised before it is
|
||||
* used, and that the initialisation only happens once.
|
||||
/* Ensure the interrupt controller instance variable is initialised before it is
|
||||
* used, and that the initialisation only happens once.
|
||||
*/
|
||||
static long prvEnsureInterruptControllerIsInitialised( void );
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/* Counts the nesting depth of calls to portENTER_CRITICAL(). Each task
|
||||
/* Counts the nesting depth of calls to portENTER_CRITICAL(). Each task
|
||||
maintains its own count, so this variable is saved as part of the task
|
||||
context. */
|
||||
volatile unsigned portBASE_TYPE uxCriticalNesting = portINITIAL_NESTING_VALUE;
|
||||
|
@ -121,8 +121,8 @@ unsigned long *pulISRStack;
|
|||
get set to 1. ulTaskSwitchRequested is inspected just before the main interrupt
|
||||
handler exits. If, at that time, ulTaskSwitchRequested is set to 1, the kernel
|
||||
will call vTaskSwitchContext() to ensure the task that runs immediately after
|
||||
the interrupt exists is the highest priority task that is able to run. This is
|
||||
an unusual mechanism, but is used for this port because a single interrupt can
|
||||
the interrupt exists is the highest priority task that is able to run. This is
|
||||
an unusual mechanism, but is used for this port because a single interrupt can
|
||||
cause the servicing of multiple peripherals - and it is inefficient to call
|
||||
vTaskSwitchContext() multiple times as each peripheral is serviced. */
|
||||
volatile unsigned long ulTaskSwitchRequested = 0UL;
|
||||
|
@ -133,10 +133,10 @@ static XIntc xInterruptControllerInstance;
|
|||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/*
|
||||
* Initialise the stack of a task to look exactly as if a call to
|
||||
/*
|
||||
* Initialise the stack of a task to look exactly as if a call to
|
||||
* portSAVE_CONTEXT had been made.
|
||||
*
|
||||
*
|
||||
* See the portable.h header file.
|
||||
*/
|
||||
portSTACK_TYPE *pxPortInitialiseStack( portSTACK_TYPE *pxTopOfStack, pdTASK_CODE pxCode, void *pvParameters )
|
||||
|
@ -145,7 +145,7 @@ extern void *_SDA2_BASE_, *_SDA_BASE_;
|
|||
const unsigned long ulR2 = ( unsigned long ) &_SDA2_BASE_;
|
||||
const unsigned long ulR13 = ( unsigned long ) &_SDA_BASE_;
|
||||
|
||||
/* Place a few bytes of known values on the bottom of the stack.
|
||||
/* Place a few bytes of known values on the bottom of the stack.
|
||||
This is essential for the Microblaze port and these lines must
|
||||
not be omitted. */
|
||||
*pxTopOfStack = ( portSTACK_TYPE ) 0x00000000;
|
||||
|
@ -170,7 +170,7 @@ const unsigned long ulR13 = ( unsigned long ) &_SDA_BASE_;
|
|||
/* First stack an initial value for the critical section nesting. This
|
||||
is initialised to zero. */
|
||||
*pxTopOfStack = ( portSTACK_TYPE ) 0x00;
|
||||
|
||||
|
||||
/* R0 is always zero. */
|
||||
/* R1 is the SP. */
|
||||
|
||||
|
@ -203,13 +203,13 @@ const unsigned long ulR13 = ( unsigned long ) &_SDA_BASE_;
|
|||
#else
|
||||
pxTopOfStack-= 8;
|
||||
#endif
|
||||
|
||||
|
||||
*pxTopOfStack = ( portSTACK_TYPE ) ulR13; /* R13 - read/write small data area. */
|
||||
pxTopOfStack--;
|
||||
*pxTopOfStack = ( portSTACK_TYPE ) pxCode; /* R14 - return address for interrupt. */
|
||||
pxTopOfStack--;
|
||||
*pxTopOfStack = ( portSTACK_TYPE ) NULL; /* R15 - return address for subroutine. */
|
||||
|
||||
|
||||
#ifdef portPRE_LOAD_STACK_FOR_DEBUGGING
|
||||
pxTopOfStack--;
|
||||
*pxTopOfStack = ( portSTACK_TYPE ) 0x10; /* R16 - return address for trap (debugger). */
|
||||
|
@ -221,10 +221,10 @@ const unsigned long ulR13 = ( unsigned long ) &_SDA_BASE_;
|
|||
#else
|
||||
pxTopOfStack -= 4;
|
||||
#endif
|
||||
|
||||
|
||||
*pxTopOfStack = ( portSTACK_TYPE ) 0x00; /* R19 - must be saved across function calls. Callee-save. Seems to be interpreted as the frame pointer. */
|
||||
|
||||
#ifdef portPRE_LOAD_STACK_FOR_DEBUGGING
|
||||
|
||||
#ifdef portPRE_LOAD_STACK_FOR_DEBUGGING
|
||||
pxTopOfStack--;
|
||||
*pxTopOfStack = ( portSTACK_TYPE ) 0x14; /* R20 - reserved for storing a pointer to the Global Offset Table (GOT) in Position Independent Code (PIC). Non-volatile in non-PIC code. Must be saved across function calls. Callee-save. Not used by FreeRTOS. */
|
||||
pxTopOfStack--;
|
||||
|
@ -254,7 +254,7 @@ const unsigned long ulR13 = ( unsigned long ) &_SDA_BASE_;
|
|||
pxTopOfStack -= 13;
|
||||
#endif
|
||||
|
||||
/* Return a pointer to the top of the stack that has been generated so this
|
||||
/* Return a pointer to the top of the stack that has been generated so this
|
||||
can be stored in the task control block for the task. */
|
||||
return pxTopOfStack;
|
||||
}
|
||||
|
@ -266,11 +266,11 @@ extern void ( vPortStartFirstTask )( void );
|
|||
extern unsigned long _stack[];
|
||||
|
||||
/* Setup the hardware to generate the tick. Interrupts are disabled when
|
||||
this function is called.
|
||||
|
||||
this function is called.
|
||||
|
||||
This port uses an application defined callback function to install the tick
|
||||
interrupt handler because the kernel will run on lots of different
|
||||
MicroBlaze and FPGA configurations - not all of which will have the same
|
||||
interrupt handler because the kernel will run on lots of different
|
||||
MicroBlaze and FPGA configurations - not all of which will have the same
|
||||
timer peripherals defined or available. An example definition of
|
||||
vApplicationSetupTimerInterrupt() is provided in the official demo
|
||||
application that accompanies this port. */
|
||||
|
@ -294,12 +294,14 @@ extern unsigned long _stack[];
|
|||
|
||||
void vPortEndScheduler( void )
|
||||
{
|
||||
/* Not implemented. */
|
||||
/* Not implemented in ports where there is nothing to return to.
|
||||
Artificially force an assert. */
|
||||
configASSERT( uxCriticalNesting == 1000UL );
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/*
|
||||
* Manual context switch called by portYIELD or taskYIELD.
|
||||
* Manual context switch called by portYIELD or taskYIELD.
|
||||
*/
|
||||
void vPortYield( void )
|
||||
{
|
||||
|
@ -331,7 +333,7 @@ long lReturn;
|
|||
{
|
||||
XIntc_Enable( &xInterruptControllerInstance, ucInterruptID );
|
||||
}
|
||||
|
||||
|
||||
configASSERT( lReturn );
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
@ -344,12 +346,12 @@ long lReturn;
|
|||
controller because the interrupt controller instance variable is private
|
||||
to this file. */
|
||||
lReturn = prvEnsureInterruptControllerIsInitialised();
|
||||
|
||||
|
||||
if( lReturn == pdPASS )
|
||||
{
|
||||
XIntc_Disable( &xInterruptControllerInstance, ucInterruptID );
|
||||
}
|
||||
|
||||
|
||||
configASSERT( lReturn );
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
@ -358,11 +360,11 @@ portBASE_TYPE xPortInstallInterruptHandler( unsigned char ucInterruptID, XInterr
|
|||
{
|
||||
long lReturn;
|
||||
|
||||
/* An API function is provided to install an interrupt handler because the
|
||||
/* An API function is provided to install an interrupt handler because the
|
||||
interrupt controller instance variable is private to this file. */
|
||||
|
||||
lReturn = prvEnsureInterruptControllerIsInitialised();
|
||||
|
||||
|
||||
if( lReturn == pdPASS )
|
||||
{
|
||||
lReturn = XIntc_Connect( &xInterruptControllerInstance, ucInterruptID, pxHandler, pvCallBackRef );
|
||||
|
@ -372,7 +374,7 @@ long lReturn;
|
|||
{
|
||||
lReturn = pdPASS;
|
||||
}
|
||||
|
||||
|
||||
configASSERT( lReturn == pdPASS );
|
||||
|
||||
return lReturn;
|
||||
|
@ -389,7 +391,7 @@ long lReturn;
|
|||
if( lInterruptControllerInitialised != pdTRUE )
|
||||
{
|
||||
lReturn = prvInitialiseInterruptController();
|
||||
|
||||
|
||||
if( lReturn == pdPASS )
|
||||
{
|
||||
lInterruptControllerInitialised = pdTRUE;
|
||||
|
@ -404,7 +406,7 @@ long lReturn;
|
|||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/*
|
||||
/*
|
||||
* Handler for the timer interrupt. This is the handler that the application
|
||||
* defined callback function vApplicationSetupTimerInterrupt() should install.
|
||||
*/
|
||||
|
@ -416,11 +418,11 @@ extern void vApplicationClearTimerInterrupt( void );
|
|||
( void ) pvUnused;
|
||||
|
||||
/* This port uses an application defined callback function to clear the tick
|
||||
interrupt because the kernel will run on lots of different MicroBlaze and
|
||||
FPGA configurations - not all of which will have the same timer peripherals
|
||||
interrupt because the kernel will run on lots of different MicroBlaze and
|
||||
FPGA configurations - not all of which will have the same timer peripherals
|
||||
defined or available. An example definition of
|
||||
vApplicationClearTimerInterrupt() is provided in the official demo
|
||||
application that accompanies this port. */
|
||||
application that accompanies this port. */
|
||||
vApplicationClearTimerInterrupt();
|
||||
|
||||
/* Increment the RTOS tick - this might cause a task to unblock. */
|
||||
|
|
|
@ -98,7 +98,7 @@ extern "C" {
|
|||
#define portMAX_DELAY ( portTickType ) 0xffff
|
||||
#else
|
||||
typedef unsigned portLONG portTickType;
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffff
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffffUL
|
||||
#endif
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
|
|
@ -96,7 +96,7 @@ extern "C" {
|
|||
#define portMAX_DELAY ( portTickType ) 0xffff
|
||||
#else
|
||||
typedef unsigned portLONG portTickType;
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffff
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffffUL
|
||||
#endif
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
|
|
@ -96,7 +96,7 @@ extern "C" {
|
|||
#define portMAX_DELAY ( portTickType ) 0xffff
|
||||
#else
|
||||
typedef unsigned portLONG portTickType;
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffff
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffffUL
|
||||
#endif
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
|
|
@ -96,7 +96,7 @@ extern "C" {
|
|||
#define portMAX_DELAY ( portTickType ) 0xffff
|
||||
#else
|
||||
typedef unsigned portLONG portTickType;
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffff
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffffUL
|
||||
#endif
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd.
|
||||
FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd.
|
||||
All rights reserved
|
||||
|
||||
VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.
|
||||
|
@ -299,7 +299,9 @@ portBASE_TYPE xPortStartScheduler( void )
|
|||
|
||||
void vPortEndScheduler( void )
|
||||
{
|
||||
/* Not implemented as there is nothing to return to. */
|
||||
/* Not implemented in ports where there is nothing to return to.
|
||||
Artificially force an assert. */
|
||||
configASSERT( pxCurrentTCB == NULL );
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
|
|
@ -96,7 +96,7 @@ portSTACK_TYPE and portBASE_TYPE. */
|
|||
#define portMAX_DELAY ( portTickType ) 0xffff
|
||||
#else
|
||||
typedef unsigned portLONG portTickType;
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffff
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffffUL
|
||||
#endif
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd.
|
||||
FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd.
|
||||
All rights reserved
|
||||
|
||||
VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.
|
||||
|
@ -79,15 +79,15 @@
|
|||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/* Tasks should start with interrupts enabled and in Supervisor mode, therefore
|
||||
/* Tasks should start with interrupts enabled and in Supervisor mode, therefore
|
||||
PSW is set with U and I set, and PM and IPL clear. */
|
||||
#define portINITIAL_PSW ( ( portSTACK_TYPE ) 0x00030000 )
|
||||
#define portINITIAL_FPSW ( ( portSTACK_TYPE ) 0x00000100 )
|
||||
|
||||
/* These macros allow a critical section to be added around the call to
|
||||
xTaskIncrementTick(), which is only ever called from interrupts at the kernel
|
||||
priority - ie a known priority. Therefore these local macros are a slight
|
||||
optimisation compared to calling the global SET/CLEAR_INTERRUPT_MASK macros,
|
||||
xTaskIncrementTick(), which is only ever called from interrupts at the kernel
|
||||
priority - ie a known priority. Therefore these local macros are a slight
|
||||
optimisation compared to calling the global SET/CLEAR_INTERRUPT_MASK macros,
|
||||
which would require the old IPL to be read first and stored in a local variable. */
|
||||
#define portDISABLE_INTERRUPTS_FROM_KERNEL_ISR() __asm volatile ( "MVTIPL %0" ::"i"(configMAX_SYSCALL_INTERRUPT_PRIORITY) )
|
||||
#define portENABLE_INTERRUPTS_FROM_KERNEL_ISR() __asm volatile ( "MVTIPL %0" ::"i"(configKERNEL_INTERRUPT_PRIORITY) )
|
||||
|
@ -96,7 +96,7 @@ which would require the old IPL to be read first and stored in a local variable.
|
|||
|
||||
/*
|
||||
* Function to start the first task executing - written in asm code as direct
|
||||
* access to registers is required.
|
||||
* access to registers is required.
|
||||
*/
|
||||
static void prvStartFirstTask( void ) __attribute__((naked));
|
||||
|
||||
|
@ -118,19 +118,19 @@ extern void *pxCurrentTCB;
|
|||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/*
|
||||
* See header file for description.
|
||||
/*
|
||||
* See header file for description.
|
||||
*/
|
||||
portSTACK_TYPE *pxPortInitialiseStack( portSTACK_TYPE *pxTopOfStack, pdTASK_CODE pxCode, void *pvParameters )
|
||||
{
|
||||
/* R0 is not included as it is the stack pointer. */
|
||||
|
||||
|
||||
*pxTopOfStack = 0x00;
|
||||
pxTopOfStack--;
|
||||
*pxTopOfStack = portINITIAL_PSW;
|
||||
pxTopOfStack--;
|
||||
*pxTopOfStack = ( portSTACK_TYPE ) pxCode;
|
||||
|
||||
|
||||
/* When debugging it can be useful if every register is set to a known
|
||||
value. Otherwise code space can be saved by just setting the registers
|
||||
that need to be set. */
|
||||
|
@ -171,9 +171,9 @@ portSTACK_TYPE *pxPortInitialiseStack( portSTACK_TYPE *pxTopOfStack, pdTASK_CODE
|
|||
pxTopOfStack -= 15;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
*pxTopOfStack = ( portSTACK_TYPE ) pvParameters; /* R1 */
|
||||
pxTopOfStack--;
|
||||
pxTopOfStack--;
|
||||
*pxTopOfStack = portINITIAL_FPSW;
|
||||
pxTopOfStack--;
|
||||
*pxTopOfStack = 0x12345678; /* Accumulator. */
|
||||
|
@ -192,16 +192,16 @@ extern void vApplicationSetupTimerInterrupt( void );
|
|||
if( pxCurrentTCB != NULL )
|
||||
{
|
||||
/* Call an application function to set up the timer that will generate the
|
||||
tick interrupt. This way the application can decide which peripheral to
|
||||
tick interrupt. This way the application can decide which peripheral to
|
||||
use. A demo application is provided to show a suitable example. */
|
||||
vApplicationSetupTimerInterrupt();
|
||||
|
||||
/* Enable the software interrupt. */
|
||||
/* Enable the software interrupt. */
|
||||
_IEN( _ICU_SWINT ) = 1;
|
||||
|
||||
|
||||
/* Ensure the software interrupt is clear. */
|
||||
_IR( _ICU_SWINT ) = 0;
|
||||
|
||||
|
||||
/* Ensure the software interrupt is set to the kernel priority. */
|
||||
_IPR( _ICU_SWINT ) = configKERNEL_INTERRUPT_PRIORITY;
|
||||
|
||||
|
@ -216,43 +216,45 @@ extern void vApplicationSetupTimerInterrupt( void );
|
|||
|
||||
void vPortEndScheduler( void )
|
||||
{
|
||||
/* Not implemented as there is nothing to return to. */
|
||||
/* Not implemented in ports where there is nothing to return to.
|
||||
Artificially force an assert. */
|
||||
configASSERT( pxCurrentTCB == NULL );
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static void prvStartFirstTask( void )
|
||||
{
|
||||
__asm volatile
|
||||
(
|
||||
(
|
||||
/* When starting the scheduler there is nothing that needs moving to the
|
||||
interrupt stack because the function is not called from an interrupt.
|
||||
Just ensure the current stack is the user stack. */
|
||||
"SETPSW U \n" \
|
||||
|
||||
/* Obtain the location of the stack associated with which ever task
|
||||
/* Obtain the location of the stack associated with which ever task
|
||||
pxCurrentTCB is currently pointing to. */
|
||||
"MOV.L #_pxCurrentTCB, R15 \n" \
|
||||
"MOV.L [R15], R15 \n" \
|
||||
"MOV.L [R15], R0 \n" \
|
||||
|
||||
/* Restore the registers from the stack of the task pointed to by
|
||||
/* Restore the registers from the stack of the task pointed to by
|
||||
pxCurrentTCB. */
|
||||
"POP R15 \n" \
|
||||
|
||||
|
||||
/* Accumulator low 32 bits. */
|
||||
"MVTACLO R15 \n" \
|
||||
"POP R15 \n" \
|
||||
|
||||
|
||||
/* Accumulator high 32 bits. */
|
||||
"MVTACHI R15 \n" \
|
||||
"POP R15 \n" \
|
||||
|
||||
|
||||
/* Floating point status word. */
|
||||
"MVTC R15, FPSW \n" \
|
||||
|
||||
|
||||
/* R1 to R15 - R0 is not included as it is the SP. */
|
||||
"POPM R1-R15 \n" \
|
||||
|
||||
|
||||
/* This pops the remaining registers. */
|
||||
"RTE \n" \
|
||||
"NOP \n" \
|
||||
|
@ -269,18 +271,18 @@ void vSoftwareInterruptISR( void )
|
|||
"SETPSW I \n" \
|
||||
|
||||
/* Move the data that was automatically pushed onto the interrupt stack when
|
||||
the interrupt occurred from the interrupt stack to the user stack.
|
||||
|
||||
the interrupt occurred from the interrupt stack to the user stack.
|
||||
|
||||
R15 is saved before it is clobbered. */
|
||||
"PUSH.L R15 \n" \
|
||||
|
||||
|
||||
/* Read the user stack pointer. */
|
||||
"MVFC USP, R15 \n" \
|
||||
|
||||
|
||||
/* Move the address down to the data being moved. */
|
||||
"SUB #12, R15 \n" \
|
||||
"MVTC R15, USP \n" \
|
||||
|
||||
|
||||
/* Copy the data across, R15, then PC, then PSW. */
|
||||
"MOV.L [ R0 ], [ R15 ] \n" \
|
||||
"MOV.L 4[ R0 ], 4[ R15 ] \n" \
|
||||
|
@ -288,22 +290,22 @@ void vSoftwareInterruptISR( void )
|
|||
|
||||
/* Move the interrupt stack pointer to its new correct position. */
|
||||
"ADD #12, R0 \n" \
|
||||
|
||||
|
||||
/* All the rest of the registers are saved directly to the user stack. */
|
||||
"SETPSW U \n" \
|
||||
|
||||
/* Save the rest of the general registers (R15 has been saved already). */
|
||||
"PUSHM R1-R14 \n" \
|
||||
|
||||
|
||||
/* Save the FPSW and accumulator. */
|
||||
"MVFC FPSW, R15 \n" \
|
||||
"PUSH.L R15 \n" \
|
||||
"MVFACHI R15 \n" \
|
||||
"PUSH.L R15 \n" \
|
||||
|
||||
|
||||
/* Middle word. */
|
||||
"MVFACMI R15 \n" \
|
||||
|
||||
|
||||
/* Shifted left as it is restored to the low order word. */
|
||||
"SHLL #16, R15 \n" \
|
||||
"PUSH.L R15 \n" \
|
||||
|
@ -312,7 +314,7 @@ void vSoftwareInterruptISR( void )
|
|||
"MOV.L #_pxCurrentTCB, R15 \n" \
|
||||
"MOV.L [ R15 ], R15 \n" \
|
||||
"MOV.L R0, [ R15 ] \n" \
|
||||
|
||||
|
||||
/* Ensure the interrupt mask is set to the syscall priority while the kernel
|
||||
structures are being accessed. */
|
||||
"MVTIPL %0 \n" \
|
||||
|
@ -350,7 +352,7 @@ void vTickISR( void )
|
|||
{
|
||||
/* Re-enabled interrupts. */
|
||||
__asm volatile( "SETPSW I" );
|
||||
|
||||
|
||||
/* Increment the tick, and perform any processing the new tick value
|
||||
necessitates. Ensure IPL is at the max syscall value first. */
|
||||
portDISABLE_INTERRUPTS_FROM_KERNEL_ISR();
|
||||
|
@ -367,12 +369,12 @@ void vTickISR( void )
|
|||
unsigned long ulPortGetIPL( void )
|
||||
{
|
||||
__asm volatile
|
||||
(
|
||||
(
|
||||
"MVFC PSW, R1 \n" \
|
||||
"SHLR #24, R1 \n" \
|
||||
"RTS "
|
||||
);
|
||||
|
||||
|
||||
/* This will never get executed, but keeps the compiler from complaining. */
|
||||
return 0;
|
||||
}
|
||||
|
@ -381,7 +383,7 @@ unsigned long ulPortGetIPL( void )
|
|||
void vPortSetIPL( unsigned long ulNewIPL )
|
||||
{
|
||||
__asm volatile
|
||||
(
|
||||
(
|
||||
"PUSH R5 \n" \
|
||||
"MVFC PSW, R5 \n" \
|
||||
"SHLL #24, R1 \n" \
|
||||
|
|
|
@ -96,7 +96,7 @@ portSTACK_TYPE and portBASE_TYPE. */
|
|||
#define portMAX_DELAY ( portTickType ) 0xffff
|
||||
#else
|
||||
typedef unsigned portLONG portTickType;
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffff
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffffUL
|
||||
#endif
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
|
|
@ -95,7 +95,7 @@ extern "C" {
|
|||
#define portMAX_DELAY ( portTickType ) 0xffff
|
||||
#else
|
||||
typedef unsigned portLONG portTickType;
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffff
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffffUL
|
||||
#endif
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
|
|
@ -98,7 +98,7 @@ extern "C" {
|
|||
#define portMAX_DELAY ( portTickType ) 0xffff
|
||||
#else
|
||||
typedef unsigned portLONG portTickType;
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffff
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffffUL
|
||||
#endif
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
||||
|
|
|
@ -95,7 +95,7 @@ extern "C" {
|
|||
#define portMAX_DELAY ( portTickType ) 0xffff
|
||||
#else
|
||||
typedef unsigned long portTickType;
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffff
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffffUL
|
||||
#endif
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd.
|
||||
FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd.
|
||||
All rights reserved
|
||||
|
||||
VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.
|
||||
|
@ -297,8 +297,9 @@ unsigned long ulAPSR;
|
|||
|
||||
void vPortEndScheduler( void )
|
||||
{
|
||||
/* It is unlikely that the ARM port will require this function as there
|
||||
is nothing to return to. */
|
||||
/* Not implemented in ports where there is nothing to return to.
|
||||
Artificially force an assert. */
|
||||
configASSERT( ulCriticalNesting == 1000UL );
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
|
|
@ -94,7 +94,7 @@
|
|||
#define portSTACK_TYPE unsigned long
|
||||
#define portBASE_TYPE portLONG
|
||||
typedef unsigned long portTickType;
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffff
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffffUL
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd.
|
||||
FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd.
|
||||
All rights reserved
|
||||
|
||||
VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.
|
||||
|
@ -145,13 +145,13 @@ portSTACK_TYPE *pxPortInitialiseStack( portSTACK_TYPE *pxTopOfStack, pdTASK_CODE
|
|||
static void prvTaskExitError( void )
|
||||
{
|
||||
/* A function that implements a task must not exit or attempt to return to
|
||||
its caller as there is nothing to return to. If a task wants to exit it
|
||||
its caller as there is nothing to return to. If a task wants to exit it
|
||||
should instead call vTaskDelete( NULL ).
|
||||
|
||||
Artificially force an assert() to be triggered if configASSERT() is
|
||||
|
||||
Artificially force an assert() to be triggered if configASSERT() is
|
||||
defined, then stop here so application writers can catch the error. */
|
||||
configASSERT( uxCriticalNesting == ~0UL );
|
||||
portDISABLE_INTERRUPTS();
|
||||
portDISABLE_INTERRUPTS();
|
||||
for( ;; );
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
@ -182,8 +182,9 @@ portBASE_TYPE xPortStartScheduler( void )
|
|||
|
||||
void vPortEndScheduler( void )
|
||||
{
|
||||
/* It is unlikely that the CM0 port will require this function as there
|
||||
is nothing to return to. */
|
||||
/* Not implemented in ports where there is nothing to return to.
|
||||
Artificially force an assert. */
|
||||
configASSERT( uxCriticalNesting == 1000UL );
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
@ -210,6 +211,7 @@ void vPortEnterCritical( void )
|
|||
|
||||
void vPortExitCritical( void )
|
||||
{
|
||||
configASSERT( uxCriticalNesting );
|
||||
uxCriticalNesting--;
|
||||
if( uxCriticalNesting == 0 )
|
||||
{
|
||||
|
|
|
@ -95,7 +95,7 @@ extern "C" {
|
|||
#define portMAX_DELAY ( portTickType ) 0xffff
|
||||
#else
|
||||
typedef unsigned portLONG portTickType;
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffff
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffffUL
|
||||
#endif
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd.
|
||||
FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd.
|
||||
All rights reserved
|
||||
|
||||
VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.
|
||||
|
@ -214,13 +214,13 @@ portSTACK_TYPE *pxPortInitialiseStack( portSTACK_TYPE *pxTopOfStack, pdTASK_CODE
|
|||
static void prvTaskExitError( void )
|
||||
{
|
||||
/* A function that implements a task must not exit or attempt to return to
|
||||
its caller as there is nothing to return to. If a task wants to exit it
|
||||
its caller as there is nothing to return to. If a task wants to exit it
|
||||
should instead call vTaskDelete( NULL ).
|
||||
|
||||
Artificially force an assert() to be triggered if configASSERT() is
|
||||
|
||||
Artificially force an assert() to be triggered if configASSERT() is
|
||||
defined, then stop here so application writers can catch the error. */
|
||||
configASSERT( uxCriticalNesting == ~0UL );
|
||||
portDISABLE_INTERRUPTS();
|
||||
portDISABLE_INTERRUPTS();
|
||||
for( ;; );
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
@ -295,8 +295,9 @@ portBASE_TYPE xPortStartScheduler( void )
|
|||
|
||||
void vPortEndScheduler( void )
|
||||
{
|
||||
/* It is unlikely that the CM3 port will require this function as there
|
||||
is nothing to return to. */
|
||||
/* Not implemented in ports where there is nothing to return to.
|
||||
Artificially force an assert. */
|
||||
configASSERT( uxCriticalNesting == 1000UL );
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
@ -323,6 +324,7 @@ void vPortEnterCritical( void )
|
|||
|
||||
void vPortExitCritical( void )
|
||||
{
|
||||
configASSERT( uxCriticalNesting );
|
||||
uxCriticalNesting--;
|
||||
if( uxCriticalNesting == 0 )
|
||||
{
|
||||
|
@ -390,10 +392,10 @@ void xPortSysTickHandler( void )
|
|||
/* Restart from whatever is left in the count register to complete
|
||||
this tick period. */
|
||||
portNVIC_SYSTICK_LOAD_REG = portNVIC_SYSTICK_CURRENT_VALUE_REG;
|
||||
|
||||
|
||||
/* Restart SysTick. */
|
||||
portNVIC_SYSTICK_CTRL_REG = portNVIC_SYSTICK_CLK_BIT | portNVIC_SYSTICK_INT_BIT | portNVIC_SYSTICK_ENABLE_BIT;
|
||||
|
||||
|
||||
/* Reset the reload register to the value required for normal tick
|
||||
periods. */
|
||||
portNVIC_SYSTICK_LOAD_REG = ulTimerCountsForOneTick - 1UL;
|
||||
|
@ -442,23 +444,23 @@ void xPortSysTickHandler( void )
|
|||
if( ( portNVIC_SYSTICK_CTRL_REG & portNVIC_SYSTICK_COUNT_FLAG_BIT ) != 0 )
|
||||
{
|
||||
unsigned long ulCalculatedLoadValue;
|
||||
|
||||
|
||||
/* The tick interrupt has already executed, and the SysTick
|
||||
count reloaded with ulReloadValue. Reset the
|
||||
portNVIC_SYSTICK_LOAD_REG with whatever remains of this tick
|
||||
period. */
|
||||
ulCalculatedLoadValue = ( ulTimerCountsForOneTick - 1UL ) - ( ulReloadValue - portNVIC_SYSTICK_CURRENT_VALUE_REG );
|
||||
|
||||
/* Don't allow a tiny value, or values that have somehow
|
||||
underflowed because the post sleep hook did something
|
||||
/* Don't allow a tiny value, or values that have somehow
|
||||
underflowed because the post sleep hook did something
|
||||
that took too long. */
|
||||
if( ( ulCalculatedLoadValue < ulStoppedTimerCompensation ) || ( ulCalculatedLoadValue > ulTimerCountsForOneTick ) )
|
||||
{
|
||||
ulCalculatedLoadValue = ( ulTimerCountsForOneTick - 1UL );
|
||||
}
|
||||
|
||||
|
||||
portNVIC_SYSTICK_LOAD_REG = ulCalculatedLoadValue;
|
||||
|
||||
|
||||
/* The tick interrupt handler will already have pended the tick
|
||||
processing in the kernel. As the pending tick will be
|
||||
processed as soon as this function exits, the tick value
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd.
|
||||
FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd.
|
||||
All rights reserved
|
||||
|
||||
VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.
|
||||
|
@ -321,8 +321,9 @@ portBASE_TYPE xPortStartScheduler( void )
|
|||
|
||||
void vPortEndScheduler( void )
|
||||
{
|
||||
/* It is unlikely that the CM4F port will require this function as there
|
||||
is nothing to return to. */
|
||||
/* Not implemented in ports where there is nothing to return to.
|
||||
Artificially force an assert. */
|
||||
configASSERT( uxCriticalNesting == 1000UL );
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
@ -349,6 +350,7 @@ void vPortEnterCritical( void )
|
|||
|
||||
void vPortExitCritical( void )
|
||||
{
|
||||
configASSERT( uxCriticalNesting );
|
||||
uxCriticalNesting--;
|
||||
if( uxCriticalNesting == 0 )
|
||||
{
|
||||
|
@ -468,23 +470,23 @@ void xPortSysTickHandler( void )
|
|||
if( ( portNVIC_SYSTICK_CTRL_REG & portNVIC_SYSTICK_COUNT_FLAG_BIT ) != 0 )
|
||||
{
|
||||
unsigned long ulCalculatedLoadValue;
|
||||
|
||||
|
||||
/* The tick interrupt has already executed, and the SysTick
|
||||
count reloaded with ulReloadValue. Reset the
|
||||
portNVIC_SYSTICK_LOAD_REG with whatever remains of this tick
|
||||
period. */
|
||||
ulCalculatedLoadValue = ( ulTimerCountsForOneTick - 1UL ) - ( ulReloadValue - portNVIC_SYSTICK_CURRENT_VALUE_REG );
|
||||
|
||||
/* Don't allow a tiny value, or values that have somehow
|
||||
underflowed because the post sleep hook did something
|
||||
/* Don't allow a tiny value, or values that have somehow
|
||||
underflowed because the post sleep hook did something
|
||||
that took too long. */
|
||||
if( ( ulCalculatedLoadValue < ulStoppedTimerCompensation ) || ( ulCalculatedLoadValue > ulTimerCountsForOneTick ) )
|
||||
{
|
||||
ulCalculatedLoadValue = ( ulTimerCountsForOneTick - 1UL );
|
||||
}
|
||||
|
||||
|
||||
portNVIC_SYSTICK_LOAD_REG = ulCalculatedLoadValue;
|
||||
|
||||
|
||||
/* The tick interrupt handler will already have pended the tick
|
||||
processing in the kernel. As the pending tick will be
|
||||
processed as soon as this function exits, the tick value
|
||||
|
|
|
@ -95,7 +95,7 @@ extern "C" {
|
|||
#define portMAX_DELAY ( portTickType ) 0xffff
|
||||
#else
|
||||
typedef unsigned portLONG portTickType;
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffff
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffffUL
|
||||
#endif
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
|
|
@ -102,7 +102,7 @@ extern "C" {
|
|||
#define portMAX_DELAY ( portTickType ) 0xffff
|
||||
#else
|
||||
typedef unsigned portLONG portTickType;
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffff
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffffUL
|
||||
#endif
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
|
|
@ -120,7 +120,7 @@ extern "C" {
|
|||
#define portMAX_DELAY ( portTickType ) 0xffff
|
||||
#else
|
||||
typedef unsigned portLONG portTickType;
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffff
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffffUL
|
||||
#endif
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
|
|
@ -95,7 +95,7 @@ extern "C" {
|
|||
#define portMAX_DELAY ( portTickType ) 0xffff
|
||||
#else
|
||||
typedef unsigned portLONG portTickType;
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffff
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffffUL
|
||||
#endif
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
|
|
@ -97,7 +97,7 @@ extern "C" {
|
|||
#define portMAX_DELAY ( portTickType ) 0xffff
|
||||
#else
|
||||
typedef unsigned portLONG portTickType;
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffff
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffffUL
|
||||
#endif
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
|
|
@ -97,7 +97,7 @@ extern "C" {
|
|||
#define portMAX_DELAY ( portTickType ) 0xffff
|
||||
#else
|
||||
typedef unsigned portLONG portTickType;
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffff
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffffUL
|
||||
#endif
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
|
|
@ -90,7 +90,7 @@
|
|||
#define portMAX_DELAY ( portTickType ) 0xffff
|
||||
#else
|
||||
typedef unsigned portLONG portTickType;
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffff
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffffUL
|
||||
#endif
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
|
|
@ -99,7 +99,7 @@
|
|||
#define portMAX_DELAY ( portTickType ) 0xffff
|
||||
#else
|
||||
typedef unsigned portLONG portTickType;
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffff
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffffUL
|
||||
#endif
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
|
|
@ -110,7 +110,7 @@ extern "C" {
|
|||
#define portMAX_DELAY ( portTickType ) 0xffff
|
||||
#else
|
||||
typedef unsigned long portTickType;
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffff
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffffUL
|
||||
#endif
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd.
|
||||
FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd.
|
||||
All rights reserved
|
||||
|
||||
VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.
|
||||
|
@ -317,7 +317,9 @@ __interrupt static void prvTickISR( void )
|
|||
|
||||
void vPortEndScheduler( void )
|
||||
{
|
||||
/* Not implemented as there is nothing to return to. */
|
||||
/* Not implemented in ports where there is nothing to return to.
|
||||
Artificially force an assert. */
|
||||
configASSERT( pxCurrentTCB == NULL );
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
|
|
@ -101,7 +101,7 @@ portSTACK_TYPE and portBASE_TYPE. */
|
|||
#define portMAX_DELAY ( portTickType ) 0xffff
|
||||
#else
|
||||
typedef unsigned portLONG portTickType;
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffff
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffffUL
|
||||
#endif
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd.
|
||||
FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd.
|
||||
All rights reserved
|
||||
|
||||
VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.
|
||||
|
@ -221,7 +221,9 @@ __interrupt void vTickISR( void )
|
|||
|
||||
void vPortEndScheduler( void )
|
||||
{
|
||||
/* Not implemented as there is nothing to return to. */
|
||||
/* Not implemented in ports where there is nothing to return to.
|
||||
Artificially force an assert. */
|
||||
configASSERT( pxCurrentTCB == NULL );
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
|
|
@ -98,7 +98,7 @@ portSTACK_TYPE and portBASE_TYPE. */
|
|||
#define portMAX_DELAY ( portTickType ) 0xffff
|
||||
#else
|
||||
typedef unsigned portLONG portTickType;
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffff
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffffUL
|
||||
#endif
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
|
|
@ -98,7 +98,7 @@ extern "C" {
|
|||
#define portMAX_DELAY ( portTickType ) 0xffff
|
||||
#else
|
||||
typedef unsigned portLONG portTickType;
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffff
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffffUL
|
||||
#endif
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
|
|
@ -97,7 +97,7 @@ extern "C" {
|
|||
#define portMAX_DELAY ( portTickType ) 0xffff
|
||||
#else
|
||||
typedef unsigned portLONG portTickType;
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffff
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffffUL
|
||||
#endif
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
|
|
@ -97,7 +97,7 @@ extern "C" {
|
|||
#define portMAX_DELAY ( portTickType ) 0xffff
|
||||
#else
|
||||
typedef unsigned portLONG portTickType;
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffff
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffffUL
|
||||
#endif
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
|
|
@ -95,7 +95,7 @@ extern "C" {
|
|||
#define portMAX_DELAY ( portTickType ) 0xffff
|
||||
#else
|
||||
typedef unsigned portLONG portTickType;
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffff
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffffUL
|
||||
#endif
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
|
|
@ -90,7 +90,7 @@
|
|||
#define portMAX_DELAY ( portTickType ) 0xffff
|
||||
#else
|
||||
typedef unsigned portLONG portTickType;
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffff
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffffUL
|
||||
#endif
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd.
|
||||
FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd.
|
||||
All rights reserved
|
||||
|
||||
VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.
|
||||
|
@ -300,9 +300,9 @@ portBASE_TYPE xPortStartScheduler( void )
|
|||
|
||||
void vPortEndScheduler( void )
|
||||
{
|
||||
/* It is unlikely that the scheduler for the PIC port will get stopped
|
||||
once running. If required disable the tick interrupt here, then return
|
||||
to xPortStartScheduler(). */
|
||||
/* Not implemented in ports where there is nothing to return to.
|
||||
Artificially force an assert. */
|
||||
configASSERT( uxCriticalNesting == 1000UL );
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
@ -346,6 +346,7 @@ void vPortEnterCritical( void )
|
|||
|
||||
void vPortExitCritical( void )
|
||||
{
|
||||
configASSERT( uxCriticalNesting );
|
||||
uxCriticalNesting--;
|
||||
if( uxCriticalNesting == 0 )
|
||||
{
|
||||
|
|
|
@ -94,7 +94,7 @@ extern "C" {
|
|||
#define portMAX_DELAY ( portTickType ) 0xffff
|
||||
#else
|
||||
typedef unsigned portLONG portTickType;
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffff
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffffUL
|
||||
#endif
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
|
|
@ -270,10 +270,9 @@ const unsigned long ulCompareMatch = ( (configPERIPHERAL_CLOCK_HZ / portTIMER_PR
|
|||
|
||||
void vPortEndScheduler(void)
|
||||
{
|
||||
/* It is unlikely that the scheduler for the PIC port will get stopped
|
||||
once running. If required disable the tick interrupt here, then return
|
||||
to xPortStartScheduler(). */
|
||||
for( ;; );
|
||||
/* Not implemented in ports where there is nothing to return to.
|
||||
Artificially force an assert. */
|
||||
configASSERT( uxInterruptNesting == 1000UL );
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
|
|
@ -97,7 +97,7 @@ extern "C" {
|
|||
#define portMAX_DELAY ( portTickType ) 0xffff
|
||||
#else
|
||||
typedef unsigned long portTickType;
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffff
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffffUL
|
||||
#endif
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
|
|
@ -279,10 +279,9 @@ const unsigned long ulCompareMatch = ( (configPERIPHERAL_CLOCK_HZ / portTIMER_PR
|
|||
|
||||
void vPortEndScheduler(void)
|
||||
{
|
||||
/* It is unlikely that the scheduler for the PIC port will get stopped
|
||||
once running. If required disable the tick interrupt here, then return
|
||||
to xPortStartScheduler(). */
|
||||
for( ;; );
|
||||
/* Not implemented in ports where there is nothing to return to.
|
||||
Artificially force an assert. */
|
||||
configASSERT( uxInterruptNesting == 1000UL );
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
|
|
@ -97,7 +97,7 @@ extern "C" {
|
|||
#define portMAX_DELAY ( portTickType ) 0xffff
|
||||
#else
|
||||
typedef unsigned long portTickType;
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffff
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffffUL
|
||||
#endif
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
|
|
@ -85,7 +85,7 @@
|
|||
#define portMAX_DELAY ( portTickType ) 0xffff
|
||||
#else
|
||||
typedef unsigned portLONG portTickType;
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffff
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffffUL
|
||||
#endif
|
||||
|
||||
/* Hardware specifics. */
|
||||
|
|
|
@ -94,7 +94,7 @@ extern "C" {
|
|||
#define portMAX_DELAY ( portTickType ) 0xffff
|
||||
#else
|
||||
typedef unsigned portLONG portTickType;
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffff
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffffUL
|
||||
#endif
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
|
|
@ -96,7 +96,7 @@ typedef void ( __interrupt __far *pxISR )();
|
|||
#define portMAX_DELAY ( portTickType ) 0xffff
|
||||
#else
|
||||
typedef unsigned portLONG portTickType;
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffff
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffffUL
|
||||
#endif
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
|
|
@ -95,7 +95,7 @@ extern "C" {
|
|||
#define portMAX_DELAY ( portTickType ) 0xffff
|
||||
#else
|
||||
typedef unsigned portLONG portTickType;
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffff
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffffUL
|
||||
#endif
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd.
|
||||
FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd.
|
||||
All rights reserved
|
||||
|
||||
VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.
|
||||
|
@ -316,9 +316,9 @@ unsigned long ulAPSR;
|
|||
setting. See the comments in vPortValidateInterruptPriority() below for
|
||||
more information. */
|
||||
configASSERT( ( portICCBPR_BINARY_POINT_REGISTER & portBINARY_POINT_BITS ) <= portMAX_BINARY_POINT_VALUE );
|
||||
|
||||
|
||||
if( ( portICCBPR_BINARY_POINT_REGISTER & portBINARY_POINT_BITS ) <= portMAX_BINARY_POINT_VALUE )
|
||||
{
|
||||
{
|
||||
/* Start the timer that generates the tick ISR. */
|
||||
configSETUP_TICK_INTERRUPT();
|
||||
|
||||
|
@ -336,8 +336,9 @@ unsigned long ulAPSR;
|
|||
|
||||
void vPortEndScheduler( void )
|
||||
{
|
||||
/* It is unlikely that the ARM port will require this function as there
|
||||
is nothing to return to. */
|
||||
/* Not implemented in ports where there is nothing to return to.
|
||||
Artificially force an assert. */
|
||||
configASSERT( ulCriticalNesting == 1000UL );
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
|
|
@ -94,7 +94,7 @@ extern "C" {
|
|||
#define portMAX_DELAY ( portTickType ) 0xffff
|
||||
#else
|
||||
typedef unsigned long portTickType;
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffff
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffffUL
|
||||
#endif
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd.
|
||||
FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd.
|
||||
All rights reserved
|
||||
|
||||
VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.
|
||||
|
@ -142,20 +142,20 @@ portSTACK_TYPE *pxPortInitialiseStack( portSTACK_TYPE *pxTopOfStack, pdTASK_CODE
|
|||
static void prvTaskExitError( void )
|
||||
{
|
||||
/* A function that implements a task must not exit or attempt to return to
|
||||
its caller as there is nothing to return to. If a task wants to exit it
|
||||
its caller as there is nothing to return to. If a task wants to exit it
|
||||
should instead call vTaskDelete( NULL ).
|
||||
|
||||
Artificially force an assert() to be triggered if configASSERT() is
|
||||
|
||||
Artificially force an assert() to be triggered if configASSERT() is
|
||||
defined, then stop here so application writers can catch the error. */
|
||||
configASSERT( uxCriticalNesting == ~0UL );
|
||||
portDISABLE_INTERRUPTS();
|
||||
portDISABLE_INTERRUPTS();
|
||||
for( ;; );
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vPortSVCHandler( void )
|
||||
{
|
||||
/* This function is no longer used, but retained for backward
|
||||
/* This function is no longer used, but retained for backward
|
||||
compatibility. */
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
@ -163,15 +163,15 @@ void vPortSVCHandler( void )
|
|||
__asm void prvPortStartFirstTask( void )
|
||||
{
|
||||
extern pxCurrentTCB;
|
||||
|
||||
|
||||
PRESERVE8
|
||||
|
||||
|
||||
/* The MSP stack is not reset as, unlike on M3/4 parts, there is no vector
|
||||
table offset register that can be used to locate the initial stack value.
|
||||
Not all M0 parts have the application vector table at address 0. */
|
||||
|
||||
|
||||
ldr r3, =pxCurrentTCB /* Obtain location of pxCurrentTCB. */
|
||||
ldr r1, [r3]
|
||||
ldr r1, [r3]
|
||||
ldr r0, [r1] /* The first item in pxCurrentTCB is the task top of stack. */
|
||||
adds r0, #32 /* Discard everything up to r0. */
|
||||
msr psp, r0 /* This is now the new top of stack to use in the task. */
|
||||
|
@ -212,8 +212,9 @@ portBASE_TYPE xPortStartScheduler( void )
|
|||
|
||||
void vPortEndScheduler( void )
|
||||
{
|
||||
/* It is unlikely that the CM0 port will require this function as there
|
||||
is nothing to return to. */
|
||||
/* Not implemented in ports where there is nothing to return to.
|
||||
Artificially force an assert. */
|
||||
configASSERT( uxCriticalNesting == 1000UL );
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
@ -240,6 +241,7 @@ void vPortEnterCritical( void )
|
|||
|
||||
void vPortExitCritical( void )
|
||||
{
|
||||
configASSERT( uxCriticalNesting );
|
||||
uxCriticalNesting--;
|
||||
if( uxCriticalNesting == 0 )
|
||||
{
|
||||
|
|
|
@ -95,7 +95,7 @@ extern "C" {
|
|||
#define portMAX_DELAY ( portTickType ) 0xffff
|
||||
#else
|
||||
typedef unsigned portLONG portTickType;
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffff
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffffUL
|
||||
#endif
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd.
|
||||
FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd.
|
||||
All rights reserved
|
||||
|
||||
VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.
|
||||
|
@ -186,7 +186,7 @@ static void prvTaskExitError( void );
|
|||
#endif /* configUSE_TICKLESS_IDLE */
|
||||
|
||||
/*
|
||||
* Used by the portASSERT_IF_INTERRUPT_PRIORITY_INVALID() macro to ensure
|
||||
* Used by the portASSERT_IF_INTERRUPT_PRIORITY_INVALID() macro to ensure
|
||||
* FreeRTOS API functions are not called from interrupts that have been assigned
|
||||
* a priority above configMAX_SYSCALL_INTERRUPT_PRIORITY.
|
||||
*/
|
||||
|
@ -223,13 +223,13 @@ portSTACK_TYPE *pxPortInitialiseStack( portSTACK_TYPE *pxTopOfStack, pdTASK_CODE
|
|||
static void prvTaskExitError( void )
|
||||
{
|
||||
/* A function that implements a task must not exit or attempt to return to
|
||||
its caller as there is nothing to return to. If a task wants to exit it
|
||||
its caller as there is nothing to return to. If a task wants to exit it
|
||||
should instead call vTaskDelete( NULL ).
|
||||
|
||||
Artificially force an assert() to be triggered if configASSERT() is
|
||||
|
||||
Artificially force an assert() to be triggered if configASSERT() is
|
||||
defined, then stop here so application writers can catch the error. */
|
||||
configASSERT( uxCriticalNesting == ~0UL );
|
||||
portDISABLE_INTERRUPTS();
|
||||
portDISABLE_INTERRUPTS();
|
||||
for( ;; );
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
@ -338,8 +338,9 @@ portBASE_TYPE xPortStartScheduler( void )
|
|||
|
||||
void vPortEndScheduler( void )
|
||||
{
|
||||
/* It is unlikely that the CM3 port will require this function as there
|
||||
is nothing to return to. */
|
||||
/* Not implemented in ports where there is nothing to return to.
|
||||
Artificially force an assert. */
|
||||
configASSERT( uxCriticalNesting == 1000UL );
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
@ -366,6 +367,7 @@ void vPortEnterCritical( void )
|
|||
|
||||
void vPortExitCritical( void )
|
||||
{
|
||||
configASSERT( uxCriticalNesting );
|
||||
uxCriticalNesting--;
|
||||
if( uxCriticalNesting == 0 )
|
||||
{
|
||||
|
@ -466,10 +468,10 @@ void xPortSysTickHandler( void )
|
|||
/* Restart from whatever is left in the count register to complete
|
||||
this tick period. */
|
||||
portNVIC_SYSTICK_LOAD_REG = portNVIC_SYSTICK_CURRENT_VALUE_REG;
|
||||
|
||||
|
||||
/* Restart SysTick. */
|
||||
portNVIC_SYSTICK_CTRL_REG = portNVIC_SYSTICK_CLK_BIT | portNVIC_SYSTICK_INT_BIT | portNVIC_SYSTICK_ENABLE_BIT;
|
||||
|
||||
|
||||
/* Reset the reload register to the value required for normal tick
|
||||
periods. */
|
||||
portNVIC_SYSTICK_LOAD_REG = ulTimerCountsForOneTick - 1UL;
|
||||
|
@ -518,23 +520,23 @@ void xPortSysTickHandler( void )
|
|||
if( ( portNVIC_SYSTICK_CTRL_REG & portNVIC_SYSTICK_COUNT_FLAG_BIT ) != 0 )
|
||||
{
|
||||
unsigned long ulCalculatedLoadValue;
|
||||
|
||||
|
||||
/* The tick interrupt has already executed, and the SysTick
|
||||
count reloaded with ulReloadValue. Reset the
|
||||
portNVIC_SYSTICK_LOAD_REG with whatever remains of this tick
|
||||
period. */
|
||||
ulCalculatedLoadValue = ( ulTimerCountsForOneTick - 1UL ) - ( ulReloadValue - portNVIC_SYSTICK_CURRENT_VALUE_REG );
|
||||
|
||||
/* Don't allow a tiny value, or values that have somehow
|
||||
underflowed because the post sleep hook did something
|
||||
/* Don't allow a tiny value, or values that have somehow
|
||||
underflowed because the post sleep hook did something
|
||||
that took too long. */
|
||||
if( ( ulCalculatedLoadValue < ulStoppedTimerCompensation ) || ( ulCalculatedLoadValue > ulTimerCountsForOneTick ) )
|
||||
{
|
||||
ulCalculatedLoadValue = ( ulTimerCountsForOneTick - 1UL );
|
||||
}
|
||||
|
||||
|
||||
portNVIC_SYSTICK_LOAD_REG = ulCalculatedLoadValue;
|
||||
|
||||
|
||||
/* The tick interrupt handler will already have pended the tick
|
||||
processing in the kernel. As the pending tick will be
|
||||
processed as soon as this function exits, the tick value
|
||||
|
@ -627,7 +629,7 @@ __asm void vPortClearInterruptMask( unsigned long ulNewMask )
|
|||
__asm unsigned long vPortGetIPSR( void )
|
||||
{
|
||||
PRESERVE8
|
||||
|
||||
|
||||
mrs r0, ipsr
|
||||
bx r14
|
||||
}
|
||||
|
|
|
@ -95,7 +95,7 @@ extern "C" {
|
|||
#define portMAX_DELAY ( portTickType ) 0xffff
|
||||
#else
|
||||
typedef unsigned portLONG portTickType;
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffff
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffffUL
|
||||
#endif
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
|
|
@ -382,8 +382,9 @@ portBASE_TYPE xPortStartScheduler( void )
|
|||
|
||||
void vPortEndScheduler( void )
|
||||
{
|
||||
/* It is unlikely that the CM4F port will require this function as there
|
||||
is nothing to return to. */
|
||||
/* Not implemented in ports where there is nothing to return to.
|
||||
Artificially force an assert. */
|
||||
configASSERT( uxCriticalNesting == 1000UL );
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
@ -410,6 +411,7 @@ void vPortEnterCritical( void )
|
|||
|
||||
void vPortExitCritical( void )
|
||||
{
|
||||
configASSERT( uxCriticalNesting );
|
||||
uxCriticalNesting--;
|
||||
if( uxCriticalNesting == 0 )
|
||||
{
|
||||
|
|
|
@ -95,7 +95,7 @@ extern "C" {
|
|||
#define portMAX_DELAY ( portTickType ) 0xffff
|
||||
#else
|
||||
typedef unsigned portLONG portTickType;
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffff
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffffUL
|
||||
#endif
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd.
|
||||
FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd.
|
||||
All rights reserved
|
||||
|
||||
VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.
|
||||
|
@ -444,7 +444,9 @@ static void prvYieldHandler( void )
|
|||
|
||||
void vPortEndScheduler( void )
|
||||
{
|
||||
/* Not implemented as there is nothing to return to. */
|
||||
/* Not implemented in ports where there is nothing to return to.
|
||||
Artificially force an assert. */
|
||||
configASSERT( pxCurrentTCB == NULL );
|
||||
|
||||
/* The following line is just to prevent the symbol getting optimised away. */
|
||||
( void ) vTaskSwitchContext();
|
||||
|
|
|
@ -99,7 +99,7 @@ than portSTACK_TYPE and portBASE_TYPE. */
|
|||
#define portMAX_DELAY ( portTickType ) 0xffff
|
||||
#else
|
||||
typedef unsigned portLONG portTickType;
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffff
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffffUL
|
||||
#endif
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd.
|
||||
FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd.
|
||||
All rights reserved
|
||||
|
||||
VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.
|
||||
|
@ -79,7 +79,7 @@
|
|||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/* Tasks should start with interrupts enabled and in Supervisor mode, therefore
|
||||
/* Tasks should start with interrupts enabled and in Supervisor mode, therefore
|
||||
PSW is set with U and I set, and PM and IPL clear. */
|
||||
#define portINITIAL_PSW ( ( portSTACK_TYPE ) 0x00030000 )
|
||||
|
||||
|
@ -95,7 +95,7 @@ const portBASE_TYPE * p_vSoftwareInterruptEntry = &vSoftwareInterruptEntry;
|
|||
|
||||
/*
|
||||
* Function to start the first task executing - written in asm code as direct
|
||||
* access to registers is required.
|
||||
* access to registers is required.
|
||||
*/
|
||||
static void prvStartFirstTask( void );
|
||||
|
||||
|
@ -108,7 +108,7 @@ static void prvYieldHandler( void );
|
|||
|
||||
/*
|
||||
* The entry point for the software interrupt handler. This is the function
|
||||
* that calls the inline asm function prvYieldHandler(). It is installed in
|
||||
* that calls the inline asm function prvYieldHandler(). It is installed in
|
||||
* the vector table, but the code that installs it is in prvYieldHandler rather
|
||||
* than using a #pragma.
|
||||
*/
|
||||
|
@ -123,8 +123,8 @@ extern void vTaskSwitchContext( void );
|
|||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/*
|
||||
* See header file for description.
|
||||
/*
|
||||
* See header file for description.
|
||||
*/
|
||||
portSTACK_TYPE *pxPortInitialiseStack( portSTACK_TYPE *pxTopOfStack, pdTASK_CODE pxCode, void *pvParameters )
|
||||
{
|
||||
|
@ -180,9 +180,9 @@ portSTACK_TYPE *pxPortInitialiseStack( portSTACK_TYPE *pxTopOfStack, pdTASK_CODE
|
|||
pxTopOfStack -= 15;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
*pxTopOfStack = ( portSTACK_TYPE ) pvParameters; /* R1 */
|
||||
pxTopOfStack--;
|
||||
pxTopOfStack--;
|
||||
*pxTopOfStack = 0x12345678; /* Accumulator. */
|
||||
pxTopOfStack--;
|
||||
*pxTopOfStack = 0x87654321; /* Accumulator. */
|
||||
|
@ -199,19 +199,19 @@ extern void vApplicationSetupTimerInterrupt( void );
|
|||
if( pxCurrentTCB != NULL )
|
||||
{
|
||||
/* Call an application function to set up the timer that will generate the
|
||||
tick interrupt. This way the application can decide which peripheral to
|
||||
tick interrupt. This way the application can decide which peripheral to
|
||||
use. A demo application is provided to show a suitable example. */
|
||||
vApplicationSetupTimerInterrupt();
|
||||
|
||||
/* Enable the software interrupt. */
|
||||
/* Enable the software interrupt. */
|
||||
_IEN( _ICU_SWINT ) = 1;
|
||||
|
||||
|
||||
/* Ensure the software interrupt is clear. */
|
||||
_IR( _ICU_SWINT ) = 0;
|
||||
|
||||
|
||||
/* Ensure the software interrupt is set to the kernel priority. */
|
||||
_IPR( _ICU_SWINT ) = configKERNEL_INTERRUPT_PRIORITY;
|
||||
|
||||
|
||||
/* Start the first task. */
|
||||
prvStartFirstTask();
|
||||
}
|
||||
|
@ -232,13 +232,13 @@ static void prvStartFirstTask( void )
|
|||
Just ensure the current stack is the user stack. */
|
||||
SETPSW U
|
||||
|
||||
/* Obtain the location of the stack associated with which ever task
|
||||
/* Obtain the location of the stack associated with which ever task
|
||||
pxCurrentTCB is currently pointing to. */
|
||||
MOV.L #_pxCurrentTCB, R15
|
||||
MOV.L [R15], R15
|
||||
MOV.L [R15], R0
|
||||
|
||||
/* Restore the registers from the stack of the task pointed to by
|
||||
/* Restore the registers from the stack of the task pointed to by
|
||||
pxCurrentTCB. */
|
||||
POP R15
|
||||
MVTACLO R15 /* Accumulator low 32 bits. */
|
||||
|
@ -280,18 +280,18 @@ static void prvYieldHandler( void )
|
|||
SETPSW I
|
||||
|
||||
/* Move the data that was automatically pushed onto the interrupt stack when
|
||||
the interrupt occurred from the interrupt stack to the user stack.
|
||||
|
||||
the interrupt occurred from the interrupt stack to the user stack.
|
||||
|
||||
R15 is saved before it is clobbered. */
|
||||
PUSH.L R15
|
||||
|
||||
|
||||
/* Read the user stack pointer. */
|
||||
MVFC USP, R15
|
||||
|
||||
|
||||
/* Move the address down to the data being moved. */
|
||||
SUB #12, R15
|
||||
MVTC R15, USP
|
||||
|
||||
|
||||
/* Copy the data across. */
|
||||
MOV.L [ R0 ], [ R15 ] ; R15
|
||||
MOV.L 4[ R0 ], 4[ R15 ] ; PC
|
||||
|
@ -299,13 +299,13 @@ static void prvYieldHandler( void )
|
|||
|
||||
/* Move the interrupt stack pointer to its new correct position. */
|
||||
ADD #12, R0
|
||||
|
||||
|
||||
/* All the rest of the registers are saved directly to the user stack. */
|
||||
SETPSW U
|
||||
|
||||
/* Save the rest of the general registers (R15 has been saved already). */
|
||||
PUSHM R1-R14
|
||||
|
||||
|
||||
/* Save the accumulator. */
|
||||
MVFACHI R15
|
||||
PUSH.L R15
|
||||
|
@ -317,7 +317,7 @@ static void prvYieldHandler( void )
|
|||
MOV.L #_pxCurrentTCB, R15
|
||||
MOV.L [ R15 ], R15
|
||||
MOV.L R0, [ R15 ]
|
||||
|
||||
|
||||
/* Ensure the interrupt mask is set to the syscall priority while the kernel
|
||||
structures are being accessed. */
|
||||
MVTIPL #configMAX_SYSCALL_INTERRUPT_PRIORITY
|
||||
|
@ -349,8 +349,10 @@ static void prvYieldHandler( void )
|
|||
|
||||
void vPortEndScheduler( void )
|
||||
{
|
||||
/* Not implemented as there is nothing to return to. */
|
||||
|
||||
/* Not implemented in ports where there is nothing to return to.
|
||||
Artificially force an assert. */
|
||||
configASSERT( pxCurrentTCB == NULL );
|
||||
|
||||
/* The following line is just to prevent the symbol getting optimised away. */
|
||||
( void ) vTaskSwitchContext();
|
||||
}
|
||||
|
|
|
@ -99,7 +99,7 @@ portSTACK_TYPE and portBASE_TYPE. */
|
|||
#define portMAX_DELAY ( portTickType ) 0xffff
|
||||
#else
|
||||
typedef unsigned portLONG portTickType;
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffff
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffffUL
|
||||
#endif
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd.
|
||||
FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd.
|
||||
All rights reserved
|
||||
|
||||
VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.
|
||||
|
@ -354,7 +354,9 @@ static void prvYieldHandler( void )
|
|||
|
||||
void vPortEndScheduler( void )
|
||||
{
|
||||
/* Not implemented as there is nothing to return to. */
|
||||
/* Not implemented in ports where there is nothing to return to.
|
||||
Artificially force an assert. */
|
||||
configASSERT( pxCurrentTCB == NULL );
|
||||
|
||||
/* The following line is just to prevent the symbol getting optimised away. */
|
||||
( void ) vTaskSwitchContext();
|
||||
|
|
|
@ -99,7 +99,7 @@ portSTACK_TYPE and portBASE_TYPE. */
|
|||
#define portMAX_DELAY ( portTickType ) 0xffff
|
||||
#else
|
||||
typedef unsigned portLONG portTickType;
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffff
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffffUL
|
||||
#endif
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
|
|
@ -98,7 +98,7 @@ portSTACK_TYPE and portBASE_TYPE. */
|
|||
#define portMAX_DELAY ( portTickType ) 0xffff
|
||||
#else
|
||||
typedef unsigned portLONG portTickType;
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffff
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffffUL
|
||||
#endif
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
|
|
@ -90,7 +90,7 @@
|
|||
#define portMAX_DELAY ( portTickType ) 0xffff
|
||||
#else
|
||||
typedef unsigned portLONG portTickType;
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffff
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffffUL
|
||||
#endif
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
|
|
@ -99,7 +99,7 @@ void vSerialISR( void ) interrupt 4;
|
|||
#define portMAX_DELAY ( portTickType ) 0xffff
|
||||
#else
|
||||
typedef unsigned portLONG portTickType;
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffff
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffffUL
|
||||
#endif
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
|
|
@ -96,7 +96,7 @@
|
|||
#define portMAX_DELAY ( portTickType ) 0xffff
|
||||
#else
|
||||
typedef unsigned portLONG portTickType;
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffff
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffffUL
|
||||
#endif
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
|
|
@ -102,7 +102,7 @@ FreeRTOSConfig.h to set the configMEMMODEL value. */
|
|||
#define portMAX_DELAY ( portTickType ) 0xffff
|
||||
#else
|
||||
typedef unsigned portLONG portTickType;
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffff
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffffUL
|
||||
#endif
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd.
|
||||
FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd.
|
||||
All rights reserved
|
||||
|
||||
VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.
|
||||
|
@ -169,13 +169,13 @@ portSTACK_TYPE *pxPortInitialiseStack( portSTACK_TYPE *pxTopOfStack, pdTASK_CODE
|
|||
static void prvTaskExitError( void )
|
||||
{
|
||||
/* A function that implements a task must not exit or attempt to return to
|
||||
its caller as there is nothing to return to. If a task wants to exit it
|
||||
its caller as there is nothing to return to. If a task wants to exit it
|
||||
should instead call vTaskDelete( NULL ).
|
||||
|
||||
Artificially force an assert() to be triggered if configASSERT() is
|
||||
|
||||
Artificially force an assert() to be triggered if configASSERT() is
|
||||
defined, then stop here so application writers can catch the error. */
|
||||
configASSERT( ulCriticalNesting == ~0UL );
|
||||
portDISABLE_INTERRUPTS();
|
||||
portDISABLE_INTERRUPTS();
|
||||
for( ;; );
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
@ -216,8 +216,9 @@ portBASE_TYPE xPortStartScheduler( void )
|
|||
|
||||
void vPortEndScheduler( void )
|
||||
{
|
||||
/* It is unlikely that the CM4F port will require this function as there
|
||||
is nothing to return to. */
|
||||
/* Not implemented in ports where there is nothing to return to.
|
||||
Artificially force an assert. */
|
||||
configASSERT( ulCriticalNesting == 1000UL );
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
@ -244,6 +245,7 @@ void vPortEnterCritical( void )
|
|||
|
||||
void vPortExitCritical( void )
|
||||
{
|
||||
configASSERT( ulCriticalNesting );
|
||||
ulCriticalNesting--;
|
||||
if( ulCriticalNesting == 0 )
|
||||
{
|
||||
|
|
|
@ -95,7 +95,7 @@ extern "C" {
|
|||
#define portMAX_DELAY ( portTickType ) 0xffff
|
||||
#else
|
||||
typedef unsigned portLONG portTickType;
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffff
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffffUL
|
||||
#endif
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
|
|
@ -95,7 +95,7 @@ extern "C" {
|
|||
#define portMAX_DELAY ( portTickType ) 0xffff
|
||||
#else
|
||||
typedef unsigned portLONG portTickType;
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffff
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffffUL
|
||||
#endif
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
|
|
@ -94,7 +94,7 @@ extern "C" {
|
|||
#define portMAX_DELAY ( portTickType ) 0xffff
|
||||
#else
|
||||
typedef unsigned portLONG portTickType;
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffff
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffffUL
|
||||
#endif
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue