Skip to content

Commit 669f957

Browse files
committed
move header includes before extern C
1 parent 083aff0 commit 669f957

File tree

6 files changed

+20
-21
lines changed

6 files changed

+20
-21
lines changed

src/Arduino_FreeRTOS.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,6 @@
4949
*/
5050
#include <stdint.h> /* READ COMMENT ABOVE. */
5151

52-
/* *INDENT-OFF* */
53-
#ifdef __cplusplus
54-
extern "C" {
55-
#endif
56-
/* *INDENT-ON* */
57-
5852
/* Acceptable values for configTICK_TYPE_WIDTH_IN_BITS. */
5953
#define TICK_TYPE_WIDTH_16_BITS 0
6054
#define TICK_TYPE_WIDTH_32_BITS 1
@@ -129,6 +123,12 @@
129123

130124
#endif /* if ( configUSE_PICOLIBC_TLS == 1 ) */
131125

126+
/* *INDENT-OFF* */
127+
#ifdef __cplusplus
128+
extern "C" {
129+
#endif
130+
/* *INDENT-ON* */
131+
132132
#ifndef configUSE_C_RUNTIME_TLS_SUPPORT
133133
#define configUSE_C_RUNTIME_TLS_SUPPORT 0
134134
#endif

src/FreeRTOSVariant.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,18 @@
2626
#ifndef freeRTOSVariant_h
2727
#define freeRTOSVariant_h
2828

29+
#include <avr/io.h>
30+
#include <avr/wdt.h>
31+
32+
#ifndef INC_TASK_H
33+
#include "Arduino_FreeRTOS.h"
34+
#include "task.h"
35+
#endif
36+
2937
#ifdef __cplusplus
3038
extern "C" {
3139
#endif
3240

33-
#include <avr/io.h>
34-
#include <avr/wdt.h>
35-
3641
// System Tick - Scheduler timer
3742
// Use the Watchdog timer, and choose the rate at which scheduler interrupts will occur.
3843

@@ -64,11 +69,6 @@ extern "C" {
6469

6570
/*-----------------------------------------------------------*/
6671

67-
#ifndef INC_TASK_H
68-
#include "Arduino_FreeRTOS.h"
69-
#include "task.h"
70-
#endif
71-
7272
void initVariant(void);
7373

7474
void vApplicationIdleHook( void );

src/portable.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,14 +108,14 @@
108108
#define configSTACK_ALLOCATION_FROM_SEPARATE_HEAP 0
109109
#endif
110110

111+
#include "mpu_wrappers.h"
112+
111113
/* *INDENT-OFF* */
112114
#ifdef __cplusplus
113115
extern "C" {
114116
#endif
115117
/* *INDENT-ON* */
116118

117-
#include "mpu_wrappers.h"
118-
119119
/*
120120
* Setup the stack of a new task so it is ready to be placed under the
121121
* scheduler control. The registers have to be placed on the stack in

src/portmacro.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@
2929
#ifndef PORTMACRO_H
3030
#define PORTMACRO_H
3131

32+
#include <avr/wdt.h>
33+
3234
/* *INDENT-OFF* */
3335
#ifdef __cplusplus
3436
extern "C" {
@@ -45,8 +47,6 @@
4547
*-----------------------------------------------------------
4648
*/
4749

48-
#include <avr/wdt.h>
49-
5050
/* Type definitions. */
5151

5252
#define portPOINTER_SIZE_TYPE uint16_t

src/queue.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,14 @@
3434
#error "include Arduino_FreeRTOS.h" must appear in source files before "include queue.h"
3535
#endif
3636

37+
#include "task.h"
38+
3739
/* *INDENT-OFF* */
3840
#ifdef __cplusplus
3941
extern "C" {
4042
#endif
4143
/* *INDENT-ON* */
4244

43-
#include "task.h"
44-
4545
/**
4646
* Type by which queues are referenced. For example, a call to xQueueCreate()
4747
* returns an QueueHandle_t variable that can then be used as a parameter to

src/timers.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636

3737
#include "task.h"
3838

39-
4039
/* *INDENT-OFF* */
4140
#ifdef __cplusplus
4241
extern "C" {

0 commit comments

Comments
 (0)