mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-02 12:14:32 +02:00
fix(struct_h): add extern "C" protection to *_struct.h header files.
This commit is contained in:
@@ -13,6 +13,11 @@
|
|||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
#ifndef _SOC_APB_CTRL_STRUCT_H_
|
#ifndef _SOC_APB_CTRL_STRUCT_H_
|
||||||
#define _SOC_APB_CTRL_STRUCT_H_
|
#define _SOC_APB_CTRL_STRUCT_H_
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
union {
|
union {
|
||||||
struct {
|
struct {
|
||||||
@@ -117,4 +122,9 @@ typedef struct {
|
|||||||
volatile uint32_t date; /**/
|
volatile uint32_t date; /**/
|
||||||
} apb_ctrl_dev_t;
|
} apb_ctrl_dev_t;
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* _SOC_APB_CTRL_STRUCT_H_ */
|
#endif /* _SOC_APB_CTRL_STRUCT_H_ */
|
||||||
|
@@ -13,6 +13,11 @@
|
|||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
#ifndef _SOC_GPIO_SD_STRUCT_H_
|
#ifndef _SOC_GPIO_SD_STRUCT_H_
|
||||||
#define _SOC_GPIO_SD_STRUCT_H_
|
#define _SOC_GPIO_SD_STRUCT_H_
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef volatile struct {
|
typedef volatile struct {
|
||||||
union {
|
union {
|
||||||
struct {
|
struct {
|
||||||
@@ -45,4 +50,9 @@ typedef volatile struct {
|
|||||||
} version;
|
} version;
|
||||||
} gpio_sd_dev_t;
|
} gpio_sd_dev_t;
|
||||||
extern gpio_sd_dev_t SIGMADELTA;
|
extern gpio_sd_dev_t SIGMADELTA;
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* _SOC_GPIO_SD_STRUCT_H_ */
|
#endif /* _SOC_GPIO_SD_STRUCT_H_ */
|
||||||
|
@@ -13,6 +13,11 @@
|
|||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
#ifndef _SOC_GPIO_STRUCT_H_
|
#ifndef _SOC_GPIO_STRUCT_H_
|
||||||
#define _SOC_GPIO_STRUCT_H_
|
#define _SOC_GPIO_STRUCT_H_
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef volatile struct {
|
typedef volatile struct {
|
||||||
uint32_t bt_select; /*NA*/
|
uint32_t bt_select; /*NA*/
|
||||||
uint32_t out; /*GPIO0~31 output value*/
|
uint32_t out; /*GPIO0~31 output value*/
|
||||||
@@ -201,4 +206,9 @@ typedef volatile struct {
|
|||||||
} func_out_sel_cfg[40];
|
} func_out_sel_cfg[40];
|
||||||
} gpio_dev_t;
|
} gpio_dev_t;
|
||||||
extern gpio_dev_t GPIO;
|
extern gpio_dev_t GPIO;
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* _SOC_GPIO_STRUCT_H_ */
|
#endif /* _SOC_GPIO_STRUCT_H_ */
|
||||||
|
@@ -13,6 +13,11 @@
|
|||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
#ifndef _SOC_I2C_STRUCT_H_
|
#ifndef _SOC_I2C_STRUCT_H_
|
||||||
#define _SOC_I2C_STRUCT_H_
|
#define _SOC_I2C_STRUCT_H_
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef volatile struct {
|
typedef volatile struct {
|
||||||
union {
|
union {
|
||||||
struct {
|
struct {
|
||||||
@@ -286,4 +291,9 @@ typedef volatile struct {
|
|||||||
} i2c_dev_t;
|
} i2c_dev_t;
|
||||||
extern i2c_dev_t I2C0;
|
extern i2c_dev_t I2C0;
|
||||||
extern i2c_dev_t I2C1;
|
extern i2c_dev_t I2C1;
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* _SOC_I2C_STRUCT_H_ */
|
#endif /* _SOC_I2C_STRUCT_H_ */
|
||||||
|
@@ -13,6 +13,11 @@
|
|||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
#ifndef _SOC_I2S_STRUCT_H_
|
#ifndef _SOC_I2S_STRUCT_H_
|
||||||
#define _SOC_I2S_STRUCT_H_
|
#define _SOC_I2S_STRUCT_H_
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef volatile struct {
|
typedef volatile struct {
|
||||||
uint32_t reserved_0;
|
uint32_t reserved_0;
|
||||||
uint32_t reserved_4;
|
uint32_t reserved_4;
|
||||||
@@ -458,4 +463,8 @@ typedef volatile struct {
|
|||||||
extern i2s_dev_t I2S0;
|
extern i2s_dev_t I2S0;
|
||||||
extern i2s_dev_t I2S1;
|
extern i2s_dev_t I2S1;
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* _SOC_I2S_STRUCT_H_ */
|
#endif /* _SOC_I2S_STRUCT_H_ */
|
||||||
|
@@ -13,6 +13,11 @@
|
|||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
#ifndef _SOC_LEDC_STRUCT_H_
|
#ifndef _SOC_LEDC_STRUCT_H_
|
||||||
#define _SOC_LEDC_STRUCT_H_
|
#define _SOC_LEDC_STRUCT_H_
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef volatile struct {
|
typedef volatile struct {
|
||||||
struct {
|
struct {
|
||||||
struct {
|
struct {
|
||||||
@@ -243,4 +248,9 @@ typedef volatile struct {
|
|||||||
uint32_t date; /*This register represents the version .*/
|
uint32_t date; /*This register represents the version .*/
|
||||||
} ledc_dev_t;
|
} ledc_dev_t;
|
||||||
extern ledc_dev_t LEDC;
|
extern ledc_dev_t LEDC;
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* _SOC_LEDC_STRUCT_H_ */
|
#endif /* _SOC_LEDC_STRUCT_H_ */
|
||||||
|
@@ -13,6 +13,11 @@
|
|||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
#ifndef _SOC_MCPWM_STRUCT_H__
|
#ifndef _SOC_MCPWM_STRUCT_H__
|
||||||
#define _SOC_MCPWM_STRUCT_H__
|
#define _SOC_MCPWM_STRUCT_H__
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef volatile struct {
|
typedef volatile struct {
|
||||||
union {
|
union {
|
||||||
struct {
|
struct {
|
||||||
@@ -449,4 +454,9 @@ typedef volatile struct {
|
|||||||
} mcpwm_dev_t;
|
} mcpwm_dev_t;
|
||||||
extern mcpwm_dev_t MCPWM0;
|
extern mcpwm_dev_t MCPWM0;
|
||||||
extern mcpwm_dev_t MCPWM1;
|
extern mcpwm_dev_t MCPWM1;
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* _SOC_MCPWM_STRUCT_H__ */
|
#endif /* _SOC_MCPWM_STRUCT_H__ */
|
||||||
|
@@ -13,6 +13,11 @@
|
|||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
#ifndef _SOC_PCNT_STRUCT_H_
|
#ifndef _SOC_PCNT_STRUCT_H_
|
||||||
#define _SOC_PCNT_STRUCT_H_
|
#define _SOC_PCNT_STRUCT_H_
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef volatile struct {
|
typedef volatile struct {
|
||||||
struct{
|
struct{
|
||||||
union {
|
union {
|
||||||
@@ -169,4 +174,9 @@ typedef volatile struct {
|
|||||||
uint32_t date; /**/
|
uint32_t date; /**/
|
||||||
} pcnt_dev_t;
|
} pcnt_dev_t;
|
||||||
extern pcnt_dev_t PCNT;
|
extern pcnt_dev_t PCNT;
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* _SOC_PCNT_STRUCT_H_ */
|
#endif /* _SOC_PCNT_STRUCT_H_ */
|
||||||
|
@@ -13,6 +13,11 @@
|
|||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
#ifndef _SOC_RMT_STRUCT_H_
|
#ifndef _SOC_RMT_STRUCT_H_
|
||||||
#define _SOC_RMT_STRUCT_H_
|
#define _SOC_RMT_STRUCT_H_
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef volatile struct {
|
typedef volatile struct {
|
||||||
uint32_t data_ch[8]; /*The R/W ram address for channel0-7 by apb fifo access.*/
|
uint32_t data_ch[8]; /*The R/W ram address for channel0-7 by apb fifo access.*/
|
||||||
struct{
|
struct{
|
||||||
@@ -259,4 +264,8 @@ typedef volatile struct {
|
|||||||
} rmt_mem_t;
|
} rmt_mem_t;
|
||||||
extern rmt_mem_t RMTMEM;
|
extern rmt_mem_t RMTMEM;
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* _SOC_RMT_STRUCT_H_ */
|
#endif /* _SOC_RMT_STRUCT_H_ */
|
||||||
|
@@ -13,6 +13,11 @@
|
|||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
#ifndef _SOC_RTC_CNTL_STRUCT_H_
|
#ifndef _SOC_RTC_CNTL_STRUCT_H_
|
||||||
#define _SOC_RTC_CNTL_STRUCT_H_
|
#define _SOC_RTC_CNTL_STRUCT_H_
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef volatile struct {
|
typedef volatile struct {
|
||||||
union {
|
union {
|
||||||
struct {
|
struct {
|
||||||
@@ -551,4 +556,9 @@ typedef volatile struct {
|
|||||||
} date;
|
} date;
|
||||||
} rtc_cntl_dev_t;
|
} rtc_cntl_dev_t;
|
||||||
extern rtc_cntl_dev_t RTCCNTL;
|
extern rtc_cntl_dev_t RTCCNTL;
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* _SOC_RTC_CNTL_STRUCT_H_ */
|
#endif /* _SOC_RTC_CNTL_STRUCT_H_ */
|
||||||
|
@@ -13,6 +13,11 @@
|
|||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
#ifndef _SOC_RTC_IO_STRUCT_H_
|
#ifndef _SOC_RTC_IO_STRUCT_H_
|
||||||
#define _SOC_RTC_IO_STRUCT_H_
|
#define _SOC_RTC_IO_STRUCT_H_
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef volatile struct {
|
typedef volatile struct {
|
||||||
union {
|
union {
|
||||||
struct {
|
struct {
|
||||||
@@ -278,4 +283,9 @@ typedef volatile struct {
|
|||||||
} date;
|
} date;
|
||||||
} rtc_io_dev_t;
|
} rtc_io_dev_t;
|
||||||
extern rtc_io_dev_t RTCIO;
|
extern rtc_io_dev_t RTCIO;
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* _SOC_RTC_IO_STRUCT_H_ */
|
#endif /* _SOC_RTC_IO_STRUCT_H_ */
|
||||||
|
@@ -16,6 +16,10 @@
|
|||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
uint32_t reserved1: 1;
|
uint32_t reserved1: 1;
|
||||||
uint32_t disable_int_on_completion: 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");
|
_Static_assert(sizeof(sdmmc_dev_t) == 0x804, "invalid size of sdmmc_dev_t structure");
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif //_SOC_SDMMC_STRUCT_H_
|
#endif //_SOC_SDMMC_STRUCT_H_
|
||||||
|
@@ -13,6 +13,11 @@
|
|||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
#ifndef _SOC_SENS_STRUCT_H_
|
#ifndef _SOC_SENS_STRUCT_H_
|
||||||
#define _SOC_SENS_STRUCT_H_
|
#define _SOC_SENS_STRUCT_H_
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef volatile struct {
|
typedef volatile struct {
|
||||||
union {
|
union {
|
||||||
struct {
|
struct {
|
||||||
@@ -313,4 +318,9 @@ typedef volatile struct {
|
|||||||
} sardate;
|
} sardate;
|
||||||
} sens_dev_t;
|
} sens_dev_t;
|
||||||
extern sens_dev_t SENS;
|
extern sens_dev_t SENS;
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* _SOC_SENS_STRUCT_H_ */
|
#endif /* _SOC_SENS_STRUCT_H_ */
|
||||||
|
@@ -13,6 +13,11 @@
|
|||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
#ifndef _SOC_SPI_STRUCT_H_
|
#ifndef _SOC_SPI_STRUCT_H_
|
||||||
#define _SOC_SPI_STRUCT_H_
|
#define _SOC_SPI_STRUCT_H_
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef volatile struct {
|
typedef volatile struct {
|
||||||
union {
|
union {
|
||||||
struct {
|
struct {
|
||||||
@@ -673,4 +678,9 @@ extern spi_dev_t SPI0; /* SPI0 IS FOR INTER
|
|||||||
extern spi_dev_t SPI1;
|
extern spi_dev_t SPI1;
|
||||||
extern spi_dev_t SPI2;
|
extern spi_dev_t SPI2;
|
||||||
extern spi_dev_t SPI3;
|
extern spi_dev_t SPI3;
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* _SOC_SPI_STRUCT_H_ */
|
#endif /* _SOC_SPI_STRUCT_H_ */
|
||||||
|
@@ -13,6 +13,11 @@
|
|||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
#ifndef _SOC_SYSCON_STRUCT_H_
|
#ifndef _SOC_SYSCON_STRUCT_H_
|
||||||
#define _SOC_SYSCON_STRUCT_H_
|
#define _SOC_SYSCON_STRUCT_H_
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
union {
|
union {
|
||||||
struct {
|
struct {
|
||||||
@@ -117,4 +122,8 @@ typedef struct {
|
|||||||
volatile uint32_t date; /**/
|
volatile uint32_t date; /**/
|
||||||
} syscon_dev_t;
|
} syscon_dev_t;
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* _SOC_SYSCON_STRUCT_H_ */
|
#endif /* _SOC_SYSCON_STRUCT_H_ */
|
||||||
|
@@ -13,6 +13,11 @@
|
|||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
#ifndef _SOC_TIMG_STRUCT_H_
|
#ifndef _SOC_TIMG_STRUCT_H_
|
||||||
#define _SOC_TIMG_STRUCT_H_
|
#define _SOC_TIMG_STRUCT_H_
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef volatile struct {
|
typedef volatile struct {
|
||||||
struct{
|
struct{
|
||||||
union {
|
union {
|
||||||
@@ -192,4 +197,9 @@ typedef volatile struct {
|
|||||||
} timg_dev_t;
|
} timg_dev_t;
|
||||||
extern timg_dev_t TIMERG0;
|
extern timg_dev_t TIMERG0;
|
||||||
extern timg_dev_t TIMERG1;
|
extern timg_dev_t TIMERG1;
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* _SOC_TIMG_STRUCT_H_ */
|
#endif /* _SOC_TIMG_STRUCT_H_ */
|
||||||
|
@@ -13,6 +13,11 @@
|
|||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
#ifndef _SOC_UART_STRUCT_H_
|
#ifndef _SOC_UART_STRUCT_H_
|
||||||
#define _SOC_UART_STRUCT_H_
|
#define _SOC_UART_STRUCT_H_
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef volatile struct {
|
typedef volatile struct {
|
||||||
union {
|
union {
|
||||||
struct {
|
struct {
|
||||||
@@ -362,4 +367,9 @@ typedef volatile struct {
|
|||||||
extern uart_dev_t UART0;
|
extern uart_dev_t UART0;
|
||||||
extern uart_dev_t UART1;
|
extern uart_dev_t UART1;
|
||||||
extern uart_dev_t UART2;
|
extern uart_dev_t UART2;
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* _SOC_UART_STRUCT_H_ */
|
#endif /* _SOC_UART_STRUCT_H_ */
|
||||||
|
@@ -13,6 +13,11 @@
|
|||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
#ifndef _SOC_UHCI_STRUCT_H_
|
#ifndef _SOC_UHCI_STRUCT_H_
|
||||||
#define _SOC_UHCI_STRUCT_H_
|
#define _SOC_UHCI_STRUCT_H_
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef volatile struct {
|
typedef volatile struct {
|
||||||
union {
|
union {
|
||||||
struct {
|
struct {
|
||||||
@@ -334,4 +339,9 @@ typedef volatile struct {
|
|||||||
} uhci_dev_t;
|
} uhci_dev_t;
|
||||||
extern uhci_dev_t UHCI0;
|
extern uhci_dev_t UHCI0;
|
||||||
extern uhci_dev_t UHCI1;
|
extern uhci_dev_t UHCI1;
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* _SOC_UHCI_STRUCT_H_ */
|
#endif /* _SOC_UHCI_STRUCT_H_ */
|
||||||
|
Reference in New Issue
Block a user