diff --git a/src/Arduino_FreeRTOS.h b/src/Arduino_FreeRTOS.h index 1134120..e27b598 100644 --- a/src/Arduino_FreeRTOS.h +++ b/src/Arduino_FreeRTOS.h @@ -49,12 +49,6 @@ */ #include /* READ COMMENT ABOVE. */ -/* *INDENT-OFF* */ -#ifdef __cplusplus - extern "C" { -#endif -/* *INDENT-ON* */ - /* Acceptable values for configTICK_TYPE_WIDTH_IN_BITS. */ #define TICK_TYPE_WIDTH_16_BITS 0 #define TICK_TYPE_WIDTH_32_BITS 1 @@ -129,6 +123,12 @@ #endif /* if ( configUSE_PICOLIBC_TLS == 1 ) */ +/* *INDENT-OFF* */ +#ifdef __cplusplus + extern "C" { +#endif +/* *INDENT-ON* */ + #ifndef configUSE_C_RUNTIME_TLS_SUPPORT #define configUSE_C_RUNTIME_TLS_SUPPORT 0 #endif diff --git a/src/FreeRTOSVariant.h b/src/FreeRTOSVariant.h index 136128f..aa4ab31 100644 --- a/src/FreeRTOSVariant.h +++ b/src/FreeRTOSVariant.h @@ -26,13 +26,18 @@ #ifndef freeRTOSVariant_h #define freeRTOSVariant_h +#include +#include + +#ifndef INC_TASK_H +#include "Arduino_FreeRTOS.h" +#include "task.h" +#endif + #ifdef __cplusplus extern "C" { #endif -#include -#include - // System Tick - Scheduler timer // Use the Watchdog timer, and choose the rate at which scheduler interrupts will occur. @@ -64,11 +69,6 @@ extern "C" { /*-----------------------------------------------------------*/ -#ifndef INC_TASK_H -#include "Arduino_FreeRTOS.h" -#include "task.h" -#endif - void initVariant(void); void vApplicationIdleHook( void ); diff --git a/src/portable.h b/src/portable.h index 2170b3b..bac1936 100644 --- a/src/portable.h +++ b/src/portable.h @@ -108,14 +108,14 @@ #define configSTACK_ALLOCATION_FROM_SEPARATE_HEAP 0 #endif +#include "mpu_wrappers.h" + /* *INDENT-OFF* */ #ifdef __cplusplus extern "C" { #endif /* *INDENT-ON* */ -#include "mpu_wrappers.h" - /* * Setup the stack of a new task so it is ready to be placed under the * scheduler control. The registers have to be placed on the stack in diff --git a/src/portmacro.h b/src/portmacro.h index 1505901..3af62b1 100644 --- a/src/portmacro.h +++ b/src/portmacro.h @@ -29,6 +29,8 @@ #ifndef PORTMACRO_H #define PORTMACRO_H +#include + /* *INDENT-OFF* */ #ifdef __cplusplus extern "C" { @@ -45,8 +47,6 @@ *----------------------------------------------------------- */ -#include - /* Type definitions. */ #define portPOINTER_SIZE_TYPE uint16_t diff --git a/src/queue.h b/src/queue.h index 20677b3..3734c03 100644 --- a/src/queue.h +++ b/src/queue.h @@ -34,14 +34,14 @@ #error "include Arduino_FreeRTOS.h" must appear in source files before "include queue.h" #endif +#include "task.h" + /* *INDENT-OFF* */ #ifdef __cplusplus extern "C" { #endif /* *INDENT-ON* */ -#include "task.h" - /** * Type by which queues are referenced. For example, a call to xQueueCreate() * returns an QueueHandle_t variable that can then be used as a parameter to diff --git a/src/timers.h b/src/timers.h index de615ac..42337f8 100644 --- a/src/timers.h +++ b/src/timers.h @@ -36,7 +36,6 @@ #include "task.h" - /* *INDENT-OFF* */ #ifdef __cplusplus extern "C" {