Skip to content

Commit a42c0da

Browse files
committed
minor cleanups - no functional changes
1 parent 6781d5d commit a42c0da

File tree

4 files changed

+7
-12
lines changed

4 files changed

+7
-12
lines changed

src/FreeRTOSConfig.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,6 @@
108108

109109
#define configSUPPORT_DYNAMIC_ALLOCATION 1
110110

111-
112111
/* Timer definitions. */
113112
#define configUSE_TIMERS 1
114113
#define configTIMER_TASK_PRIORITY ( ( UBaseType_t ) 3 )
@@ -128,7 +127,7 @@ to exclude the API function. */
128127
#define INCLUDE_vTaskPrioritySet 1
129128
#define INCLUDE_uxTaskPriorityGet 1
130129
#define INCLUDE_vTaskDelete 1
131-
#define INCLUDE_vTaskCleanUpResources 0
130+
#define INCLUDE_vTaskCleanUpResources 1
132131
#define INCLUDE_vTaskSuspend 1
133132
#define INCLUDE_vResumeFromISR 1
134133
#define INCLUDE_vTaskDelayUntil 1

src/mpu_wrappers.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ only for ports that are using the MPU. */
191191
#else /* portUSING_MPU_WRAPPERS */
192192

193193
#if defined(__AVR_ATmega2560__) || defined(__AVR_ATmega2561__) // Mega with 2560
194-
#define PRIVILEGED_FUNCTION __attribute__ ((hot, flatten))
194+
#define PRIVILEGED_FUNCTION __attribute__ ((hot))
195195
#define PRIVILEGED_DATA
196196
#define portUSING_MPU_WRAPPERS 0
197197
#elif defined(__AVR_ATmega640__) || defined(__AVR_ATmega1280__) || defined(__AVR_ATmega1281__) || defined(__AVR_ATmega664P__) || defined(__AVR_ATmega1284P__) || defined(__AVR_ATmega1284PA__) // Goldilocks with 1284p

src/port.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -552,9 +552,9 @@ void prvSetupTimerInterrupt( void )
552552
* use ISR_NOBLOCK where there is an important timer running, that should preempt the scheduler.
553553
*
554554
*/
555-
// ISR(portSCHEDULER_ISR, ISR_NAKED ISR_NOBLOCK)
555+
// ISR(portSCHEDULER_ISR, ISR_NAKED ISR_NOBLOCK) __attribute__ ((hot, flatten));
556556
ISR(portSCHEDULER_ISR, ISR_NAKED) __attribute__ ((hot, flatten));
557-
ISR(portSCHEDULER_ISR, ISR_NAKED)
557+
ISR(portSCHEDULER_ISR)
558558
{
559559
vPortYieldFromTick();
560560
__asm__ __volatile__ ( "reti" );
@@ -568,7 +568,7 @@ void prvSetupTimerInterrupt( void )
568568
*
569569
* use ISR_NOBLOCK where there is an important timer running, that should preempt the scheduler.
570570
*/
571-
// ISR(portSCHEDULER_ISR, ISR_NOBLOCK)
571+
// ISR(portSCHEDULER_ISR, ISR_NOBLOCK) __attribute__ ((hot, flatten));
572572
ISR(portSCHEDULER_ISR) __attribute__ ((hot, flatten));
573573
ISR(portSCHEDULER_ISR)
574574
{

src/portmacro.h

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ typedef unsigned char UBaseType_t;
134134
#define portENABLE_INTERRUPTS() __asm__ __volatile__ ( "sei" ::: "memory")
135135

136136
/*-----------------------------------------------------------*/
137+
137138
/**
138139
Enable the watchdog timer, configuring it for expire after
139140
(value) timeout (which is a combination of the WDP0
@@ -214,7 +215,6 @@ typedef unsigned char UBaseType_t;
214215
* from data sheet.
215216
*/
216217
#define portTICK_PERIOD_MS ( (TickType_t) _BV( portUSE_WDTO + 4 ) ) // Inaccurately assuming 128 kHz Watchdog Timer.
217-
// #define portTICK_PERIOD_MS ( (TickType_t)( (uint32_t) _BV( portUSE_WDTO + 11 ) / 128 ) ) // If you want accuracy, read datasheet.
218218

219219
/*-----------------------------------------------------------*/
220220

@@ -228,15 +228,11 @@ extern void vPortYield( void ) __attribute__ ( ( naked ) );
228228
/* Task function macros as described on the FreeRTOS.org WEB site. */
229229
// This changed to add .lowtext tag for the linker for ATmega2560 and ATmega2561. To make sure they are loaded in low memory.
230230
#define portTASK_FUNCTION_PROTO( vFunction, pvParameters ) void vFunction( void *pvParameters ) __attribute__ ((section (".lowtext")))
231-
#define portTASK_FUNCTION( vFunction, pvParameters ) void vFunction( void *pvParameters )
232-
233231
#else
234232
#define portTASK_FUNCTION_PROTO( vFunction, pvParameters ) void vFunction( void *pvParameters )
235-
#define portTASK_FUNCTION( vFunction, pvParameters ) void vFunction( void *pvParameters )
236-
237233
#endif
238234

239-
235+
#define portTASK_FUNCTION( vFunction, pvParameters ) void vFunction( void *pvParameters )
240236

241237
#ifdef __cplusplus
242238
}

0 commit comments

Comments
 (0)