Skip to content

Commit b3febb7

Browse files
Skptakkar-rahul-awsaggarg
authored
Revert formatting on Tasking ports (#887)
Co-authored-by: Rahul Kar <[email protected]> Co-authored-by: Gaurav-Aggarwal-AWS <[email protected]>
1 parent 92365c9 commit b3febb7

File tree

2 files changed

+57
-57
lines changed

2 files changed

+57
-57
lines changed

portable/Tasking/ARM_CM4F/port.c

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -35,26 +35,26 @@
3535
#include "task.h"
3636

3737
/* Constants required to manipulate the NVIC. */
38-
#define portNVIC_SYSTICK_CTRL ( ( volatile uint32_t * ) 0xe000e010 )
39-
#define portNVIC_SYSTICK_LOAD ( ( volatile uint32_t * ) 0xe000e014 )
40-
#define portNVIC_SHPR3_REG ( ( volatile uint32_t * ) 0xe000ed20 )
41-
#define portNVIC_SYSTICK_CLK 0x00000004
42-
#define portNVIC_SYSTICK_INT 0x00000002
43-
#define portNVIC_SYSTICK_ENABLE 0x00000001
44-
#define portMIN_INTERRUPT_PRIORITY ( 255UL )
45-
#define portNVIC_PENDSV_PRI ( ( ( uint32_t ) portMIN_INTERRUPT_PRIORITY ) << 16UL )
46-
#define portNVIC_SYSTICK_PRI ( ( ( uint32_t ) portMIN_INTERRUPT_PRIORITY ) << 24UL )
38+
#define portNVIC_SYSTICK_CTRL ( ( volatile uint32_t * ) 0xe000e010 )
39+
#define portNVIC_SYSTICK_LOAD ( ( volatile uint32_t * ) 0xe000e014 )
40+
#define portNVIC_SHPR3_REG ( ( volatile uint32_t * ) 0xe000ed20 )
41+
#define portNVIC_SYSTICK_CLK 0x00000004
42+
#define portNVIC_SYSTICK_INT 0x00000002
43+
#define portNVIC_SYSTICK_ENABLE 0x00000001
44+
#define portMIN_INTERRUPT_PRIORITY ( 255UL )
45+
#define portNVIC_PENDSV_PRI ( ( ( uint32_t ) portMIN_INTERRUPT_PRIORITY ) << 16UL )
46+
#define portNVIC_SYSTICK_PRI ( ( ( uint32_t ) portMIN_INTERRUPT_PRIORITY ) << 24UL )
4747

4848
/* Masks off all bits but the VECTACTIVE bits in the ICSR register. */
49-
#define portVECTACTIVE_MASK ( 0xFFUL )
49+
#define portVECTACTIVE_MASK ( 0xFFUL )
5050

5151
/* Constants required to manipulate the VFP. */
52-
#define portFPCCR ( ( volatile uint32_t * ) 0xe000ef34 ) /* Floating point context control register. */
53-
#define portASPEN_AND_LSPEN_BITS ( 0x3UL << 30UL )
52+
#define portFPCCR ( ( volatile uint32_t * ) 0xe000ef34 ) /* Floating point context control register. */
53+
#define portASPEN_AND_LSPEN_BITS ( 0x3UL << 30UL )
5454

5555
/* Constants required to set up the initial stack. */
56-
#define portINITIAL_XPSR ( 0x01000000 )
57-
#define portINITIAL_EXC_RETURN ( 0xfffffffd )
56+
#define portINITIAL_XPSR ( 0x01000000 )
57+
#define portINITIAL_EXC_RETURN ( 0xfffffffd )
5858

5959
/* Let the user override the pre-loading of the initial LR with the address of
6060
* prvTaskExitError() in case it messes up unwinding of the stack in the
@@ -272,4 +272,4 @@ void prvSetupTimerInterrupt( void )
272272
/* Configure SysTick to interrupt at the requested rate. */
273273
*( portNVIC_SYSTICK_LOAD ) = ( configCPU_CLOCK_HZ / configTICK_RATE_HZ ) - 1UL;
274274
*( portNVIC_SYSTICK_CTRL ) = portNVIC_SYSTICK_CLK | portNVIC_SYSTICK_INT | portNVIC_SYSTICK_ENABLE;
275-
}
275+
}

portable/Tasking/ARM_CM4F/portmacro.h

Lines changed: 42 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

2929

3030
#ifndef PORTMACRO_H
31-
#define PORTMACRO_H
31+
#define PORTMACRO_H
3232

3333
/* *INDENT-OFF* */
3434
#ifdef __cplusplus
@@ -47,38 +47,38 @@
4747
*/
4848

