Merge branch 'bugfix/cpp_extern_v4.0' into 'release/v4.0'

Add extern C header guards to some files (backport v4.0)

See merge request espressif/esp-idf!8225
This commit is contained in:
Michael (XIAO Xufeng) 2020-04-07 15:39:48 +08:00
commit 2628f3ebbd
3 changed files with 23 additions and 0 deletions

View File

@ -18,6 +18,10 @@
#include "esp_err.h" #include "esp_err.h"
#include "esp_intr_alloc.h" #include "esp_intr_alloc.h"
#ifdef __cplusplus
extern "C" {
#endif
/** /**
* @brief Register a handler for specific RTC_CNTL interrupts * @brief Register a handler for specific RTC_CNTL interrupts
* *
@ -46,3 +50,7 @@ esp_err_t rtc_isr_register(intr_handler_t handler, void* handler_arg,
* handler_arg isn't registered * handler_arg isn't registered
*/ */
esp_err_t rtc_isr_deregister(intr_handler_t handler, void* handler_arg); esp_err_t rtc_isr_deregister(intr_handler_t handler, void* handler_arg);
#ifdef __cplusplus
}
#endif

View File

@ -15,6 +15,10 @@
#pragma once #pragma once
#include <stdint.h> #include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif
/** /**
* @file esp32/clk.h * @file esp32/clk.h
* *
@ -85,3 +89,7 @@ int esp_clk_xtal_freq(void);
* @return Value or RTC counter, expressed in microseconds * @return Value or RTC counter, expressed in microseconds
*/ */
uint64_t esp_clk_rtc_time(); uint64_t esp_clk_rtc_time();
#ifdef __cplusplus
}
#endif

View File

@ -17,6 +17,10 @@
#include "hal/spi_types.h" #include "hal/spi_types.h"
#include "esp_flash.h" #include "esp_flash.h"
#ifdef __cplusplus
extern "C" {
#endif
/// Configurations for the SPI Flash to init /// Configurations for the SPI Flash to init
typedef struct { typedef struct {
spi_host_device_t host_id; ///< Bus to use spi_host_device_t host_id; ///< Bus to use
@ -53,3 +57,6 @@ esp_err_t spi_bus_add_flash_device(esp_flash_t **out_chip, const esp_flash_spi_d
*/ */
esp_err_t spi_bus_remove_flash_device(esp_flash_t *chip); esp_err_t spi_bus_remove_flash_device(esp_flash_t *chip);
#ifdef __cplusplus
}
#endif