diff --git a/components/driver/include/driver/mcpwm.h b/components/driver/include/driver/mcpwm.h index e3ffeede9..7f5b71fea 100644 --- a/components/driver/include/driver/mcpwm.h +++ b/components/driver/include/driver/mcpwm.h @@ -15,19 +15,19 @@ #ifndef _DRIVER_MCPWM_H_ #define _DRIVER_MCPWM_H_ +#include "soc/soc_caps.h" +#ifndef SOC_MCPWM_SUPPORTED +#error MCPWM is not supported in this chip target +#endif + #include "esp_err.h" #include "soc/soc.h" #include "driver/gpio.h" #include "driver/periph_ctrl.h" #include "esp_intr_alloc.h" -#include "soc/soc_caps.h" #include "hal/mcpwm_types.h" #include "soc/mcpwm_caps.h" -#ifndef SOC_MCPWM_SUPPORTED -#error MCPWM is not supported in this chip target -#endif - #ifdef __cplusplus extern "C" { #endif diff --git a/components/driver/include/driver/sdmmc_host.h b/components/driver/include/driver/sdmmc_host.h index 1cae99e2d..e1d0766a4 100644 --- a/components/driver/include/driver/sdmmc_host.h +++ b/components/driver/include/driver/sdmmc_host.h @@ -14,18 +14,17 @@ #pragma once +#include "soc/soc_caps.h" +#ifndef SOC_SDMMC_HOST_SUPPORTED +#error SDMMC host is not supported in this chip target +#endif + #include #include #include "esp_err.h" #include "sdmmc_types.h" #include "driver/gpio.h" -#include "soc/soc_caps.h" - -#ifndef SOC_SDMMC_HOST_SUPPORTED -#error SDMMC host is not supported in this chip target -#endif - #ifdef __cplusplus extern "C" { #endif diff --git a/components/soc/esp32/include/soc/soc_caps.h b/components/soc/esp32/include/soc/soc_caps.h index 224c2657d..6bfd62180 100644 --- a/components/soc/esp32/include/soc/soc_caps.h +++ b/components/soc/esp32/include/soc/soc_caps.h @@ -3,6 +3,9 @@ // seperate these information into periph_caps.h for each peripheral and // include them here. +#pragma once + #define SOC_MCPWM_SUPPORTED 1 #define SOC_SDMMC_HOST_SUPPORTED 1 -#define SOC_BT_SUPPORTED 1 \ No newline at end of file +#define SOC_BT_SUPPORTED 1 +#define SOC_SDIO_SLAVE_SUPPORTED 1 \ No newline at end of file diff --git a/components/soc/esp32s2beta/include/soc/soc_caps.h b/components/soc/esp32s2beta/include/soc/soc_caps.h index fc6db8178..85a465e89 100644 --- a/components/soc/esp32s2beta/include/soc/soc_caps.h +++ b/components/soc/esp32s2beta/include/soc/soc_caps.h @@ -2,3 +2,5 @@ // During the refactoring and multichip support development process, we // seperate these information into periph_caps.h for each peripheral and // include them here. + +#pragma once