From 58c3f6a421ae05f29206cd322a605da1c5196e04 Mon Sep 17 00:00:00 2001 From: Marius Vikhammer Date: Thu, 7 Jan 2021 10:13:17 +0800 Subject: [PATCH] hal: explicitly include soc_caps.h Many files in the HAL layer depended on SOC_ macros without explicitly including soc_caps.h --- components/hal/esp32c3/include/hal/i2c_ll.h | 1 + components/hal/esp32s2/include/hal/touch_sensor_ll.h | 1 + components/hal/esp32s3/include/hal/i2c_ll.h | 1 + components/hal/esp32s3/include/hal/touch_sensor_ll.h | 1 + components/hal/esp32s3/include/hal/twai_ll.h | 1 + components/hal/esp32s3/touch_sensor_hal.c | 1 + components/hal/i2s_hal.c | 1 + components/hal/include/hal/gpio_hal.h | 1 + components/hal/include/hal/mpu_types.h | 1 + components/hal/include/hal/pcnt_types.h | 2 ++ components/hal/include/hal/spi_hal.h | 1 + components/hal/interrupt_controller_hal.c | 1 + components/hal/ledc_hal.c | 1 + components/hal/mcpwm_hal.c | 1 + components/hal/rmt_hal.c | 1 + components/hal/rtc_io_hal.c | 1 + components/hal/touch_sensor_hal.c | 1 + components/hal/twai_hal.c | 1 + 18 files changed, 19 insertions(+) diff --git a/components/hal/esp32c3/include/hal/i2c_ll.h b/components/hal/esp32c3/include/hal/i2c_ll.h index 46523d0f03..bff06245f9 100644 --- a/components/hal/esp32c3/include/hal/i2c_ll.h +++ b/components/hal/esp32c3/include/hal/i2c_ll.h @@ -16,6 +16,7 @@ #pragma once #include "soc/i2c_periph.h" +#include "soc/soc_caps.h" #include "hal/i2c_types.h" #include "soc/rtc_cntl_reg.h" #include "esp_rom_sys.h" diff --git a/components/hal/esp32s2/include/hal/touch_sensor_ll.h b/components/hal/esp32s2/include/hal/touch_sensor_ll.h index f4c915b435..2fa8227153 100644 --- a/components/hal/esp32s2/include/hal/touch_sensor_ll.h +++ b/components/hal/esp32s2/include/hal/touch_sensor_ll.h @@ -25,6 +25,7 @@ #include #include #include "soc/touch_sensor_periph.h" +#include "soc/soc_caps.h" #include "hal/touch_sensor_types.h" #ifdef __cplusplus diff --git a/components/hal/esp32s3/include/hal/i2c_ll.h b/components/hal/esp32s3/include/hal/i2c_ll.h index 249840092e..c746ff5bb6 100644 --- a/components/hal/esp32s3/include/hal/i2c_ll.h +++ b/components/hal/esp32s3/include/hal/i2c_ll.h @@ -16,6 +16,7 @@ #pragma once #include "soc/i2c_periph.h" +#include "soc/soc_caps.h" #include "hal/i2c_types.h" #ifdef __cplusplus diff --git a/components/hal/esp32s3/include/hal/touch_sensor_ll.h b/components/hal/esp32s3/include/hal/touch_sensor_ll.h index 5bc5ebb56d..f60054e8ac 100644 --- a/components/hal/esp32s3/include/hal/touch_sensor_ll.h +++ b/components/hal/esp32s3/include/hal/touch_sensor_ll.h @@ -25,6 +25,7 @@ #include #include #include "soc/touch_sensor_periph.h" +#include "soc/soc_caps.h" #include "hal/touch_sensor_types.h" #ifdef __cplusplus diff --git a/components/hal/esp32s3/include/hal/twai_ll.h b/components/hal/esp32s3/include/hal/twai_ll.h index f34cd34f81..a124341526 100644 --- a/components/hal/esp32s3/include/hal/twai_ll.h +++ b/components/hal/esp32s3/include/hal/twai_ll.h @@ -30,6 +30,7 @@ extern "C" { #include #include "hal/twai_types.h" #include "soc/twai_periph.h" +#include "soc/soc_caps.h" /* ------------------------- Defines and Typedefs --------------------------- */ diff --git a/components/hal/esp32s3/touch_sensor_hal.c b/components/hal/esp32s3/touch_sensor_hal.c index 4f8f4d85dc..866a82f722 100644 --- a/components/hal/esp32s3/touch_sensor_hal.c +++ b/components/hal/esp32s3/touch_sensor_hal.c @@ -16,6 +16,7 @@ #include "hal/touch_sensor_hal.h" #include "hal/touch_sensor_types.h" +#include "soc/soc_caps.h" void touch_hal_init(void) { diff --git a/components/hal/i2s_hal.c b/components/hal/i2s_hal.c index 2f2b29dacd..f994add41b 100644 --- a/components/hal/i2s_hal.c +++ b/components/hal/i2s_hal.c @@ -15,6 +15,7 @@ // The HAL layer for I2S (common part) #include "soc/soc.h" +#include "soc/soc_caps.h" #include "hal/i2s_hal.h" #define I2S_TX_PDM_FP_DEF 960 // Set to the recommended value(960) in TRM diff --git a/components/hal/include/hal/gpio_hal.h b/components/hal/include/hal/gpio_hal.h index f951caf098..8b58b85f41 100644 --- a/components/hal/include/hal/gpio_hal.h +++ b/components/hal/include/hal/gpio_hal.h @@ -23,6 +23,7 @@ #pragma once #include "soc/gpio_periph.h" +#include "soc/soc_caps.h" #include "hal/gpio_ll.h" #include "hal/gpio_types.h" diff --git a/components/hal/include/hal/mpu_types.h b/components/hal/include/hal/mpu_types.h index b6445eed23..cc7da62a93 100644 --- a/components/hal/include/hal/mpu_types.h +++ b/components/hal/include/hal/mpu_types.h @@ -14,6 +14,7 @@ #pragma once #include +#include "soc/soc_caps.h" #if SOC_MPU_CONFIGURABLE_REGIONS_SUPPORTED typedef void** mpu_region_table_t; diff --git a/components/hal/include/hal/pcnt_types.h b/components/hal/include/hal/pcnt_types.h index e96406298c..6f09177b53 100644 --- a/components/hal/include/hal/pcnt_types.h +++ b/components/hal/include/hal/pcnt_types.h @@ -18,6 +18,8 @@ extern "C" { #endif +#include "soc/soc_caps.h" + #define PCNT_PIN_NOT_USED (-1) /*!< When selected for a pin, this pin will not be used */ /** diff --git a/components/hal/include/hal/spi_hal.h b/components/hal/include/hal/spi_hal.h index 35dbcfc7b5..bba02465ef 100644 --- a/components/hal/include/hal/spi_hal.h +++ b/components/hal/include/hal/spi_hal.h @@ -37,6 +37,7 @@ #include "hal/spi_ll.h" #include #include "soc/lldesc.h" +#include "soc/soc_caps.h" /** * Input parameters to the ``spi_hal_cal_clock_conf`` to calculate the timing configuration diff --git a/components/hal/interrupt_controller_hal.c b/components/hal/interrupt_controller_hal.c index 0c2d2dae97..e4558e362e 100644 --- a/components/hal/interrupt_controller_hal.c +++ b/components/hal/interrupt_controller_hal.c @@ -13,6 +13,7 @@ // limitations under the License. #include "hal/interrupt_controller_hal.h" +#include "soc/soc_caps.h" int_type_t interrupt_controller_hal_desc_type(int interrupt_number) { diff --git a/components/hal/ledc_hal.c b/components/hal/ledc_hal.c index bb87a09abb..6c00dabd39 100644 --- a/components/hal/ledc_hal.c +++ b/components/hal/ledc_hal.c @@ -16,6 +16,7 @@ #include "esp_attr.h" #include "hal/ledc_hal.h" +#include "soc/soc_caps.h" void ledc_hal_init(ledc_hal_context_t *hal, ledc_mode_t speed_mode) { diff --git a/components/hal/mcpwm_hal.c b/components/hal/mcpwm_hal.c index b3bb186e2c..a68d228554 100644 --- a/components/hal/mcpwm_hal.c +++ b/components/hal/mcpwm_hal.c @@ -15,6 +15,7 @@ // The HAL layer for MCPWM (common part) #include "hal/mcpwm_hal.h" +#include "soc/soc_caps.h" void mcpwm_hal_init(mcpwm_hal_context_t *hal, const mcpwm_hal_init_config_t *init_config) { diff --git a/components/hal/rmt_hal.c b/components/hal/rmt_hal.c index 14eb11bcca..fa29a04a96 100644 --- a/components/hal/rmt_hal.c +++ b/components/hal/rmt_hal.c @@ -13,6 +13,7 @@ // limitations under the License. #include "hal/rmt_hal.h" #include "hal/rmt_ll.h" +#include "soc/soc_caps.h" void rmt_hal_init(rmt_hal_context_t *hal) { diff --git a/components/hal/rtc_io_hal.c b/components/hal/rtc_io_hal.c index 406d806ebe..d38d3ec9e8 100644 --- a/components/hal/rtc_io_hal.c +++ b/components/hal/rtc_io_hal.c @@ -15,6 +15,7 @@ // The HAL layer for RTC IO (common part) #include "hal/rtc_io_hal.h" +#include "soc/soc_caps.h" #if SOC_RTCIO_INPUT_OUTPUT_SUPPORTED diff --git a/components/hal/touch_sensor_hal.c b/components/hal/touch_sensor_hal.c index 7b0e14f449..2fe670eaf5 100644 --- a/components/hal/touch_sensor_hal.c +++ b/components/hal/touch_sensor_hal.c @@ -16,6 +16,7 @@ #include "hal/touch_sensor_hal.h" #include "hal/touch_sensor_types.h" +#include "soc/soc_caps.h" void touch_hal_config(touch_pad_t touch_num) { diff --git a/components/hal/twai_hal.c b/components/hal/twai_hal.c index 4ade0e331e..6e722c6abf 100644 --- a/components/hal/twai_hal.c +++ b/components/hal/twai_hal.c @@ -14,6 +14,7 @@ #include #include "hal/twai_hal.h" +#include "soc/soc_caps.h" //Default values written to various registers on initialization #define TWAI_HAL_INIT_TEC 0