add C++ include guards to header files which are missing them

Fixes https://github.com/espressif/esp-idf/issues/628
This commit is contained in:
Ivan Grokhotkov 2017-05-31 17:20:17 +08:00
parent d718cbd873
commit 06accaf851
5 changed files with 38 additions and 1 deletions

View file

@ -15,6 +15,10 @@
#ifndef _ESP_DPORT_ACCESS_H_ #ifndef _ESP_DPORT_ACCESS_H_
#define _ESP_DPORT_ACCESS_H_ #define _ESP_DPORT_ACCESS_H_
#ifdef __cplusplus
extern "C" {
#endif
void esp_dport_access_stall_other_cpu_start(void); void esp_dport_access_stall_other_cpu_start(void);
void esp_dport_access_stall_other_cpu_end(void); void esp_dport_access_stall_other_cpu_end(void);
void esp_dport_access_int_init(void); void esp_dport_access_int_init(void);
@ -27,4 +31,8 @@ void esp_dport_access_int_init(void);
#define DPORT_STALL_OTHER_CPU_END() esp_dport_access_stall_other_cpu_end() #define DPORT_STALL_OTHER_CPU_END() esp_dport_access_stall_other_cpu_end()
#endif #endif
#ifdef __cplusplus
}
#endif
#endif /* _ESP_DPORT_ACCESS_H_ */ #endif /* _ESP_DPORT_ACCESS_H_ */

View file

@ -14,6 +14,10 @@
#ifndef HEAP_ALLOC_CAPS_H #ifndef HEAP_ALLOC_CAPS_H
#define HEAP_ALLOC_CAPS_H #define HEAP_ALLOC_CAPS_H
#ifdef __cplusplus
extern "C" {
#endif
/** /**
* @brief Flags to indicate the capabilities of the various memory systems * @brief Flags to indicate the capabilities of the various memory systems
*/ */
@ -99,5 +103,8 @@ static inline bool esp_ptr_dma_capable( const void *ptr )
return ( (int)ptr >= 0x3FFAE000 && (int)ptr < 0x40000000 ); return ( (int)ptr >= 0x3FFAE000 && (int)ptr < 0x40000000 );
} }
#ifdef __cplusplus
}
#endif #endif
#endif //HEAP_ALLOC_CAPS_H

View file

@ -17,6 +17,10 @@
#include <esp_err.h> #include <esp_err.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef void (*esp_ipc_func_t)(void* arg); typedef void (*esp_ipc_func_t)(void* arg);
/** /**
@ -84,5 +88,8 @@ esp_err_t esp_ipc_call(uint32_t cpu_id, esp_ipc_func_t func, void* arg);
esp_err_t esp_ipc_call_blocking(uint32_t cpu_id, esp_ipc_func_t func, void* arg); esp_err_t esp_ipc_call_blocking(uint32_t cpu_id, esp_ipc_func_t func, void* arg);
#ifdef __cplusplus
}
#endif
#endif /* __ESP_IPC_H__ */ #endif /* __ESP_IPC_H__ */

View file

@ -21,6 +21,10 @@
#include "ff.h" #include "ff.h"
#include "wear_levelling.h" #include "wear_levelling.h"
#ifdef __cplusplus
extern "C" {
#endif
/** /**
* @brief Register FATFS with VFS component * @brief Register FATFS with VFS component
* *
@ -173,3 +177,7 @@ esp_err_t esp_vfs_fat_spiflash_mount(const char* base_path,
* - ESP_ERR_INVALID_STATE if esp_vfs_fat_spiflash_mount hasn't been called * - ESP_ERR_INVALID_STATE if esp_vfs_fat_spiflash_mount hasn't been called
*/ */
esp_err_t esp_vfs_fat_spiflash_unmount(const char* base_path, wl_handle_t wl_handle); esp_err_t esp_vfs_fat_spiflash_unmount(const char* base_path, wl_handle_t wl_handle);
#ifdef __cplusplus
}
#endif

View file

@ -19,6 +19,10 @@
#include "esp_attr.h" #include "esp_attr.h"
#include "esp_dport_access.h" #include "esp_dport_access.h"
#ifdef __cplusplus
extern "C" {
#endif
//Registers Operation {{ //Registers Operation {{
//Register read macros with an underscore prefix access DPORT memory directly. In IDF apps, use the non-underscore versions to be SMP-safe. //Register read macros with an underscore prefix access DPORT memory directly. In IDF apps, use the non-underscore versions to be SMP-safe.
@ -114,5 +118,8 @@ static inline uint32_t IRAM_ATTR DPORT_READ_PERI_REG(uint32_t addr)
#define DPORT_GET_PERI_REG_BITS2(reg, mask,shift) ((DPORT_READ_PERI_REG(reg)>>(shift))&(mask)) #define DPORT_GET_PERI_REG_BITS2(reg, mask,shift) ((DPORT_READ_PERI_REG(reg)>>(shift))&(mask))
//}} //}}
#ifdef __cplusplus
}
#endif
#endif /* _DPORT_ACCESS_H_ */ #endif /* _DPORT_ACCESS_H_ */