diff --git a/components/driver/i2s.c b/components/driver/i2s.c index 2592d273f..cf80ff80a 100644 --- a/components/driver/i2s.c +++ b/components/driver/i2s.c @@ -20,15 +20,18 @@ #include "freertos/FreeRTOS.h" #include "freertos/queue.h" #include "freertos/xtensa_api.h" +#include "freertos/semphr.h" #include "esp32/rom/lldesc.h" #include "driver/gpio.h" #include "driver/i2s.h" #include "driver/dac.h" +#include "hal/i2s_hal.h" #include "adc1_i2s_private.h" #include "esp_intr_alloc.h" #include "esp_err.h" +#include "esp_attr.h" #include "esp_log.h" #include "esp_pm.h" #include "esp_efuse.h" diff --git a/components/driver/include/driver/i2s.h b/components/driver/include/driver/i2s.h index 11ab03caa..84a261066 100644 --- a/components/driver/include/driver/i2s.h +++ b/components/driver/include/driver/i2s.h @@ -14,21 +14,14 @@ #pragma once +#include "esp_types.h" #include "esp_err.h" -#include -#include "soc/soc.h" -#include "soc/gpio_periph.h" +#include "freertos/FreeRTOS.h" #include "soc/i2s_periph.h" #include "soc/rtc_periph.h" #include "soc/i2s_caps.h" -#include "esp32/rom/gpio.h" -#include "esp_attr.h" -#include "esp_intr_alloc.h" #include "driver/periph_ctrl.h" -#include "driver/adc.h" -#include "freertos/FreeRTOS.h" -#include "freertos/semphr.h" -#include "hal/i2s_hal.h" +#include "driver/adc.h" // adc1_channel_t typedef #include "hal/i2s_types.h" #ifdef __cplusplus diff --git a/components/driver/include/driver/pcnt.h b/components/driver/include/driver/pcnt.h index a934f9871..00f3626a6 100644 --- a/components/driver/include/driver/pcnt.h +++ b/components/driver/include/driver/pcnt.h @@ -14,17 +14,13 @@ #pragma once -#include -#include "esp_intr_alloc.h" +#include "esp_types.h" #include "esp_err.h" +#include "esp_intr_alloc.h" #include "freertos/FreeRTOS.h" -#include "freertos/semphr.h" -#include "freertos/xtensa_api.h" -#include "soc/soc.h" -#include "soc/pcnt_caps.h" #include "driver/gpio.h" #include "hal/pcnt_types.h" -#include "hal/pcnt_hal.h" +#include "soc/pcnt_periph.h" #ifdef __cplusplus extern "C" { diff --git a/components/driver/pcnt.c b/components/driver/pcnt.c index a4a987434..b303372ed 100644 --- a/components/driver/pcnt.c +++ b/components/driver/pcnt.c @@ -12,9 +12,14 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include "freertos/FreeRTOS.h" +#include "freertos/semphr.h" +#include "freertos/xtensa_api.h" #include "esp_log.h" #include "driver/pcnt.h" #include "driver/periph_ctrl.h" +#include "hal/pcnt_hal.h" +#include "soc/pcnt_caps.h" #define PCNT_CHANNEL_ERR_STR "PCNT CHANNEL ERROR" #define PCNT_UNIT_ERR_STR "PCNT UNIT ERROR"