]> granicus.if.org Git - esp-idf/commitdiff
fix(struct_h): add extern "C" protection to *_struct.h header files.
authormichael <xiaoxufeng@espressif.com>
Mon, 28 Aug 2017 10:10:46 +0000 (18:10 +0800)
committermichael <xiaoxufeng@espressif.com>
Mon, 28 Aug 2017 10:10:46 +0000 (18:10 +0800)
18 files changed:
components/soc/esp32/include/soc/apb_ctrl_struct.h
components/soc/esp32/include/soc/gpio_sd_struct.h
components/soc/esp32/include/soc/gpio_struct.h
components/soc/esp32/include/soc/i2c_struct.h
components/soc/esp32/include/soc/i2s_struct.h
components/soc/esp32/include/soc/ledc_struct.h
components/soc/esp32/include/soc/mcpwm_struct.h
components/soc/esp32/include/soc/pcnt_struct.h
components/soc/esp32/include/soc/rmt_struct.h
components/soc/esp32/include/soc/rtc_cntl_struct.h
components/soc/esp32/include/soc/rtc_io_struct.h
components/soc/esp32/include/soc/sdmmc_struct.h
components/soc/esp32/include/soc/sens_struct.h
components/soc/esp32/include/soc/spi_struct.h
components/soc/esp32/include/soc/syscon_struct.h
components/soc/esp32/include/soc/timer_group_struct.h
components/soc/esp32/include/soc/uart_struct.h
components/soc/esp32/include/soc/uhci_struct.h

index d25967838acf7592d3442367af00bf2acb2f9ea8..0d8e49a42ededda7578de9fea27bf204aaf70921 100644 (file)
 // limitations under the License.
 #ifndef _SOC_APB_CTRL_STRUCT_H_
 #define _SOC_APB_CTRL_STRUCT_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 typedef struct {
     union {
         struct {
@@ -117,4 +122,9 @@ typedef struct {
     volatile uint32_t date;                                      /**/
 } apb_ctrl_dev_t;
 
+
+#ifdef __cplusplus
+}
+#endif
+
 #endif  /* _SOC_APB_CTRL_STRUCT_H_ */
index 94ddd5ba882c1673736cab42dc02aea1c4bcde36..e5001c23f5f6003c375ad77fd898aea743640bf6 100644 (file)
 // limitations under the License.
 #ifndef _SOC_GPIO_SD_STRUCT_H_
 #define _SOC_GPIO_SD_STRUCT_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 typedef volatile struct {
     union {
         struct {
@@ -45,4 +50,9 @@ typedef volatile struct {
     } version;
 } gpio_sd_dev_t;
 extern gpio_sd_dev_t SIGMADELTA;
+
+#ifdef __cplusplus
+}
+#endif
+
 #endif  /* _SOC_GPIO_SD_STRUCT_H_ */
index 7a90b71af3cffecaa5ebf857683669cecc3ae5ae..46ee88229c2f3c24c93b4047a0ac5284e16ab936 100644 (file)
 // limitations under the License.
 #ifndef _SOC_GPIO_STRUCT_H_
 #define _SOC_GPIO_STRUCT_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 typedef volatile struct {
     uint32_t bt_select;                             /*NA*/
     uint32_t out;                                   /*GPIO0~31 output value*/
@@ -201,4 +206,9 @@ typedef volatile struct {
     } func_out_sel_cfg[40];
 } gpio_dev_t;
 extern gpio_dev_t GPIO;
+
+#ifdef __cplusplus
+}
+#endif
+
 #endif  /* _SOC_GPIO_STRUCT_H_ */
