40
40
*/
41
41
42
42
/* Type definitions. */
43
- #define portCHAR char
44
- #define portFLOAT float
45
- #define portDOUBLE double
46
- #define portLONG long
47
- #define portSHORT int
48
- #define portSTACK_TYPE uint8_t
49
- #define portBASE_TYPE char
43
+ #define portCHAR char
44
+ #define portFLOAT float
45
+ #define portDOUBLE double
46
+ #define portLONG long
47
+ #define portSHORT int
48
+ #define portSTACK_TYPE uint8_t
49
+ #define portBASE_TYPE char
50
50
51
- typedef portSTACK_TYPE StackType_t ;
52
- typedef signed char BaseType_t ;
53
- typedef unsigned char UBaseType_t ;
51
+ typedef portSTACK_TYPE StackType_t ;
52
+ typedef signed char BaseType_t ;
53
+ typedef unsigned char UBaseType_t ;
54
54
55
- #if ( configTICK_TYPE_WIDTH_IN_BITS == TICK_TYPE_WIDTH_16_BITS )
56
- typedef uint16_t TickType_t ;
57
- #define portMAX_DELAY ( TickType_t ) 0xffff
58
- #elif ( configTICK_TYPE_WIDTH_IN_BITS == TICK_TYPE_WIDTH_32_BITS )
59
- typedef uint32_t TickType_t ;
55
+ #if ( configTICK_TYPE_WIDTH_IN_BITS == TICK_TYPE_WIDTH_16_BITS )
56
+ typedef uint16_t TickType_t ;
57
+ #define portMAX_DELAY ( TickType_t ) 0xffff
58
+ #elif ( configTICK_TYPE_WIDTH_IN_BITS == TICK_TYPE_WIDTH_32_BITS )
59
+ typedef uint32_t TickType_t ;
60
60
#define portMAX_DELAY ( TickType_t ) 0xffffffffUL
61
61
#else
62
62
#error configTICK_TYPE_WIDTH_IN_BITS set to unsupported tick type width.
63
63
#endif
64
64
/*-----------------------------------------------------------*/
65
65
66
66
/* Hardware specifics. */
67
- #define portBYTE_ALIGNMENT 1
68
- #define portGLOBAL_INT_ENABLE_BIT 0x80
69
- #define portSTACK_GROWTH 1
70
- #define portTICK_PERIOD_MS ( ( TickType_t ) 1000 / configTICK_RATE_HZ )
67
+ #define portBYTE_ALIGNMENT 1
68
+ #define portGLOBAL_INT_ENABLE_BIT 0x80
69
+ #define portSTACK_GROWTH 1
70
+ #define portTICK_PERIOD_MS ( ( TickType_t ) 1000 / configTICK_RATE_HZ )
71
71
/*-----------------------------------------------------------*/
72
72
73
73
/* Critical section management. */
74
74
#define portDISABLE_INTERRUPTS () INTCONbits.GIEH = 0;
75
75
#define portENABLE_INTERRUPTS () INTCONbits.GIEH = 1;
76
76
77
77
/* Push the INTCON register onto the stack, then disable interrupts. */
78
- #define portENTER_CRITICAL () \
79
- POSTINC1 = INTCON; \
80
- INTCONbits.GIEH = 0;
78
+ #define portENTER_CRITICAL () POSTINC1 = INTCON; \
79
+ INTCONbits.GIEH = 0;
81
80
82
81
/* Retrieve the INTCON register from the stack, and enable interrupts
83
- * if they were saved as being enabled. Don't modify any other bits
84
- * within the INTCON register as these may have legitimately have been
85
- * modified within the critical region. */
86
- #define portEXIT_CRITICAL () \
87
- _asm \
88
- MOVF POSTDEC1, 1, 0 \
89
- _endasm \
90
- if( INDF1 & portGLOBAL_INT_ENABLE_BIT ) \
91
- { \
92
- portENABLE_INTERRUPTS(); \
93
- }
82
+ if they were saved as being enabled. Don't modify any other bits
83
+ within the INTCON register as these may have legitimately have been
84
+ modified within the critical region. */
85
+ #define portEXIT_CRITICAL () _asm \
86
+ MOVF POSTDEC1, 1, 0 \
87
+ _endasm \
88
+ if( INDF1 & portGLOBAL_INT_ENABLE_BIT ) \
89
+ { \
90
+ portENABLE_INTERRUPTS(); \
91
+ }
94
92
/*-----------------------------------------------------------*/
95
93
96
94
/* Task utilities. */
97
95
extern void vPortYield ( void );
98
- #define portYIELD () vPortYield()
96
+ #define portYIELD () vPortYield()
99
97
/*-----------------------------------------------------------*/
100
98
101
99
/* Task function macros as described on the FreeRTOS.org WEB site. */
102
- #define portTASK_FUNCTION_PROTO ( vFunction , pvParameters ) void vFunction( void * pvParameters )
103
- #define portTASK_FUNCTION ( vFunction , pvParameters ) void vFunction( void * pvParameters )
100
+ #define portTASK_FUNCTION_PROTO ( vFunction , pvParameters ) void vFunction( void *pvParameters )
101
+ #define portTASK_FUNCTION ( vFunction , pvParameters ) void vFunction( void *pvParameters )
104
102
/*-----------------------------------------------------------*/
105
103
106
104
/* Required by the kernel aware debugger. */
@@ -109,9 +107,8 @@ extern void vPortYield( void );
109
107
#endif
110
108
111
109
112
- #define portNOP () \
113
- _asm \
114
- NOP \
115
- _endasm
110
+ #define portNOP () _asm \
111
+ NOP \
112
+ _endasm
116
113
117
114
#endif /* PORTMACRO_H */
0 commit comments