4949
/* Type definitions. */
50-
#define portCHAR char
51-
#define portFLOAT float
52-
#define portDOUBLE double
53-
#define portLONG long
54-
#define portSHORT short
55-
#define portSTACK_TYPE uint32_t
56-
#define portBASE_TYPE long
57-
58-
typedef portSTACK_TYPE StackType_t;
59-
typedef long BaseType_t;
60-
typedef unsigned long UBaseType_t;
61-
62-
63-
#if ( configTICK_TYPE_WIDTH_IN_BITS == TICK_TYPE_WIDTH_16_BITS )
64-
typedef uint16_t TickType_t;
65-
#define portMAX_DELAY ( TickType_t ) 0xffff
66-
#elif ( configTICK_TYPE_WIDTH_IN_BITS == TICK_TYPE_WIDTH_32_BITS )
67-
typedef uint32_t TickType_t;
68-
#define portMAX_DELAY ( TickType_t ) 0xffffffffUL
50+
#define portCHAR char
51+
#define portFLOAT float
52+
#define portDOUBLE double
53+
#define portLONG long
54+
#define portSHORT short
55+
#define portSTACK_TYPE uint32_t
56+
#define portBASE_TYPE long
57+
58+
typedef portSTACK_TYPE StackType_t;
59+
typedef long BaseType_t;
60+
typedef unsigned long UBaseType_t;
61+
62+
63+
#if ( configTICK_TYPE_WIDTH_IN_BITS == TICK_TYPE_WIDTH_16_BITS )
64+
typedef uint16_t TickType_t;
65+
#define portMAX_DELAY ( TickType_t ) 0xffff
66+
#elif ( configTICK_TYPE_WIDTH_IN_BITS == TICK_TYPE_WIDTH_32_BITS )
67+
typedef uint32_t TickType_t;
68+
#define portMAX_DELAY ( TickType_t ) 0xffffffffUL
6969

7070
/* 32-bit tick type on a 32-bit architecture, so reads of the tick count do
7171
* not need to be guarded with a critical section. */
72-
#define portTICK_TYPE_IS_ATOMIC 1
73-
#else
74-
#error configTICK_TYPE_WIDTH_IN_BITS set to unsupported tick type width.
75-
#endif
72+
#define portTICK_TYPE_IS_ATOMIC 1
73+
#else
74+
#error configTICK_TYPE_WIDTH_IN_BITS set to unsupported tick type width.
75+
#endif
7676
/*-----------------------------------------------------------*/
7777

7878
/* Architecture specifics. */
79-
#define portSTACK_GROWTH ( -1 )
80-
#define portTICK_PERIOD_MS ( ( TickType_t ) 1000 / configTICK_RATE_HZ )
81-
#define portBYTE_ALIGNMENT 8
79+
#define portSTACK_GROWTH ( -1 )
80+
#define portTICK_PERIOD_MS ( ( TickType_t ) 1000 / configTICK_RATE_HZ )
81+
#define portBYTE_ALIGNMENT 8
8282
/*-----------------------------------------------------------*/
8383

8484

@@ -111,36 +111,36 @@ extern void vPortYield( void );
111111
* Set basepri to portMAX_SYSCALL_INTERRUPT_PRIORITY without effecting other
112112
* registers. r0 is clobbered.
113113
*/
114-
#define portSET_INTERRUPT_MASK() __set_BASEPRI( configMAX_SYSCALL_INTERRUPT_PRIORITY )
114+
#define portSET_INTERRUPT_MASK() __set_BASEPRI( configMAX_SYSCALL_INTERRUPT_PRIORITY )
115115

116116
/*
117117
* Set basepri back to 0 without effective other registers.
118118
* r0 is clobbered. FAQ: Setting BASEPRI to 0 is not a bug. Please see
119119
* https://www.FreeRTOS.org/RTOS-Cortex-M3-M4.html before disagreeing.
120120
*/
121-
#define portCLEAR_INTERRUPT_MASK() __set_BASEPRI( 0 )
121+
#define portCLEAR_INTERRUPT_MASK() __set_BASEPRI( 0 )
122122

123-
extern uint32_t ulPortSetInterruptMask( void );
124-
extern void vPortClearInterruptMask( uint32_t ulNewMask );
125-
#define portSET_INTERRUPT_MASK_FROM_ISR() ulPortSetInterruptMask()
126-
#define portCLEAR_INTERRUPT_MASK_FROM_ISR( x ) vPortClearInterruptMask( x )
123+
extern uint32_t ulPortSetInterruptMask( void );
124+
extern void vPortClearInterruptMask( uint32_t ulNewMask );
125+
#define portSET_INTERRUPT_MASK_FROM_ISR() ulPortSetInterruptMask()
126+
#define portCLEAR_INTERRUPT_MASK_FROM_ISR( x ) vPortClearInterruptMask( x )
127127

128128

129-
extern void vPortEnterCritical( void );
130-
extern void vPortExitCritical( void );
129+
extern void vPortEnterCritical( void );
130+
extern void vPortExitCritical( void );
131131

132-
#define portDISABLE_INTERRUPTS() portSET_INTERRUPT_MASK()
133-
#define portENABLE_INTERRUPTS() portCLEAR_INTERRUPT_MASK()
134-
#define portENTER_CRITICAL() vPortEnterCritical()
135-
#define portEXIT_CRITICAL() vPortExitCritical()
132+
#define portDISABLE_INTERRUPTS() portSET_INTERRUPT_MASK()
133+
#define portENABLE_INTERRUPTS() portCLEAR_INTERRUPT_MASK()
134+
#define portENTER_CRITICAL() vPortEnterCritical()
135+
#define portEXIT_CRITICAL() vPortExitCritical()
136136

137137
/*-----------------------------------------------------------*/
138138

139139
/* Task function macros as described on the FreeRTOS.org WEB site. */
140-
#define portTASK_FUNCTION_PROTO( vFunction, pvParameters ) void vFunction( void * pvParameters )
141-
#define portTASK_FUNCTION( vFunction, pvParameters ) void vFunction( void * pvParameters )
140+
#define portTASK_FUNCTION_PROTO( vFunction, pvParameters ) void vFunction( void * pvParameters )
141+
#define portTASK_FUNCTION( vFunction, pvParameters ) void vFunction( void * pvParameters )
142142

143-
#define portNOP()
143+
#define portNOP()
144144

145145
/* *INDENT-OFF* */
146146
#ifdef __cplusplus

0 commit comments

Comments
 (0)