board/esp32: fix compilation error due to C linkage

Including `board_common.h` header has to be outside the `extern C` linkage block.
This commit is contained in:
Gunar Schorcht 2020-02-05 20:42:22 +01:00
parent f760625cd0
commit cfcea03a58
6 changed files with 44 additions and 44 deletions

View File

@ -33,10 +33,6 @@
#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif
/**
* @name LED (on-board) configuration
*
@ -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
*/
@ -66,5 +62,9 @@ static inline void board_init(void) {
board_init_common();
}
#ifdef __cplusplus
} /* end extern "C" */
#endif
#endif /* BOARD_H */
/** @} */

View File

@ -36,10 +36,6 @@
#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif
/**
* @name Button pin definitions
* @{
@ -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
*/

View File

@ -32,10 +32,6 @@
#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif
/**
* @name Button pin definitions
* @{
@ -58,10 +54,6 @@
#endif
/** @} */
#ifdef __cplusplus
} /* end extern "C" */
#endif
/**
* @name SX127X
*
@ -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 */
/** @} */

View File

@ -44,10 +44,6 @@
#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif
/**
* @name LED (on-board) configuration
* @{
@ -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
*/
@ -88,5 +84,9 @@ static inline void board_init(void) {
board_init_common();
}
#ifdef __cplusplus
} /* end extern "C" */
#endif
#endif /* BOARD_H */
/** @} */

View File

@ -33,14 +33,6 @@
#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif
#ifdef __cplusplus
} /* end extern "C" */
#endif
/**
* @name Button pin definitions
* @{
@ -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
*/
@ -72,5 +68,9 @@ static inline void board_init(void) {
board_init_common();
}
#ifdef __cplusplus
} /* end extern "C" */
#endif
#endif /* BOARD_H */
/** @} */

View File

@ -47,10 +47,6 @@
#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif
/**
* @name LED (on-board) configuration
* @{
@ -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
*/
@ -116,5 +112,9 @@ static inline void board_init(void) {
board_init_common();
}
#ifdef __cplusplus
} /* end extern "C" */
#endif
#endif /* BOARD_H */
/** @} */