X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=FreeRTOS%2FSource%2Fportable%2FGCC%2FAVR32_UC3%2Fportmacro.h;h=1b6ebde127ee58ac722d97734c1ac9fcd1b362ff;hb=5bbbb908620dd4b418bfc298e9f752b747885236;hp=fa81f5112418b78d79dd888b1cf853e5fd00c9cf;hpb=b18af6b07e944b8c932a9be32fbce2344510896c;p=freertos diff --git a/FreeRTOS/Source/portable/GCC/AVR32_UC3/portmacro.h b/FreeRTOS/Source/portable/GCC/AVR32_UC3/portmacro.h index fa81f5112..1b6ebde12 100644 --- a/FreeRTOS/Source/portable/GCC/AVR32_UC3/portmacro.h +++ b/FreeRTOS/Source/portable/GCC/AVR32_UC3/portmacro.h @@ -13,7 +13,8 @@ *****************************************************************************/ /* - FreeRTOS V7.5.0 - 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. @@ -104,27 +105,31 @@ 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 -#define TASK_DELAY_MS(x) ( (x) /portTICK_RATE_MS ) -#define TASK_DELAY_S(x) ( (x)*1000 /portTICK_RATE_MS ) -#define TASK_DELAY_MIN(x) ( (x)*60*1000/portTICK_RATE_MS ) +typedef portSTACK_TYPE StackType_t; +typedef long BaseType_t; +typedef unsigned long UBaseType_t; + +#define TASK_DELAY_MS(x) ( (x) /portTICK_PERIOD_MS ) +#define TASK_DELAY_S(x) ( (x)*1000 /portTICK_PERIOD_MS ) +#define TASK_DELAY_MIN(x) ( (x)*60*1000/portTICK_PERIOD_MS ) #define configTICK_TC_IRQ ATPASTE2(AVR32_TC_IRQ, configTICK_TC_CHANNEL) #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 /*-----------------------------------------------------------*/ /* Architecture specifics. */ #define portSTACK_GROWTH ( -1 ) -#define portTICK_RATE_MS ( ( portTickType ) 1000 / configTICK_RATE_HZ ) +#define portTICK_PERIOD_MS ( ( TickType_t ) 1000 / configTICK_RATE_HZ ) #define portBYTE_ALIGNMENT 4 #define portNOP() {__asm__ __volatile__ ("nop");} /*-----------------------------------------------------------*/ @@ -192,7 +197,7 @@ extern void *pvPortRealloc( void *pv, size_t xSize ); */ #define portRESTORE_CONTEXT() \ { \ - extern volatile unsigned portLONG ulCriticalNesting; \ + extern volatile uint32_t ulCriticalNesting; \ extern volatile void *volatile pxCurrentTCB; \ \ __asm__ __volatile__ ( \ @@ -298,7 +303,7 @@ extern void *pvPortRealloc( void *pv, size_t xSize ); */ #define portSAVE_CONTEXT_OS_INT() \ { \ - extern volatile unsigned portLONG ulCriticalNesting; \ + extern volatile uint32_t ulCriticalNesting; \ extern volatile void *volatile pxCurrentTCB; \ \ /* When we come here */ \ @@ -350,7 +355,7 @@ extern void *pvPortRealloc( void *pv, size_t xSize ); */ #define portRESTORE_CONTEXT_OS_INT() \ { \ - extern volatile unsigned portLONG ulCriticalNesting; \ + extern volatile uint32_t ulCriticalNesting; \ extern volatile void *volatile pxCurrentTCB; \ \ /* Check if INT0 or higher were being handled (case where the OS tick interrupted another */ \ @@ -416,7 +421,7 @@ extern void *pvPortRealloc( void *pv, size_t xSize ); */ #define portSAVE_CONTEXT_SCALL() \ { \ - extern volatile unsigned portLONG ulCriticalNesting; \ + extern volatile uint32_t ulCriticalNesting; \ extern volatile void *volatile pxCurrentTCB; \ \ /* Warning: the stack layout after SCALL doesn't match the one after an interrupt. */ \ @@ -483,7 +488,7 @@ extern void *pvPortRealloc( void *pv, size_t xSize ); */ #define portRESTORE_CONTEXT_SCALL() \ { \ - extern volatile unsigned portLONG ulCriticalNesting; \ + extern volatile uint32_t ulCriticalNesting; \ extern volatile void *volatile pxCurrentTCB; \ \ /* Restore all registers */ \ @@ -575,7 +580,7 @@ extern void *pvPortRealloc( void *pv, size_t xSize ); */ #define portENTER_SWITCHING_ISR() \ { \ - extern volatile unsigned portLONG ulCriticalNesting; \ + extern volatile uint32_t ulCriticalNesting; \ extern volatile void *volatile pxCurrentTCB; \ \ /* When we come here */ \ @@ -623,7 +628,7 @@ extern void *pvPortRealloc( void *pv, size_t xSize ); */ #define portEXIT_SWITCHING_ISR() \ { \ - extern volatile unsigned portLONG ulCriticalNesting; \ + extern volatile uint32_t ulCriticalNesting; \ extern volatile void *volatile pxCurrentTCB; \ \ __asm__ __volatile__ ( \