From 5e9783f4a6ffd96e016a6654a7bce2d12c5f6751 Mon Sep 17 00:00:00 2001 From: Marius Vikhammer Date: Thu, 7 Jan 2021 10:47:54 +0800 Subject: [PATCH] hal: include pcnt_caps.h Some HAL files depend on x_caps.h, but didnt explicitly include it Fixes issue where only 4 PCNT (out of 8) could be used on ESP32 Closes https://github.com/espressif/esp-idf/issues/6366 --- components/soc/include/hal/mpu_types.h | 1 + components/soc/include/hal/pcnt_types.h | 4 +++- components/soc/include/hal/spi_hal.h | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/components/soc/include/hal/mpu_types.h b/components/soc/include/hal/mpu_types.h index 14675a7268..e00005e7ae 100644 --- a/components/soc/include/hal/mpu_types.h +++ b/components/soc/include/hal/mpu_types.h @@ -14,6 +14,7 @@ #pragma once #include +#include "soc/mpu_caps.h" #if SOC_MPU_CONFIGURABLE_REGIONS_SUPPORTED typedef void** mpu_region_table_t; diff --git a/components/soc/include/hal/pcnt_types.h b/components/soc/include/hal/pcnt_types.h index 66a87a84dc..9aa7e98b31 100644 --- a/components/soc/include/hal/pcnt_types.h +++ b/components/soc/include/hal/pcnt_types.h @@ -18,6 +18,8 @@ extern "C" { #endif +#include "soc/pcnt_caps.h" + #define PCNT_PIN_NOT_USED (-1) /*!< When selected for a pin, this pin will not be used */ /** @@ -43,7 +45,7 @@ typedef enum { PCNT_UNIT_7 = 7, /*!< PCNT unit 7 */ #endif PCNT_UNIT_MAX, -} pcnt_unit_t; +} pcnt_unit_t; /** * @brief Selection of available modes that determine the counter's action depending on the state of the control signal's input GPIO diff --git a/components/soc/include/hal/spi_hal.h b/components/soc/include/hal/spi_hal.h index 2012433a26..0b79dddd16 100644 --- a/components/soc/include/hal/spi_hal.h +++ b/components/soc/include/hal/spi_hal.h @@ -37,6 +37,7 @@ #include "hal/spi_ll.h" #include #include "soc/lldesc.h" +#include "soc/spi_caps.h" /** * Timing configuration structure that should be calculated by