Skip to content

Commit

Permalink
board/esp32: fix compilation error due to C linkage
Browse files Browse the repository at this point in the history
Including `board_common.h` header has to be outside the `extern C` linkage block.
  • Loading branch information
gschorcht committed Feb 5, 2020
1 parent f760625 commit cfcea03
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 44 deletions.
16 changes: 8 additions & 8 deletions boards/esp32-mh-et-live-minikit/include/board.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,6 @@

#include <stdint.h>

#ifdef __cplusplus
extern "C" {
#endif

/**
* @name LED (on-board) configuration
*
Expand All @@ -48,16 +44,16 @@
#define LED_BLUE_PIN GPIO2
/** @} */

#ifdef __cplusplus
} /* end extern "C" */
#endif

/* include common board definitions as last step */
#include "board_common.h"

/* include definitions for optional hardware modules */
#include "board_modules.h"

#ifdef __cplusplus
extern "C" {
#endif

/**
* @brief Initialize the board specific hardware
*/
Expand All @@ -66,5 +62,9 @@ static inline void board_init(void) {
board_init_common();
}

#ifdef __cplusplus
} /* end extern "C" */
#endif

#endif /* BOARD_H */
/** @} */
8 changes: 4 additions & 4 deletions boards/esp32-olimex-evb/include/board.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,6 @@

#include <stdint.h>

#ifdef __cplusplus
extern "C" {
#endif

/**
* @name Button pin definitions
* @{
Expand Down Expand Up @@ -98,6 +94,10 @@ extern "C" {
/* include common board definitions as last step */
#include "board_common.h"

#ifdef __cplusplus
extern "C" {
#endif

/**
* @brief Initialize the board specific hardware
*/
Expand Down
16 changes: 8 additions & 8 deletions boards/esp32-ttgo-t-beam/include/board.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,6 @@

#include <stdint.h>

#ifdef __cplusplus
extern "C" {
#endif

/**
* @name Button pin definitions
* @{
Expand All @@ -58,10 +54,6 @@
#endif
/** @} */

#ifdef __cplusplus
} /* end extern "C" */
#endif

/**
* @name SX127X
*
Expand All @@ -79,10 +71,18 @@
/* include common board definitions as last step */
#include "board_common.h"

#ifdef __cplusplus
extern "C" {
#endif

/**
* @brief Initialize the board specific hardware
*/
void board_init(void);

#ifdef __cplusplus
} /* end extern "C" */
#endif

#endif /* BOARD_H */
/** @} */
16 changes: 8 additions & 8 deletions boards/esp32-wemos-lolin-d32-pro/include/board.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,6 @@

#include <stdint.h>

#ifdef __cplusplus
extern "C" {
#endif

/**
* @name LED (on-board) configuration
* @{
Expand All @@ -73,13 +69,13 @@
#endif
/** @} */

#ifdef __cplusplus
} /* end extern "C" */
#endif

/* include common board definitions as last step */
#include "board_common.h"

#ifdef __cplusplus
extern "C" {
#endif

/**
* @brief Initialize the board specific hardware
*/
Expand All @@ -88,5 +84,9 @@ static inline void board_init(void) {
board_init_common();
}

#ifdef __cplusplus
} /* end extern "C" */
#endif

#endif /* BOARD_H */
/** @} */
16 changes: 8 additions & 8 deletions boards/esp32-wroom-32/include/board.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,6 @@

#include <stdint.h>

#ifdef __cplusplus
extern "C" {
#endif

#ifdef __cplusplus
} /* end extern "C" */
#endif

/**
* @name Button pin definitions
* @{
Expand All @@ -64,6 +56,10 @@
/* include common board definitions as last step */
#include "board_common.h"

#ifdef __cplusplus
extern "C" {
#endif

/**
* @brief Initialize the board specific hardware
*/
Expand All @@ -72,5 +68,9 @@ static inline void board_init(void) {
board_init_common();
}

#ifdef __cplusplus
} /* end extern "C" */
#endif

#endif /* BOARD_H */
/** @} */
16 changes: 8 additions & 8 deletions boards/esp32-wrover-kit/include/board.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,6 @@

#include <stdint.h>

#ifdef __cplusplus
extern "C" {
#endif

/**
* @name LED (on-board) configuration
* @{
Expand Down Expand Up @@ -101,13 +97,13 @@
#endif
/** @} */

#ifdef __cplusplus
} /* end extern "C" */
#endif

/* include common board definitions as last step */
#include "board_common.h"

#ifdef __cplusplus
extern "C" {
#endif

/**
* @brief Initialize the board specific hardware
*/
Expand All @@ -116,5 +112,9 @@ static inline void board_init(void) {
board_init_common();
}

#ifdef __cplusplus
} /* end extern "C" */
#endif

#endif /* BOARD_H */
/** @} */

0 comments on commit cfcea03

Please sign in to comment.