mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-09-01 11:53:53 -04:00
Replace standard types with stdint.h types.
Replace #define types with typedefs. Rename all typedefs to have a _t extension. Add #defines to automatically convert old FreeRTOS specific types to their new names (with the _t).
This commit is contained in:
parent
f292243dcf
commit
3e20aa7d60
190 changed files with 4940 additions and 4603 deletions
|
@ -102,14 +102,14 @@ extern void vPortStartFirstTask( void );
|
|||
/*
|
||||
* Obtains the current GBR value - defined in portasm.src.
|
||||
*/
|
||||
extern unsigned long ulPortGetGBR( void );
|
||||
extern uint32_t ulPortGetGBR( void );
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/*
|
||||
* See header file for description.
|
||||
*/
|
||||
portSTACK_TYPE *pxPortInitialiseStack( portSTACK_TYPE *pxTopOfStack, pdTASK_CODE pxCode, void *pvParameters )
|
||||
StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, pdTASK_CODE pxCode, void *pvParameters )
|
||||
{
|
||||
/* Mark the end of the stack - used for debugging only and can be removed. */
|
||||
*pxTopOfStack = 0x11111111UL;
|
||||
|
@ -124,7 +124,7 @@ portSTACK_TYPE *pxPortInitialiseStack( portSTACK_TYPE *pxTopOfStack, pdTASK_CODE
|
|||
pxTopOfStack--;
|
||||
|
||||
/* PC. */
|
||||
*pxTopOfStack = ( unsigned long ) pxCode;
|
||||
*pxTopOfStack = ( uint32_t ) pxCode;
|
||||
pxTopOfStack--;
|
||||
|
||||
/* PR. */
|
||||
|
@ -172,7 +172,7 @@ portSTACK_TYPE *pxPortInitialiseStack( portSTACK_TYPE *pxTopOfStack, pdTASK_CODE
|
|||
pxTopOfStack--;
|
||||
|
||||
/* R4. */
|
||||
*pxTopOfStack = ( unsigned long ) pvParameters;
|
||||
*pxTopOfStack = ( uint32_t ) pvParameters;
|
||||
pxTopOfStack--;
|
||||
|
||||
/* R3. */
|
||||
|
@ -211,7 +211,7 @@ portSTACK_TYPE *pxPortInitialiseStack( portSTACK_TYPE *pxTopOfStack, pdTASK_CODE
|
|||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
portBASE_TYPE xPortStartScheduler( void )
|
||||
BaseType_t xPortStartScheduler( void )
|
||||
{
|
||||
extern void vApplicationSetupTimerInterrupt( void );
|
||||
|
||||
|
@ -240,7 +240,7 @@ void vPortEndScheduler( void )
|
|||
|
||||
void vPortYield( void )
|
||||
{
|
||||
long lInterruptMask;
|
||||
int32_t lInterruptMask;
|
||||
|
||||
/* Ensure the yield trap runs at the same priority as the other interrupts
|
||||
that can cause a context switch. */
|
||||
|
@ -259,10 +259,10 @@ long lInterruptMask;
|
|||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
portBASE_TYPE xPortUsesFloatingPoint( xTaskHandle xTask )
|
||||
BaseType_t xPortUsesFloatingPoint( TaskHandle_t xTask )
|
||||
{
|
||||
unsigned long *pulFlopBuffer;
|
||||
portBASE_TYPE xReturn;
|
||||
uint32_t *pulFlopBuffer;
|
||||
BaseType_t xReturn;
|
||||
extern void * volatile pxCurrentTCB;
|
||||
|
||||
/* This function tells the kernel that the task referenced by xTask is
|
||||
|
@ -273,11 +273,11 @@ extern void * volatile pxCurrentTCB;
|
|||
subject task - so pxCurrentTCB is the task handle. */
|
||||
if( xTask == NULL )
|
||||
{
|
||||
xTask = ( xTaskHandle ) pxCurrentTCB;
|
||||
xTask = ( TaskHandle_t ) pxCurrentTCB;
|
||||
}
|
||||
|
||||
/* Allocate a buffer large enough to hold all the flop registers. */
|
||||
pulFlopBuffer = ( unsigned long * ) pvPortMalloc( portFLOP_STORAGE_SIZE );
|
||||
pulFlopBuffer = ( uint32_t * ) pvPortMalloc( portFLOP_STORAGE_SIZE );
|
||||
|
||||
if( pulFlopBuffer != NULL )
|
||||
{
|
||||
|
|
|
@ -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.
|
||||
|
@ -74,7 +74,7 @@ extern "C" {
|
|||
#endif
|
||||
|
||||
/*-----------------------------------------------------------
|
||||
* Port specific definitions.
|
||||
* Port specific definitions.
|
||||
*
|
||||
* The settings in this file configure FreeRTOS correctly for the
|
||||
* given hardware and compiler.
|
||||
|
@ -90,22 +90,26 @@ portSTACK_TYPE and portBASE_TYPE. */
|
|||
#define portDOUBLE double
|
||||
#define portLONG long
|
||||
#define portSHORT short
|
||||
#define portSTACK_TYPE unsigned portLONG
|
||||
#define portSTACK_TYPE uint32_t
|
||||
#define portBASE_TYPE long
|
||||
|
||||
typedef portSTACK_TYPE StackType_t;
|
||||
typedef long BaseType_t;
|
||||
typedef unsigned long UBaseType_t;
|
||||
|
||||
#if( configUSE_16_BIT_TICKS == 1 )
|
||||
typedef unsigned portSHORT portTickType;
|
||||
#define portMAX_DELAY ( portTickType ) 0xffff
|
||||
typedef uint16_t TickType_t;
|
||||
#define portMAX_DELAY ( TickType_t ) 0xffff
|
||||
#else
|
||||
typedef unsigned portLONG portTickType;
|
||||
#define portMAX_DELAY ( portTickType ) 0xffffffffUL
|
||||
typedef uint32_t TickType_t;
|
||||
#define portMAX_DELAY ( TickType_t ) 0xffffffffUL
|
||||
#endif
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/* Hardware specifics. */
|
||||
#define portBYTE_ALIGNMENT 8
|
||||
#define portSTACK_GROWTH -1
|
||||
#define portTICK_RATE_MS ( ( portTickType ) 1000 / configTICK_RATE_HZ )
|
||||
#define portTICK_RATE_MS ( ( TickType_t ) 1000 / configTICK_RATE_HZ )
|
||||
#define portNOP() nop()
|
||||
#define portSTART_SCHEDULER_TRAP_NO ( 32 )
|
||||
#define portYIELD_TRAP_NO ( 33 )
|
||||
|
@ -117,22 +121,22 @@ void vPortYield( void );
|
|||
extern void vTaskSwitchContext( void );
|
||||
#define portYIELD_FROM_ISR( x ) if( x != pdFALSE ) vTaskSwitchContext()
|
||||
|
||||
/*
|
||||
* This function tells the kernel that the task referenced by xTask is going to
|
||||
* use the floating point registers and therefore requires the floating point
|
||||
* registers saved as part of its context.
|
||||
/*
|
||||
* This function tells the kernel that the task referenced by xTask is going to
|
||||
* use the floating point registers and therefore requires the floating point
|
||||
* registers saved as part of its context.
|
||||
*/
|
||||
portBASE_TYPE xPortUsesFloatingPoint( void* xTask );
|
||||
BaseType_t xPortUsesFloatingPoint( void* xTask );
|
||||
|
||||
/*
|
||||
* The flop save and restore functions are defined in portasm.src and called by
|
||||
* the trace "task switched in" and "trace task switched out" macros.
|
||||
* the trace "task switched in" and "trace task switched out" macros.
|
||||
*/
|
||||
void vPortSaveFlopRegisters( void *pulBuffer );
|
||||
void vPortRestoreFlopRegisters( void *pulBuffer );
|
||||
|
||||
/*
|
||||
* pxTaskTag is used to point to the buffer into which the floating point
|
||||
* pxTaskTag is used to point to the buffer into which the floating point
|
||||
* context should be saved. If pxTaskTag is NULL then the task does not use
|
||||
* a floating point context.
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue