mirror of
https://github.com/FreeRTOS/FreeRTOS.git
synced 2026-10-02 16:24:45 +08:00
Remove unnecessary use of portLONG, portCHAR and portSHORT.
This commit is contained in:
@@ -87,7 +87,7 @@
|
||||
/* Only the current stack state is to be checked. */
|
||||
#define taskFIRST_CHECK_FOR_STACK_OVERFLOW() \
|
||||
{ \
|
||||
extern void vApplicationStackOverflowHook( xTaskHandle *pxTask, signed portCHAR *pcTaskName ); \
|
||||
extern void vApplicationStackOverflowHook( xTaskHandle *pxTask, signed char *pcTaskName ); \
|
||||
\
|
||||
/* Is the currently saved stack pointer within the stack limit? */ \
|
||||
if( pxCurrentTCB->pxTopOfStack <= pxCurrentTCB->pxStack ) \
|
||||
@@ -104,7 +104,7 @@
|
||||
/* Only the current stack state is to be checked. */
|
||||
#define taskFIRST_CHECK_FOR_STACK_OVERFLOW() \
|
||||
{ \
|
||||
extern void vApplicationStackOverflowHook( xTaskHandle *pxTask, signed portCHAR *pcTaskName ); \
|
||||
extern void vApplicationStackOverflowHook( xTaskHandle *pxTask, signed char *pcTaskName ); \
|
||||
\
|
||||
/* Is the currently saved stack pointer within the stack limit? */ \
|
||||
if( pxCurrentTCB->pxTopOfStack >= pxCurrentTCB->pxEndOfStack ) \
|
||||
@@ -120,8 +120,8 @@
|
||||
|
||||
#define taskSECOND_CHECK_FOR_STACK_OVERFLOW() \
|
||||
{ \
|
||||
extern void vApplicationStackOverflowHook( xTaskHandle *pxTask, signed portCHAR *pcTaskName ); \
|
||||
static const unsigned portCHAR ucExpectedStackBytes[] = { tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, \
|
||||
extern void vApplicationStackOverflowHook( xTaskHandle *pxTask, signed char *pcTaskName ); \
|
||||
static const unsigned char ucExpectedStackBytes[] = { tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, \
|
||||
tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, \
|
||||
tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, \
|
||||
tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, \
|
||||
@@ -142,9 +142,9 @@
|
||||
|
||||
#define taskSECOND_CHECK_FOR_STACK_OVERFLOW() \
|
||||
{ \
|
||||
extern void vApplicationStackOverflowHook( xTaskHandle *pxTask, signed portCHAR *pcTaskName ); \
|
||||
portCHAR *pcEndOfStack = ( portCHAR * ) pxCurrentTCB->pxEndOfStack; \
|
||||
static const unsigned portCHAR ucExpectedStackBytes[] = { tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, \
|
||||
extern void vApplicationStackOverflowHook( xTaskHandle *pxTask, signed char *pcTaskName ); \
|
||||
char *pcEndOfStack = ( char * ) pxCurrentTCB->pxEndOfStack; \
|
||||
static const unsigned char ucExpectedStackBytes[] = { tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, \
|
||||
tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, \
|
||||
tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, \
|
||||
tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, \
|
||||
|
||||
@@ -76,7 +76,7 @@ typedef struct corCoRoutineControlBlock
|
||||
xListItem xEventListItem; /*< List item used to place the CRCB in event lists. */
|
||||
unsigned portBASE_TYPE uxPriority; /*< The priority of the co-routine in relation to other co-routines. */
|
||||
unsigned portBASE_TYPE uxIndex; /*< Used to distinguish between co-routines when multiple co-routines use the same co-routine function. */
|
||||
unsigned portSHORT uxState; /*< Used internally by the co-routine implementation. */
|
||||
unsigned short uxState; /*< Used internally by the co-routine implementation. */
|
||||
} corCRCB; /* Co-routine control block. Note must be identical in size down to uxPriority with tskTCB. */
|
||||
|
||||
/**
|
||||
@@ -208,7 +208,7 @@ void vCoRoutineSchedule( void );
|
||||
void vACoRoutine( xCoRoutineHandle xHandle, unsigned portBASE_TYPE uxIndex )
|
||||
{
|
||||
// Variables in co-routines must be declared static if they must maintain value across a blocking call.
|
||||
static portLONG ulAVariable;
|
||||
static long ulAVariable;
|
||||
|
||||
// Must start every co-routine with a call to crSTART();
|
||||
crSTART( xHandle );
|
||||
@@ -239,7 +239,7 @@ void vCoRoutineSchedule( void );
|
||||
void vACoRoutine( xCoRoutineHandle xHandle, unsigned portBASE_TYPE uxIndex )
|
||||
{
|
||||
// Variables in co-routines must be declared static if they must maintain value across a blocking call.
|
||||
static portLONG ulAVariable;
|
||||
static long ulAVariable;
|
||||
|
||||
// Must start every co-routine with a call to crSTART();
|
||||
crSTART( xHandle );
|
||||
@@ -553,7 +553,7 @@ void vCoRoutineSchedule( void );
|
||||
// A co-routine that blocks on a queue waiting for characters to be received.
|
||||
static void vReceivingCoRoutine( xCoRoutineHandle xHandle, unsigned portBASE_TYPE uxIndex )
|
||||
{
|
||||
portCHAR cRxedChar;
|
||||
char cRxedChar;
|
||||
portBASE_TYPE xResult;
|
||||
|
||||
// All co-routines must start with a call to crSTART().
|
||||
@@ -580,7 +580,7 @@ void vCoRoutineSchedule( void );
|
||||
// a co-routine.
|
||||
void vUART_ISR( void )
|
||||
{
|
||||
portCHAR cRxedChar;
|
||||
char cRxedChar;
|
||||
portBASE_TYPE xCRWokenByPost = pdFALSE;
|
||||
|
||||
// We loop around reading characters until there are none left in the UART.
|
||||
@@ -653,7 +653,7 @@ void vCoRoutineSchedule( void );
|
||||
{
|
||||
// cChar holds its value while this co-routine is blocked and must therefore
|
||||
// be declared static.
|
||||
static portCHAR cCharToTx = 'a';
|
||||
static char cCharToTx = 'a';
|
||||
portBASE_TYPE xResult;
|
||||
|
||||
// All co-routines must start with a call to crSTART().
|
||||
@@ -696,7 +696,7 @@ void vCoRoutineSchedule( void );
|
||||
// An ISR that uses a queue to receive characters to send on a UART.
|
||||
void vUART_ISR( void )
|
||||
{
|
||||
portCHAR cCharToTx;
|
||||
char cCharToTx;
|
||||
portBASE_TYPE xCRWokenByPost = pdFALSE;
|
||||
|
||||
while( UART_TX_REG_EMPTY() )
|
||||
|
||||
+34
-34
File diff suppressed because it is too large
Load Diff
@@ -56,8 +56,8 @@
|
||||
|
||||
typedef xQueueHandle xSemaphoreHandle;
|
||||
|
||||
#define semBINARY_SEMAPHORE_QUEUE_LENGTH ( ( unsigned portCHAR ) 1 )
|
||||
#define semSEMAPHORE_QUEUE_ITEM_LENGTH ( ( unsigned portCHAR ) 0 )
|
||||
#define semBINARY_SEMAPHORE_QUEUE_LENGTH ( ( unsigned char ) 1 )
|
||||
#define semSEMAPHORE_QUEUE_ITEM_LENGTH ( ( unsigned char ) 0 )
|
||||
#define semGIVE_BLOCK_TIME ( ( portTickType ) 0 )
|
||||
|
||||
|
||||
@@ -502,7 +502,7 @@ typedef xQueueHandle xSemaphoreHandle;
|
||||
// Timer ISR
|
||||
void vTimerISR( void * pvParameters )
|
||||
{
|
||||
static unsigned portCHAR ucLocalTickCount = 0;
|
||||
static unsigned char ucLocalTickCount = 0;
|
||||
static portBASE_TYPE xHigherPriorityTaskWoken;
|
||||
|
||||
// A timer tick has occurred.
|
||||
|
||||
+17
-17
@@ -95,8 +95,8 @@ typedef struct xTIME_OUT
|
||||
typedef struct xMEMORY_REGION
|
||||
{
|
||||
void *pvBaseAddress;
|
||||
unsigned portLONG ulLengthInBytes;
|
||||
unsigned portLONG ulParameters;
|
||||
unsigned long ulLengthInBytes;
|
||||
unsigned long ulParameters;
|
||||
} xMemoryRegion;
|
||||
|
||||
/*
|
||||
@@ -105,8 +105,8 @@ typedef struct xMEMORY_REGION
|
||||
typedef struct xTASK_PARAMTERS
|
||||
{
|
||||
pdTASK_CODE pvTaskCode;
|
||||
const signed portCHAR * const pcName;
|
||||
unsigned portSHORT usStackDepth;
|
||||
const signed char * const pcName;
|
||||
unsigned short usStackDepth;
|
||||
void *pvParameters;
|
||||
unsigned portBASE_TYPE uxPriority;
|
||||
portSTACK_TYPE *puxStackBuffer;
|
||||
@@ -192,8 +192,8 @@ typedef struct xTASK_PARAMTERS
|
||||
*<pre>
|
||||
portBASE_TYPE xTaskCreate(
|
||||
pdTASK_CODE pvTaskCode,
|
||||
const portCHAR * const pcName,
|
||||
unsigned portSHORT usStackDepth,
|
||||
const char * const pcName,
|
||||
unsigned short usStackDepth,
|
||||
void *pvParameters,
|
||||
unsigned portBASE_TYPE uxPriority,
|
||||
xTaskHandle *pvCreatedTask
|
||||
@@ -894,7 +894,7 @@ void vTaskSuspendAll( void ) PRIVILEGED_FUNCTION;
|
||||
|
||||
/**
|
||||
* task. h
|
||||
* <pre>portCHAR xTaskResumeAll( void );</pre>
|
||||
* <pre>char xTaskResumeAll( void );</pre>
|
||||
*
|
||||
* Resumes real time kernel activity following a call to vTaskSuspendAll ().
|
||||
* After a call to vTaskSuspendAll () the kernel will take control of which
|
||||
@@ -972,7 +972,7 @@ portTickType xTaskGetTickCount( void ) PRIVILEGED_FUNCTION;
|
||||
|
||||
/**
|
||||
* task. h
|
||||
* <PRE>unsigned portSHORT uxTaskGetNumberOfTasks( void );</PRE>
|
||||
* <PRE>unsigned short uxTaskGetNumberOfTasks( void );</PRE>
|
||||
*
|
||||
* @return The number of tasks that the real time kernel is currently managing.
|
||||
* This includes all ready, blocked and suspended tasks. A task that
|
||||
@@ -986,7 +986,7 @@ unsigned portBASE_TYPE uxTaskGetNumberOfTasks( void ) PRIVILEGED_FUNCTION;
|
||||
|
||||
/**
|
||||
* task. h
|
||||
* <PRE>void vTaskList( portCHAR *pcWriteBuffer );</PRE>
|
||||
* <PRE>void vTaskList( char *pcWriteBuffer );</PRE>
|
||||
*
|
||||
* configUSE_TRACE_FACILITY must be defined as 1 for this function to be
|
||||
* available. See the configuration section for more information.
|
||||
@@ -1008,11 +1008,11 @@ unsigned portBASE_TYPE uxTaskGetNumberOfTasks( void ) PRIVILEGED_FUNCTION;
|
||||
* \page vTaskList vTaskList
|
||||
* \ingroup TaskUtils
|
||||
*/
|
||||
void vTaskList( signed portCHAR *pcWriteBuffer ) PRIVILEGED_FUNCTION;
|
||||
void vTaskList( signed char *pcWriteBuffer ) PRIVILEGED_FUNCTION;
|
||||
|
||||
/**
|
||||
* task. h
|
||||
* <PRE>void vTaskGetRunTimeStats( portCHAR *pcWriteBuffer );</PRE>
|
||||
* <PRE>void vTaskGetRunTimeStats( char *pcWriteBuffer );</PRE>
|
||||
*
|
||||
* configGENERATE_RUN_TIME_STATS must be defined as 1 for this function
|
||||
* to be available. The application must also then provide definitions
|
||||
@@ -1040,11 +1040,11 @@ void vTaskList( signed portCHAR *pcWriteBuffer ) PRIVILEGED_FUNCTION;
|
||||
* \page vTaskGetRunTimeStats vTaskGetRunTimeStats
|
||||
* \ingroup TaskUtils
|
||||
*/
|
||||
void vTaskGetRunTimeStats( signed portCHAR *pcWriteBuffer ) PRIVILEGED_FUNCTION;
|
||||
void vTaskGetRunTimeStats( signed char *pcWriteBuffer ) PRIVILEGED_FUNCTION;
|
||||
|
||||
/**
|
||||
* task. h
|
||||
* <PRE>void vTaskStartTrace( portCHAR * pcBuffer, unsigned portBASE_TYPE uxBufferSize );</PRE>
|
||||
* <PRE>void vTaskStartTrace( char * pcBuffer, unsigned portBASE_TYPE uxBufferSize );</PRE>
|
||||
*
|
||||
* Starts a real time kernel activity trace. The trace logs the identity of
|
||||
* which task is running when.
|
||||
@@ -1061,11 +1061,11 @@ void vTaskGetRunTimeStats( signed portCHAR *pcWriteBuffer ) PRIVILEGED_FUNCTION;
|
||||
* \page vTaskStartTrace vTaskStartTrace
|
||||
* \ingroup TaskUtils
|
||||
*/
|
||||
void vTaskStartTrace( signed portCHAR * pcBuffer, unsigned portLONG ulBufferSize ) PRIVILEGED_FUNCTION;
|
||||
void vTaskStartTrace( signed char * pcBuffer, unsigned long ulBufferSize ) PRIVILEGED_FUNCTION;
|
||||
|
||||
/**
|
||||
* task. h
|
||||
* <PRE>unsigned portLONG ulTaskEndTrace( void );</PRE>
|
||||
* <PRE>unsigned long ulTaskEndTrace( void );</PRE>
|
||||
*
|
||||
* Stops a kernel activity trace. See vTaskStartTrace ().
|
||||
*
|
||||
@@ -1074,7 +1074,7 @@ void vTaskStartTrace( signed portCHAR * pcBuffer, unsigned portLONG ulBufferSize
|
||||
* \page usTaskEndTrace usTaskEndTrace
|
||||
* \ingroup TaskUtils
|
||||
*/
|
||||
unsigned portLONG ulTaskEndTrace( void ) PRIVILEGED_FUNCTION;
|
||||
unsigned long ulTaskEndTrace( void ) PRIVILEGED_FUNCTION;
|
||||
|
||||
/**
|
||||
* task.h
|
||||
@@ -1250,7 +1250,7 @@ void vTaskPriorityDisinherit( xTaskHandle * const pxMutexHolder ) PRIVILEGED_FUN
|
||||
* Generic version of the task creation function which is in turn called by the
|
||||
* xTaskCreate() and xTaskCreateProtected() macros.
|
||||
*/
|
||||
signed portBASE_TYPE xTaskGenericCreate( pdTASK_CODE pvTaskCode, const signed portCHAR * const pcName, unsigned portSHORT usStackDepth, void *pvParameters, unsigned portBASE_TYPE uxPriority, xTaskHandle *pxCreatedTask, portSTACK_TYPE *puxStackBuffer, const xMemoryRegion * const xRegions ) PRIVILEGED_FUNCTION;
|
||||
signed portBASE_TYPE xTaskGenericCreate( pdTASK_CODE pvTaskCode, const signed char * const pcName, unsigned short usStackDepth, void *pvParameters, unsigned portBASE_TYPE uxPriority, xTaskHandle *pxCreatedTask, portSTACK_TYPE *puxStackBuffer, const xMemoryRegion * const xRegions ) PRIVILEGED_FUNCTION;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
@@ -62,18 +62,18 @@ task.h is included from an application file. */
|
||||
#undef MPU_WRAPPERS_INCLUDED_FROM_API_FILE
|
||||
|
||||
/* Constants required to access and manipulate the NVIC. */
|
||||
#define portNVIC_SYSTICK_CTRL ( ( volatile unsigned portLONG * ) 0xe000e010 )
|
||||
#define portNVIC_SYSTICK_LOAD ( ( volatile unsigned portLONG * ) 0xe000e014 )
|
||||
#define portNVIC_SYSPRI2 ( ( volatile unsigned portLONG * ) 0xe000ed20 )
|
||||
#define portNVIC_SYSPRI1 ( ( volatile unsigned portLONG * ) 0xe000ed1c )
|
||||
#define portNVIC_SYS_CTRL_STATE ( ( volatile unsigned portLONG * ) 0xe000ed24 )
|
||||
#define portNVIC_SYSTICK_CTRL ( ( volatile unsigned long * ) 0xe000e010 )
|
||||
#define portNVIC_SYSTICK_LOAD ( ( volatile unsigned long * ) 0xe000e014 )
|
||||
#define portNVIC_SYSPRI2 ( ( volatile unsigned long * ) 0xe000ed20 )
|
||||
#define portNVIC_SYSPRI1 ( ( volatile unsigned long * ) 0xe000ed1c )
|
||||
#define portNVIC_SYS_CTRL_STATE ( ( volatile unsigned long * ) 0xe000ed24 )
|
||||
#define portNVIC_MEM_FAULT_ENABLE ( 1UL << 16UL )
|
||||
|
||||
/* Constants required to access and manipulate the MPU. */
|
||||
#define portMPU_TYPE ( ( volatile unsigned portLONG * ) 0xe000ed90 )
|
||||
#define portMPU_REGION_BASE_ADDRESS ( ( volatile unsigned portLONG * ) 0xe000ed9C )
|
||||
#define portMPU_REGION_ATTRIBUTE ( ( volatile unsigned portLONG * ) 0xe000edA0 )
|
||||
#define portMPU_CTRL ( ( volatile unsigned portLONG * ) 0xe000ed94 )
|
||||
#define portMPU_TYPE ( ( volatile unsigned long * ) 0xe000ed90 )
|
||||
#define portMPU_REGION_BASE_ADDRESS ( ( volatile unsigned long * ) 0xe000ed9C )
|
||||
#define portMPU_REGION_ATTRIBUTE ( ( volatile unsigned long * ) 0xe000edA0 )
|
||||
#define portMPU_CTRL ( ( volatile unsigned long * ) 0xe000ed94 )
|
||||
#define portEXPECTED_MPU_TYPE_VALUE ( 8UL << 8UL ) /* 8 regions, unified. */
|
||||
#define portMPU_ENABLE ( 0x01UL )
|
||||
#define portMPU_BACKGROUND_ENABLE ( 1UL << 2UL )
|
||||
@@ -87,9 +87,9 @@ task.h is included from an application file. */
|
||||
#define portNVIC_SYSTICK_CLK ( 0x00000004UL )
|
||||
#define portNVIC_SYSTICK_INT ( 0x00000002UL )
|
||||
#define portNVIC_SYSTICK_ENABLE ( 0x00000001UL )
|
||||
#define portNVIC_PENDSV_PRI ( ( ( unsigned portLONG ) configKERNEL_INTERRUPT_PRIORITY ) << 16UL )
|
||||
#define portNVIC_SYSTICK_PRI ( ( ( unsigned portLONG ) configKERNEL_INTERRUPT_PRIORITY ) << 24UL )
|
||||
#define portNVIC_SVC_PRI ( ( ( unsigned portLONG ) configKERNEL_INTERRUPT_PRIORITY ) << 24UL )
|
||||
#define portNVIC_PENDSV_PRI ( ( ( unsigned long ) configKERNEL_INTERRUPT_PRIORITY ) << 16UL )
|
||||
#define portNVIC_SYSTICK_PRI ( ( ( unsigned long ) configKERNEL_INTERRUPT_PRIORITY ) << 24UL )
|
||||
#define portNVIC_SVC_PRI ( ( ( unsigned long ) configKERNEL_INTERRUPT_PRIORITY ) << 24UL )
|
||||
#define portNVIC_TEMP_SVC_PRI ( 0x01UL << 24UL )
|
||||
|
||||
/* Constants required to set up the initial stack. */
|
||||
@@ -111,44 +111,44 @@ static unsigned portBASE_TYPE uxCriticalNesting = 0xaaaaaaaa;
|
||||
/*
|
||||
* Setup the timer to generate the tick interrupts.
|
||||
*/
|
||||
static void prvSetupTimerInterrupt( void );
|
||||
static void prvSetupTimerInterrupt( void ) PRIVILEGED_FUNCTION;
|
||||
|
||||
/*
|
||||
* Configure a number of standard MPU regions that are used by all tasks.
|
||||
*/
|
||||
static void prvSetupMPU( void );
|
||||
static void prvSetupMPU( void ) PRIVILEGED_FUNCTION;
|
||||
|
||||
/*
|
||||
* Return the smallest MPU region size that a given number of bytes will fit
|
||||
* into. The region size is returned as the value that should be programmed
|
||||
* into the region attribute register for that region.
|
||||
*/
|
||||
static unsigned long prvGetMPURegionSizeSetting( unsigned long ulActualSizeInBytes );
|
||||
static unsigned long prvGetMPURegionSizeSetting( unsigned long ulActualSizeInBytes ) PRIVILEGED_FUNCTION;
|
||||
|
||||
/*
|
||||
* Checks to see if being called from the context of an unprivileged task, and
|
||||
* if so raises the privilege level and returns false - otherwise does nothing
|
||||
* other than return true.
|
||||
*/
|
||||
portBASE_TYPE prvRaisePrivilege( void ) __attribute__(( naked ));
|
||||
static portBASE_TYPE prvRaisePrivilege( void ) __attribute__(( naked ));
|
||||
|
||||
/*
|
||||
* Standard FreeRTOS exception handlers.
|
||||
*/
|
||||
void xPortPendSVHandler( void ) __attribute__ (( naked ));
|
||||
void xPortSysTickHandler( void ) __attribute__ ((optimize("3")));
|
||||
void vPortSVCHandler( void ) __attribute__ (( naked ));
|
||||
void xPortPendSVHandler( void ) __attribute__ (( naked )) PRIVILEGED_FUNCTION;
|
||||
void xPortSysTickHandler( void ) __attribute__ ((optimize("3"))) PRIVILEGED_FUNCTION;
|
||||
void vPortSVCHandler( void ) __attribute__ (( naked )) PRIVILEGED_FUNCTION;
|
||||
|
||||
/*
|
||||
* Starts the scheduler by restoring the context of the first task to run.
|
||||
*/
|
||||
static void prvRestoreContextOfFirstTask( void ) __attribute__(( naked ));
|
||||
static void prvRestoreContextOfFirstTask( void ) __attribute__(( naked )) PRIVILEGED_FUNCTION;
|
||||
|
||||
/*
|
||||
* C portion of the SVC handler. The SVC handler is split between an asm entry
|
||||
* and a C wrapper for simplicity of coding and maintenance.
|
||||
*/
|
||||
static void prvSVCHandler( unsigned long *pulRegisters ) __attribute__ ((optimize("3")));
|
||||
static void prvSVCHandler( unsigned long *pulRegisters ) __attribute__ ((optimize("3"))) PRIVILEGED_FUNCTION;
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
@@ -366,7 +366,7 @@ void xPortPendSVHandler( void )
|
||||
|
||||
void xPortSysTickHandler( void )
|
||||
{
|
||||
unsigned portLONG ulDummy;
|
||||
unsigned long ulDummy;
|
||||
|
||||
/* If using preemption, also force a context switch. */
|
||||
#if configUSE_PREEMPTION == 1
|
||||
@@ -480,7 +480,7 @@ unsigned long ulRegionSize, ulReturnValue = 4;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
portBASE_TYPE prvRaisePrivilege( void )
|
||||
static portBASE_TYPE prvRaisePrivilege( void )
|
||||
{
|
||||
__asm volatile
|
||||
(
|
||||
@@ -498,7 +498,7 @@ portBASE_TYPE prvRaisePrivilege( void )
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vPortStoreTaskMPUSettings( xMPU_SETTINGS *xMPUSettings, const struct xMEMORY_REGION * const xRegions, portSTACK_TYPE *pxBottomOfStack, unsigned portSHORT usStackDepth )
|
||||
void vPortStoreTaskMPUSettings( xMPU_SETTINGS *xMPUSettings, const struct xMEMORY_REGION * const xRegions, portSTACK_TYPE *pxBottomOfStack, unsigned short usStackDepth )
|
||||
{
|
||||
extern unsigned long __SRAM_segment_start__[];
|
||||
extern unsigned long __SRAM_segment_end__[];
|
||||
@@ -594,7 +594,7 @@ unsigned long ul;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
signed portBASE_TYPE MPU_xTaskGenericCreate( pdTASK_CODE pvTaskCode, const signed portCHAR * const pcName, unsigned portSHORT usStackDepth, void *pvParameters, unsigned portBASE_TYPE uxPriority, xTaskHandle *pxCreatedTask, portSTACK_TYPE *puxStackBuffer, const xMemoryRegion * const xRegions )
|
||||
signed portBASE_TYPE MPU_xTaskGenericCreate( pdTASK_CODE pvTaskCode, const signed char * const pcName, unsigned short usStackDepth, void *pvParameters, unsigned portBASE_TYPE uxPriority, xTaskHandle *pxCreatedTask, portSTACK_TYPE *puxStackBuffer, const xMemoryRegion * const xRegions )
|
||||
{
|
||||
signed portBASE_TYPE xReturn;
|
||||
portBASE_TYPE xRunningPrivileged = prvRaisePrivilege();
|
||||
@@ -748,7 +748,7 @@ portBASE_TYPE xRunningPrivileged = prvRaisePrivilege();
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void MPU_vTaskList( signed portCHAR *pcWriteBuffer )
|
||||
void MPU_vTaskList( signed char *pcWriteBuffer )
|
||||
{
|
||||
portBASE_TYPE xRunningPrivileged = prvRaisePrivilege();
|
||||
|
||||
@@ -759,7 +759,7 @@ portBASE_TYPE xRunningPrivileged = prvRaisePrivilege();
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
#if ( configGENERATE_RUN_TIME_STATS == 1 )
|
||||
void MPU_vTaskGetRunTimeStats( signed portCHAR *pcWriteBuffer )
|
||||
void MPU_vTaskGetRunTimeStats( signed char *pcWriteBuffer )
|
||||
{
|
||||
portBASE_TYPE xRunningPrivileged = prvRaisePrivilege();
|
||||
|
||||
@@ -770,7 +770,7 @@ portBASE_TYPE xRunningPrivileged = prvRaisePrivilege();
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
#if ( configUSE_TRACE_FACILITY == 1 )
|
||||
void MPU_vTaskStartTrace( signed portCHAR * pcBuffer, unsigned portLONG ulBufferSize )
|
||||
void MPU_vTaskStartTrace( signed char * pcBuffer, unsigned long ulBufferSize )
|
||||
{
|
||||
portBASE_TYPE xRunningPrivileged = prvRaisePrivilege();
|
||||
|
||||
@@ -781,9 +781,9 @@ portBASE_TYPE xRunningPrivileged = prvRaisePrivilege();
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
#if ( configUSE_TRACE_FACILITY == 1 )
|
||||
unsigned portLONG MPU_ulTaskEndTrace( void )
|
||||
unsigned long MPU_ulTaskEndTrace( void )
|
||||
{
|
||||
unsigned portLONG ulReturn;
|
||||
unsigned long ulReturn;
|
||||
portBASE_TYPE xRunningPrivileged = prvRaisePrivilege();
|
||||
|
||||
ulReturn = ulTaskEndTrace();
|
||||
@@ -992,7 +992,7 @@ signed portBASE_TYPE xReturn;
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
#if configQUEUE_REGISTRY_SIZE > 0
|
||||
void MPU_vQueueAddToRegistry( xQueueHandle xQueue, signed portCHAR *pcName )
|
||||
void MPU_vQueueAddToRegistry( xQueueHandle xQueue, signed char *pcName )
|
||||
{
|
||||
portBASE_TYPE xRunningPrivileged = prvRaisePrivilege();
|
||||
|
||||
|
||||
+10
-10
@@ -91,11 +91,11 @@ zero. */
|
||||
*/
|
||||
typedef struct QueueDefinition
|
||||
{
|
||||
signed portCHAR *pcHead; /*< Points to the beginning of the queue storage area. */
|
||||
signed portCHAR *pcTail; /*< Points to the byte at the end of the queue storage area. Once more byte is allocated than necessary to store the queue items, this is used as a marker. */
|
||||
signed char *pcHead; /*< Points to the beginning of the queue storage area. */
|
||||
signed char *pcTail; /*< Points to the byte at the end of the queue storage area. Once more byte is allocated than necessary to store the queue items, this is used as a marker. */
|
||||
|
||||
signed portCHAR *pcWriteTo; /*< Points to the free next place in the storage area. */
|
||||
signed portCHAR *pcReadFrom; /*< Points to the last place that a queued item was read from. */
|
||||
signed char *pcWriteTo; /*< Points to the free next place in the storage area. */
|
||||
signed char *pcReadFrom; /*< Points to the last place that a queued item was read from. */
|
||||
|
||||
xList xTasksWaitingToSend; /*< List of tasks that are blocked waiting to post onto this queue. Stored in priority order. */
|
||||
xList xTasksWaitingToReceive; /*< List of tasks that are blocked waiting to read from this queue. Stored in priority order. */
|
||||
@@ -161,7 +161,7 @@ unsigned portBASE_TYPE uxQueueMessagesWaitingFromISR( const xQueueHandle pxQueue
|
||||
more user friendly. */
|
||||
typedef struct QUEUE_REGISTRY_ITEM
|
||||
{
|
||||
signed portCHAR *pcQueueName;
|
||||
signed char *pcQueueName;
|
||||
xQueueHandle xHandle;
|
||||
} xQueueRegistryItem;
|
||||
|
||||
@@ -173,7 +173,7 @@ unsigned portBASE_TYPE uxQueueMessagesWaitingFromISR( const xQueueHandle pxQueue
|
||||
/* Removes a queue from the registry by simply setting the pcQueueName
|
||||
member to NULL. */
|
||||
static void vQueueUnregisterQueue( xQueueHandle xQueue ) PRIVILEGED_FUNCTION;
|
||||
void vQueueAddToRegistry( xQueueHandle xQueue, signed portCHAR *pcQueueName ) PRIVILEGED_FUNCTION;
|
||||
void vQueueAddToRegistry( xQueueHandle xQueue, signed char *pcQueueName ) PRIVILEGED_FUNCTION;
|
||||
#endif
|
||||
|
||||
/*
|
||||
@@ -253,7 +253,7 @@ size_t xQueueSizeInBytes;
|
||||
longer than asked for to make wrap checking easier/faster. */
|
||||
xQueueSizeInBytes = ( size_t ) ( uxQueueLength * uxItemSize ) + ( size_t ) 1;
|
||||
|
||||
pxNewQueue->pcHead = ( signed portCHAR * ) pvPortMalloc( xQueueSizeInBytes );
|
||||
pxNewQueue->pcHead = ( signed char * ) pvPortMalloc( xQueueSizeInBytes );
|
||||
if( pxNewQueue->pcHead != NULL )
|
||||
{
|
||||
/* Initialise the queue members as described above where the
|
||||
@@ -638,7 +638,7 @@ xTimeOutType xTimeOut;
|
||||
{
|
||||
signed portBASE_TYPE xEntryTimeSet = pdFALSE;
|
||||
xTimeOutType xTimeOut;
|
||||
signed portCHAR *pcOriginalReadPosition;
|
||||
signed char *pcOriginalReadPosition;
|
||||
|
||||
for( ;; )
|
||||
{
|
||||
@@ -815,7 +815,7 @@ signed portBASE_TYPE xQueueGenericReceive( xQueueHandle pxQueue, void * const pv
|
||||
{
|
||||
signed portBASE_TYPE xEntryTimeSet = pdFALSE;
|
||||
xTimeOutType xTimeOut;
|
||||
signed portCHAR *pcOriginalReadPosition;
|
||||
signed char *pcOriginalReadPosition;
|
||||
|
||||
/* This function relaxes the coding standard somewhat to allow return
|
||||
statements within the function itself. This is done in the interest
|
||||
@@ -1414,7 +1414,7 @@ signed portBASE_TYPE xReturn;
|
||||
|
||||
#if configQUEUE_REGISTRY_SIZE > 0
|
||||
|
||||
void vQueueAddToRegistry( xQueueHandle xQueue, signed portCHAR *pcQueueName )
|
||||
void vQueueAddToRegistry( xQueueHandle xQueue, signed char *pcQueueName )
|
||||
{
|
||||
unsigned portBASE_TYPE ux;
|
||||
|
||||
|
||||
+63
-63
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user