Skip to content

Commit

Permalink
move header includes before extern C
Browse files Browse the repository at this point in the history
  • Loading branch information
feilipu committed Jul 7, 2024
1 parent 083aff0 commit 669f957
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 21 deletions.
12 changes: 6 additions & 6 deletions src/Arduino_FreeRTOS.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,6 @@
*/
#include <stdint.h> /* 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
Expand Down Expand Up @@ -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
Expand Down
16 changes: 8 additions & 8 deletions src/FreeRTOSVariant.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,18 @@
#ifndef freeRTOSVariant_h
#define freeRTOSVariant_h

#include <avr/io.h>
#include <avr/wdt.h>

#ifndef INC_TASK_H
#include "Arduino_FreeRTOS.h"
#include "task.h"
#endif

#ifdef __cplusplus
extern "C" {
#endif

#include <avr/io.h>
#include <avr/wdt.h>

// System Tick - Scheduler timer
// Use the Watchdog timer, and choose the rate at which scheduler interrupts will occur.

Expand Down Expand Up @@ -64,11 +69,6 @@ extern "C" {

/*-----------------------------------------------------------*/

#ifndef INC_TASK_H
#include "Arduino_FreeRTOS.h"
#include "task.h"
#endif

void initVariant(void);

void vApplicationIdleHook( void );
Expand Down
4 changes: 2 additions & 2 deletions src/portable.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/portmacro.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
#ifndef PORTMACRO_H
#define PORTMACRO_H

#include <avr/wdt.h>

/* *INDENT-OFF* */
#ifdef __cplusplus
extern "C" {
Expand All @@ -45,8 +47,6 @@
*-----------------------------------------------------------
*/

#include <avr/wdt.h>

/* Type definitions. */

#define portPOINTER_SIZE_TYPE uint16_t
Expand Down
4 changes: 2 additions & 2 deletions src/queue.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion src/timers.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@

#include "task.h"


/* *INDENT-OFF* */
#ifdef __cplusplus
extern "C" {
Expand Down

0 comments on commit 669f957

Please sign in to comment.