index ea50d6bee5d99a8722bf103f00aeaf07008895e9..7e7818700e3603ce1202e184ee3b5ad23e4a435d 100644 (file)
 // limitations under the License.
 #ifndef _SOC_I2C_STRUCT_H_
 #define _SOC_I2C_STRUCT_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 typedef volatile struct {
     union {
         struct {
@@ -286,4 +291,9 @@ typedef volatile struct {
 } i2c_dev_t;
 extern i2c_dev_t I2C0;
 extern i2c_dev_t I2C1;
+
+#ifdef __cplusplus
+}
+#endif
+
 #endif  /* _SOC_I2C_STRUCT_H_ */
index 6d9fcbabed11bc67148fc1d890085b2d26e74b71..8ec3145cdc8f8b27df1af747150f5c7591ec8523 100644 (file)
 // limitations under the License.
 #ifndef _SOC_I2S_STRUCT_H_
 #define _SOC_I2S_STRUCT_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 typedef volatile struct {
     uint32_t reserved_0;
     uint32_t reserved_4;
@@ -458,4 +463,8 @@ typedef volatile struct {
 extern i2s_dev_t I2S0;
 extern i2s_dev_t I2S1;
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif  /* _SOC_I2S_STRUCT_H_ */
index 0745a2ec259f30f200fa7d002c5496f3f718b3aa..dd3c364bd4a021c20fd3446caf1a7d39b1bf0eef 100644 (file)
 // limitations under the License.
 #ifndef _SOC_LEDC_STRUCT_H_
 #define _SOC_LEDC_STRUCT_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 typedef volatile struct {
     struct {
         struct {
@@ -243,4 +248,9 @@ typedef volatile struct {
     uint32_t date;                                     /*This register represents the version .*/
 } ledc_dev_t;
 extern ledc_dev_t LEDC;
+
+#ifdef __cplusplus
+}
+#endif
+
 #endif  /* _SOC_LEDC_STRUCT_H_ */
index 4d49e504d1f3b52434f95797012b65012bdb600b..f41d40c644867cb8a580f26a1310650a8bbac18e 100644 (file)
 // limitations under the License.
 #ifndef _SOC_MCPWM_STRUCT_H__
 #define _SOC_MCPWM_STRUCT_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 typedef volatile struct {
     union {
         struct {
@@ -449,4 +454,9 @@ typedef volatile struct {
 } mcpwm_dev_t;
 extern mcpwm_dev_t MCPWM0;
 extern mcpwm_dev_t MCPWM1;
+
+#ifdef __cplusplus
+}
+#endif
+
 #endif  /* _SOC_MCPWM_STRUCT_H__ */
index 506141ba1065ef2c9f85dea8358c3e9aa6b1422e..8cfd4ca36e26e217a94e7b10e6ef47386a2d46e3 100644 (file)
 // limitations under the License.
 #ifndef _SOC_PCNT_STRUCT_H_
 #define _SOC_PCNT_STRUCT_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 typedef volatile struct {
     struct{
         union {
@@ -169,4 +174,9 @@ typedef volatile struct {
     uint32_t date;                                  /**/
 } pcnt_dev_t;
 extern pcnt_dev_t PCNT;
+
+#ifdef __cplusplus
+}
+#endif
+
 #endif  /* _SOC_PCNT_STRUCT_H_ */
index 335cb81940b62d7cdfcda7e3d82b734cfa1f44b9..68e244ad425514841d34f607f3b545f168d108d8 100644 (file)
 // limitations under the License.
 #ifndef _SOC_RMT_STRUCT_H_
 #define _SOC_RMT_STRUCT_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 typedef volatile struct {
     uint32_t data_ch[8];                                /*The R/W ram address for channel0-7 by apb fifo access.*/
     struct{
@@ -259,4 +264,8 @@ typedef volatile struct {
 } rmt_mem_t;
 extern rmt_mem_t RMTMEM;
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif  /* _SOC_RMT_STRUCT_H_ */
index c2a7f63c43202006fcda941123598e2f26c16ffa..e203722608da6f16119619c9cbbd6573332333f8 100644 (file)
 // limitations under the License.
 #ifndef _SOC_RTC_CNTL_STRUCT_H_
 #define _SOC_RTC_CNTL_STRUCT_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 typedef volatile struct {
     union {
         struct {
@@ -551,4 +556,9 @@ typedef volatile struct {
     } date;
 } rtc_cntl_dev_t;
 extern rtc_cntl_dev_t RTCCNTL;
+
+#ifdef __cplusplus
+}
+#endif
+
 #endif  /* _SOC_RTC_CNTL_STRUCT_H_ */
index f9964e376ead90a71ce42f2fc2449d46551f3e62..f20ad4c2cf2aaf8710c4528ffd6a497e0aa630b5 100644 (file)
 // limitations under the License.
 #ifndef _SOC_RTC_IO_STRUCT_H_
 #define _SOC_RTC_IO_STRUCT_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 typedef volatile struct {
     union {
         struct {
@@ -278,4 +283,9 @@ typedef volatile struct {
     } date;
 } rtc_io_dev_t;
 extern rtc_io_dev_t RTCIO;
+
+#ifdef __cplusplus
+}
+#endif
+
 #endif  /* _SOC_RTC_IO_STRUCT_H_ */
index 20bb9d260d85fb6a650af781b1d9916bf6ecf5fa..9f3625a3d935090c87ef593a03f5e4cc388a6a2f 100644 (file)
 
 #include <stdint.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 typedef struct {
     uint32_t reserved1: 1;
     uint32_t disable_int_on_completion: 1;
@@ -366,6 +370,8 @@ extern sdmmc_dev_t SDMMC;
 
 _Static_assert(sizeof(sdmmc_dev_t) == 0x804, "invalid size of sdmmc_dev_t structure");
 
-
+#ifdef __cplusplus
+}
+#endif
 
 #endif //_SOC_SDMMC_STRUCT_H_
index b0fce389dfeaf2c6b1cf3e9c00ef07d09ce99762..825c85b17e79f6005308d78a7f45aaa54eebc135 100644 (file)
 // limitations under the License.
 #ifndef _SOC_SENS_STRUCT_H_
 #define _SOC_SENS_STRUCT_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 typedef volatile struct {
     union {
         struct {
@@ -313,4 +318,9 @@ typedef volatile struct {
     } sardate;
 } sens_dev_t;
 extern sens_dev_t SENS;
+
+#ifdef __cplusplus
+}
+#endif
+
 #endif  /* _SOC_SENS_STRUCT_H_ */
index 2d2081749046c11c606db1b8dae27b6052f3ef0e..a52ddf4105057bcebfccfb3b33914a5709b2fd75 100644 (file)
 // limitations under the License.
 #ifndef _SOC_SPI_STRUCT_H_
 #define _SOC_SPI_STRUCT_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 typedef volatile struct {
     union {
         struct {
@@ -673,4 +678,9 @@ extern spi_dev_t SPI0;                                      /* SPI0 IS FOR INTER
 extern spi_dev_t SPI1;
 extern spi_dev_t SPI2;
 extern spi_dev_t SPI3;
+
+#ifdef __cplusplus
+}
+#endif
+
 #endif  /* _SOC_SPI_STRUCT_H_ */
index 700aeecf4c43ca53bc4b7f3f10326a3ff581c973..60d8ed0ab5e8cfd2f14e0d55835cd7c82c24d39e 100644 (file)
 // limitations under the License.
 #ifndef _SOC_SYSCON_STRUCT_H_
 #define _SOC_SYSCON_STRUCT_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 typedef struct {
     union {
         struct {
@@ -117,4 +122,8 @@ typedef struct {
     volatile uint32_t date;                                      /**/
 } syscon_dev_t;
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif  /* _SOC_SYSCON_STRUCT_H_ */
index 696b439d6167b6894dfae17f7939340c0325152e..da9acd0c7a0fe1422bb522ce63a9315169125e06 100644 (file)
 // limitations under the License.
 #ifndef _SOC_TIMG_STRUCT_H_
 #define _SOC_TIMG_STRUCT_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 typedef volatile struct {
     struct{
         union {
@@ -192,4 +197,9 @@ typedef volatile struct {
 } timg_dev_t;
 extern timg_dev_t TIMERG0;
 extern timg_dev_t TIMERG1;
+
+#ifdef __cplusplus
+}
+#endif
+
 #endif  /* _SOC_TIMG_STRUCT_H_ */
index 05b54867be9657b926d72cbbe0b87c9a67807965..eb14620aa10fb3343965e818d3e1877006674d0f 100644 (file)
 // limitations under the License.
 #ifndef _SOC_UART_STRUCT_H_
 #define _SOC_UART_STRUCT_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 typedef volatile struct {
     union {
         struct {
@@ -362,4 +367,9 @@ typedef volatile struct {
 extern uart_dev_t UART0;
 extern uart_dev_t UART1;
 extern uart_dev_t UART2;
+
+#ifdef __cplusplus
+}
+#endif
+
 #endif  /* _SOC_UART_STRUCT_H_ */
index 0c939796af7bd51d2cffd83a8b0ac2bbdf8cfc04..1c1ff0b889163b71c2df4491ff2afe8b05f12c98 100644 (file)
 // limitations under the License.
 #ifndef _SOC_UHCI_STRUCT_H_
 #define _SOC_UHCI_STRUCT_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 typedef volatile struct {
     union {
         struct {
@@ -334,4 +339,9 @@ typedef volatile struct {
 } uhci_dev_t;
 extern uhci_dev_t UHCI0;
 extern uhci_dev_t UHCI1;
+
+#ifdef __cplusplus
+}
+#endif
+
 #endif  /* _SOC_UHCI_STRUCT_H_ */