diff options
author | Richard Barry <ribarry@amazon.com> | 2013-12-29 14:06:04 +0000 |
---|---|---|
committer | Richard Barry <ribarry@amazon.com> | 2013-12-29 14:06:04 +0000 |
commit | 3e20aa7d60bdbaffa3a02c068d6ed11a3d49a7bd (patch) | |
tree | b2dae31afc1db02da75f3acc8b442438b4182d59 /FreeRTOS/Source/portable/SDCC/Cygnal/portmacro.h | |
parent | f292243dcffb6927855645015ec3d88af326431b (diff) | |
download | freertos-git-3e20aa7d60bdbaffa3a02c068d6ed11a3d49a7bd.tar.gz |
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).
Diffstat (limited to 'FreeRTOS/Source/portable/SDCC/Cygnal/portmacro.h')
-rw-r--r-- | FreeRTOS/Source/portable/SDCC/Cygnal/portmacro.h | 30 |
1 files changed, 17 insertions, 13 deletions
diff --git a/FreeRTOS/Source/portable/SDCC/Cygnal/portmacro.h b/FreeRTOS/Source/portable/SDCC/Cygnal/portmacro.h index 9f4e33aa9..63a19fa7f 100644 --- a/FreeRTOS/Source/portable/SDCC/Cygnal/portmacro.h +++ b/FreeRTOS/Source/portable/SDCC/Cygnal/portmacro.h @@ -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.
@@ -76,7 +76,7 @@ void vSerialISR( void ) interrupt 4; /*-----------------------------------------------------------
- * Port specific definitions.
+ * Port specific definitions.
*
* The settings in this file configure FreeRTOS correctly for the
* given hardware and compiler.
@@ -91,17 +91,21 @@ void vSerialISR( void ) interrupt 4; #define portDOUBLE float
#define portLONG long
#define portSHORT short
-#define portSTACK_TYPE unsigned portCHAR
+#define portSTACK_TYPE uint8_t
#define portBASE_TYPE char
+typedef portSTACK_TYPE StackType_t;
+typedef signed char BaseType_t;
+typedef unsigned char 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
-/*-----------------------------------------------------------*/
+/*-----------------------------------------------------------*/
/* Critical section management. */
#define portENTER_CRITICAL() _asm \
@@ -121,24 +125,24 @@ void vSerialISR( void ) interrupt 4; #define portDISABLE_INTERRUPTS() EA = 0;
#define portENABLE_INTERRUPTS() EA = 1;
-/*-----------------------------------------------------------*/
+/*-----------------------------------------------------------*/
/* Hardware specifics. */
#define portBYTE_ALIGNMENT 1
#define portSTACK_GROWTH ( 1 )
-#define portTICK_RATE_MS ( ( unsigned portLONG ) 1000 / configTICK_RATE_HZ )
-/*-----------------------------------------------------------*/
+#define portTICK_RATE_MS ( ( uint32_t ) 1000 / configTICK_RATE_HZ )
+/*-----------------------------------------------------------*/
/* Task utilities. */
void vPortYield( void ) _naked;
#define portYIELD() vPortYield();
-/*-----------------------------------------------------------*/
+/*-----------------------------------------------------------*/
#define portNOP() _asm \
nop \
_endasm;
-/*-----------------------------------------------------------*/
+/*-----------------------------------------------------------*/
/* Task function macros as described on the FreeRTOS.org WEB site. */
#define portTASK_FUNCTION_PROTO( vFunction, pvParameters ) void vFunction( void *pvParameters )
|