diff --git a/components/soc/esp32/include/soc/apb_ctrl_struct.h b/components/soc/esp32/include/soc/apb_ctrl_struct.h index d25967838..0d8e49a42 100644 --- a/components/soc/esp32/include/soc/apb_ctrl_struct.h +++ b/components/soc/esp32/include/soc/apb_ctrl_struct.h @@ -13,6 +13,11 @@ // 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_ */ diff --git a/components/soc/esp32/include/soc/gpio_sd_struct.h b/components/soc/esp32/include/soc/gpio_sd_struct.h index 94ddd5ba8..e5001c23f 100644 --- a/components/soc/esp32/include/soc/gpio_sd_struct.h +++ b/components/soc/esp32/include/soc/gpio_sd_struct.h @@ -13,6 +13,11 @@ // 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_ */ diff --git a/components/soc/esp32/include/soc/gpio_struct.h b/components/soc/esp32/include/soc/gpio_struct.h index 7a90b71af..46ee88229 100644 --- a/components/soc/esp32/include/soc/gpio_struct.h +++ b/components/soc/esp32/include/soc/gpio_struct.h @@ -13,6 +13,11 @@ // 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_ */ diff --git a/components/soc/esp32/include/soc/i2c_struct.h b/components/soc/esp32/include/soc/i2c_struct.h index ea50d6bee..7e7818700 100644 --- a/components/soc/esp32/include/soc/i2c_struct.h +++ b/components/soc/esp32/include/soc/i2c_struct.h @@ -13,6 +13,11 @@ // 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_ */ diff --git a/components/soc/esp32/include/soc/i2s_struct.h b/components/soc/esp32/include/soc/i2s_struct.h index 6d9fcbabe..8ec3145cd 100644 --- a/components/soc/esp32/include/soc/i2s_struct.h +++ b/components/soc/esp32/include/soc/i2s_struct.h @@ -13,6 +13,11 @@ // 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_ */ diff --git a/components/soc/esp32/include/soc/ledc_struct.h b/components/soc/esp32/include/soc/ledc_struct.h index 0745a2ec2..dd3c364bd 100644 --- a/components/soc/esp32/include/soc/ledc_struct.h +++ b/components/soc/esp32/include/soc/ledc_struct.h @@ -13,6 +13,11 @@ // 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_ */ diff --git a/components/soc/esp32/include/soc/mcpwm_struct.h b/components/soc/esp32/include/soc/mcpwm_struct.h index 4d49e504d..f41d40c64 100644 --- a/components/soc/esp32/include/soc/mcpwm_struct.h +++ b/components/soc/esp32/include/soc/mcpwm_struct.h @@ -13,6 +13,11 @@ // 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__ */ diff --git a/components/soc/esp32/include/soc/pcnt_struct.h b/components/soc/esp32/include/soc/pcnt_struct.h index 506141ba1..8cfd4ca36 100644 --- a/components/soc/esp32/include/soc/pcnt_struct.h +++ b/components/soc/esp32/include/soc/pcnt_struct.h @@ -13,6 +13,11 @@ // 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_ */ diff --git a/components/soc/esp32/include/soc/rmt_struct.h b/components/soc/esp32/include/soc/rmt_struct.h index 335cb8194..68e244ad4 100644 --- a/components/soc/esp32/include/soc/rmt_struct.h +++ b/components/soc/esp32/include/soc/rmt_struct.h @@ -13,6 +13,11 @@ // 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_ */ diff --git a/components/soc/esp32/include/soc/rtc_cntl_struct.h b/components/soc/esp32/include/soc/rtc_cntl_struct.h index c2a7f63c4..e20372260 100644 --- a/components/soc/esp32/include/soc/rtc_cntl_struct.h +++ b/components/soc/esp32/include/soc/rtc_cntl_struct.h @@ -13,6 +13,11 @@ // 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_ */ diff --git a/components/soc/esp32/include/soc/rtc_io_struct.h b/components/soc/esp32/include/soc/rtc_io_struct.h index f9964e376..f20ad4c2c 100644 --- a/components/soc/esp32/include/soc/rtc_io_struct.h +++ b/components/soc/esp32/include/soc/rtc_io_struct.h @@ -13,6 +13,11 @@ // 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_ */ diff --git a/components/soc/esp32/include/soc/sdmmc_struct.h b/components/soc/esp32/include/soc/sdmmc_struct.h index 20bb9d260..9f3625a3d 100644 --- a/components/soc/esp32/include/soc/sdmmc_struct.h +++ b/components/soc/esp32/include/soc/sdmmc_struct.h @@ -16,6 +16,10 @@ #include +#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_ diff --git a/components/soc/esp32/include/soc/sens_struct.h b/components/soc/esp32/include/soc/sens_struct.h index b0fce389d..825c85b17 100644 --- a/components/soc/esp32/include/soc/sens_struct.h +++ b/components/soc/esp32/include/soc/sens_struct.h @@ -13,6 +13,11 @@ // 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_ */ diff --git a/components/soc/esp32/include/soc/spi_struct.h b/components/soc/esp32/include/soc/spi_struct.h index 2d2081749..a52ddf410 100644 --- a/components/soc/esp32/include/soc/spi_struct.h +++ b/components/soc/esp32/include/soc/spi_struct.h @@ -13,6 +13,11 @@ // 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_ */ diff --git a/components/soc/esp32/include/soc/syscon_struct.h b/components/soc/esp32/include/soc/syscon_struct.h index 700aeecf4..60d8ed0ab 100644 --- a/components/soc/esp32/include/soc/syscon_struct.h +++ b/components/soc/esp32/include/soc/syscon_struct.h @@ -13,6 +13,11 @@ // 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_ */ diff --git a/components/soc/esp32/include/soc/timer_group_struct.h b/components/soc/esp32/include/soc/timer_group_struct.h index 696b439d6..da9acd0c7 100644 --- a/components/soc/esp32/include/soc/timer_group_struct.h +++ b/components/soc/esp32/include/soc/timer_group_struct.h @@ -13,6 +13,11 @@ // 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_ */ diff --git a/components/soc/esp32/include/soc/uart_struct.h b/components/soc/esp32/include/soc/uart_struct.h index 05b54867b..eb14620aa 100644 --- a/components/soc/esp32/include/soc/uart_struct.h +++ b/components/soc/esp32/include/soc/uart_struct.h @@ -13,6 +13,11 @@ // 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_ */ diff --git a/components/soc/esp32/include/soc/uhci_struct.h b/components/soc/esp32/include/soc/uhci_struct.h index 0c939796a..1c1ff0b88 100644 --- a/components/soc/esp32/include/soc/uhci_struct.h +++ b/components/soc/esp32/include/soc/uhci_struct.h @@ -13,6 +13,11 @@ // 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_ */