X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=FreeRTOS%2FSource%2Fportable%2FGCC%2FSTR75x%2Fportmacro.h;h=f20feb649ab2fcf4b2648394405443e3d43938dd;hb=61e4c8bcd10d8a2d87dfda1962932c88f0c7a92f;hp=18048fdc868b8f533306aea11cfa14a488a69496;hpb=7f682e03ddc9f629d828cb8b61033bba85d9df67;p=freertos diff --git a/FreeRTOS/Source/portable/GCC/STR75x/portmacro.h b/FreeRTOS/Source/portable/GCC/STR75x/portmacro.h index 18048fdc8..f20feb649 100644 --- a/FreeRTOS/Source/portable/GCC/STR75x/portmacro.h +++ b/FreeRTOS/Source/portable/GCC/STR75x/portmacro.h @@ -1,5 +1,6 @@ /* - FreeRTOS V7.5.1 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V8.0.0:rc1 - Copyright (C) 2014 Real Time Engineers Ltd. + All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -86,31 +87,35 @@ extern "C" { #define portDOUBLE double #define portLONG long #define portSHORT short -#define portSTACK_TYPE unsigned portLONG -#define portBASE_TYPE 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 ) 0xffffffff + typedef uint32_t TickType_t; + #define portMAX_DELAY ( TickType_t ) 0xffffffffUL #endif -/*-----------------------------------------------------------*/ +/*-----------------------------------------------------------*/ /* Hardware specifics. */ #define portSTACK_GROWTH ( -1 ) -#define portTICK_RATE_MS ( ( portTickType ) 1000 / configTICK_RATE_HZ ) +#define portTICK_RATE_MS ( ( TickType_t ) 1000 / configTICK_RATE_HZ ) #define portBYTE_ALIGNMENT 8 #define portYIELD() asm volatile ( "SWI 0" ) #define portNOP() asm volatile ( "NOP" ) -/*-----------------------------------------------------------*/ +/*-----------------------------------------------------------*/ /* Critical section handling. */ /* * The interrupt management utilities can only be called from ARM mode. When - * THUMB_INTERWORK is defined the utilities are defined as functions in - * portISR.c to ensure a switch to ARM mode. When THUMB_INTERWORK is not + * THUMB_INTERWORK is defined the utilities are defined as functions in + * portISR.c to ensure a switch to ARM mode. When THUMB_INTERWORK is not * defined then the utilities are defined as macros here - as per other ports. */ @@ -121,7 +126,7 @@ extern "C" { #define portDISABLE_INTERRUPTS() vPortDisableInterruptsFromThumb() #define portENABLE_INTERRUPTS() vPortEnableInterruptsFromThumb() - + #else #define portDISABLE_INTERRUPTS() \ @@ -131,7 +136,7 @@ extern "C" { "ORR R0, R0, #0xC0 \n\t" /* Disable IRQ, FIQ. */ \ "MSR CPSR, R0 \n\t" /* Write back modified value. */ \ "LDMIA SP!, {R0} " ) /* Pop R0. */ - + #define portENABLE_INTERRUPTS() \ asm volatile ( \ "STMDB SP!, {R0} \n\t" /* Push R0. */ \ @@ -147,7 +152,7 @@ extern void vPortExitCritical( void ); #define portENTER_CRITICAL() vPortEnterCritical(); #define portEXIT_CRITICAL() vPortExitCritical(); -/*-----------------------------------------------------------*/ +/*-----------------------------------------------------------*/ /* Task utilities. */ #define portEND_SWITCHING_ISR( xSwitchRequired ) \ @@ -159,7 +164,7 @@ extern void vTaskSwitchContext( void ); \ vTaskSwitchContext(); \ } \ } -/*-----------------------------------------------------------*/ +/*-----------------------------------------------------------*/ /* Task function macros as described on the FreeRTOS.org WEB site. */ #define portTASK_FUNCTION_PROTO( vFunction, pvParameters ) void vFunction( void * pvParameters )