feat(driver_spi): split spi hal component

This commit is contained in:
wanckl
2025-12-16 20:38:09 +08:00
parent d20b89ece0
commit d12f941787
144 changed files with 307 additions and 445 deletions
+6 -4
View File
@@ -24,7 +24,9 @@ elseif(NOT BOOTLOADER_BUILD)
endif()
idf_component_register(SRCS ${srcs}
INCLUDE_DIRS ${includes}
REQUIRES soc hal
PRIV_REQUIRES esp_hal_gpio)
idf_component_register(
SRCS ${srcs}
INCLUDE_DIRS ${includes}
REQUIRES soc hal esp_hal_gpspi
PRIV_REQUIRES esp_hal_gpio
)
@@ -15,9 +15,8 @@
#pragma once
#include <stdlib.h>
#include "soc/spi_periph.h"
#include "soc/spi_reg.h"
#include "soc/spi_struct.h"
#include "hal/spi_types.h"
#include "hal/spi_flash_types.h"
#include <sys/param.h> // For MIN/MAX
#include <stdbool.h>
@@ -13,7 +13,8 @@
#pragma once
#include <stdlib.h>
#include "soc/spi_periph.h"
#include "soc/spi_reg.h"
#include "soc/spi_struct.h"
#include "hal/spi_types.h"
#include "hal/spi_flash_types.h"
#include <sys/param.h> // For MIN/MAX
@@ -19,7 +19,9 @@
#include <stdbool.h>
#include <string.h>
#include "hal/misc.h"
#include "soc/spi_periph.h"
#include "soc/spi_mem_struct.h"
#include "soc/spi_mem_reg.h"
#include "soc/interrupts.h"
#include "hal/spi_types.h"
#include "hal/spi_flash_types.h"
@@ -13,7 +13,7 @@
#pragma once
#include <stdlib.h>
#include "soc/spi_periph.h"
#include "soc/spi_reg.h"
#include "soc/spi_struct.h"
#include "hal/spi_types.h"
#include "hal/spi_flash_types.h"
@@ -18,9 +18,9 @@
#include <sys/param.h> // For MIN/MAX
#include <stdbool.h>
#include <string.h>
#include "soc/spi_periph.h"
#include "soc/spi_mem_reg.h"
#include "soc/spi_mem_struct.h"
#include "soc/interrupts.h"
#include "hal/assert.h"
#include "hal/spi_types.h"
#include "hal/spi_flash_types.h"
@@ -13,7 +13,7 @@
#pragma once
#include <stdlib.h>
#include "soc/spi_periph.h"
#include "soc/spi_reg.h"
#include "soc/spi_struct.h"
#include "soc/pcr_struct.h"
#include "hal/assert.h"
@@ -18,18 +18,17 @@
#include <sys/param.h> // For MIN/MAX
#include <stdbool.h>
#include <string.h>
#include "soc/spi_periph.h"
#include "soc/spi_mem_struct.h"
#include "soc/spi_mem_reg.h"
#include "soc/spi_mem_struct.h"
#include "soc/interrupts.h"
#include "soc/pcr_struct.h"
#include "soc/clk_tree_defs.h"
#include "hal/assert.h"
#include "hal/misc.h"
#include "hal/spi_types.h"
#include "hal/spi_flash_types.h"
#include "soc/pcr_struct.h"
#include "esp_rom_sys.h"
#include "hal/clk_tree_ll.h"
#include "soc/clk_tree_defs.h"
#include "esp_rom_sys.h"
#ifdef __cplusplus
extern "C" {
@@ -13,7 +13,7 @@
#pragma once
#include <stdlib.h>
#include "soc/spi_periph.h"
#include "soc/spi_reg.h"
#include "soc/spi_struct.h"
#include "soc/pcr_struct.h"
#include "hal/spi_types.h"
@@ -18,14 +18,14 @@
#include <sys/param.h> // For MIN/MAX
#include <stdbool.h>
#include <string.h>
#include "soc/spi_periph.h"
#include "soc/spi_mem_reg.h"
#include "soc/spi_mem_struct.h"
#include "soc/interrupts.h"
#include "soc/pcr_struct.h"
#include "hal/assert.h"
#include "hal/misc.h"
#include "hal/spi_types.h"
#include "hal/spi_flash_types.h"
#include "soc/pcr_struct.h"
#ifdef __cplusplus
extern "C" {
@@ -13,7 +13,7 @@
#pragma once
#include <stdlib.h>
#include "soc/spi_periph.h"
#include "soc/spi_reg.h"
#include "soc/spi_struct.h"
#include "soc/pcr_struct.h"
#include "hal/spi_types.h"
@@ -18,17 +18,17 @@
#include <sys/param.h> // For MIN/MAX
#include <stdbool.h>
#include <string.h>
#include "soc/spi_periph.h"
#include "soc/spi_mem_reg.h"
#include "soc/spi_mem_struct.h"
#include "soc/interrupts.h"
#include "soc/pcr_struct.h"
#include "soc/clk_tree_defs.h"
#include "hal/assert.h"
#include "hal/misc.h"
#include "hal/spi_types.h"
#include "hal/spi_flash_types.h"
#include "soc/pcr_struct.h"
#include "esp_rom_sys.h"
#include "hal/clk_tree_ll.h"
#include "soc/clk_tree_defs.h"
#include "esp_rom_sys.h"
#ifdef __cplusplus
extern "C" {
@@ -13,7 +13,7 @@
#pragma once
#include <stdlib.h>
#include "soc/spi_periph.h"
#include "soc/spi_reg.h"
#include "soc/spi_struct.h"
#include "soc/pcr_struct.h"
#include "hal/spi_types.h"
@@ -18,14 +18,14 @@
#include <sys/param.h> // For MIN/MAX
#include <stdbool.h>
#include <string.h>
#include "soc/spi_periph.h"
#include "soc/spi_mem_reg.h"
#include "soc/spi_mem_struct.h"
#include "soc/interrupts.h"
#include "soc/pcr_struct.h"
#include "soc/clk_tree_defs.h"
#include "hal/assert.h"
#include "hal/spi_types.h"
#include "hal/spi_flash_types.h"
#include "soc/pcr_struct.h"
#include "soc/clk_tree_defs.h"
#include "hal/misc.h"
#ifdef __cplusplus
@@ -13,7 +13,7 @@
#pragma once
#include <stdlib.h>
#include "soc/spi_periph.h"
#include "soc/spi_reg.h"
#include "soc/spi_struct.h"
#include "soc/pcr_struct.h"
#include "hal/spi_types.h"
@@ -18,18 +18,16 @@
#include <sys/param.h> // For MIN/MAX
#include <stdbool.h>
#include <string.h>
#include "soc/spi_periph.h"
#include "soc/spi_mem_reg.h"
#include "soc/spi_mem_struct.h"
#include "soc/interrupts.h"
#include "soc/pcr_struct.h"
#include "soc/clk_tree_defs.h"
#include "hal/assert.h"
#include "hal/spi_types.h"
#include "hal/spi_flash_types.h"
#include "soc/pcr_struct.h"
#include "soc/clk_tree_defs.h"
#include "hal/misc.h"
//TODO: [ESP32H21] IDF-11609, inherit from h2
#ifdef __cplusplus
extern "C" {
#endif
@@ -13,7 +13,7 @@
#pragma once
#include <stdlib.h>
#include "soc/spi_periph.h"
#include "soc/spi_reg.h"
#include "soc/spi_struct.h"
#include "soc/pcr_struct.h"
#include "hal/spi_types.h"
@@ -18,14 +18,14 @@
#include <sys/param.h> // For MIN/MAX
#include <stdbool.h>
#include <string.h>
#include "soc/spi_periph.h"
#include "soc/spi_mem_reg.h"
#include "soc/spi_mem_struct.h"
#include "soc/pcr_struct.h"
#include "soc/interrupts.h"
#include "hal/assert.h"
#include "hal/misc.h"
#include "hal/spi_types.h"
#include "hal/spi_flash_types.h"
#include "soc/pcr_struct.h"
#include "esp_rom_sys.h"
#ifdef __cplusplus
@@ -13,7 +13,7 @@
#pragma once
#include <stdlib.h>
#include "soc/spi_periph.h"
#include "soc/spi_reg.h"
#include "soc/spi_struct.h"
#include "soc/hp_sys_clkrst_struct.h"
#include "hal/assert.h"
@@ -18,17 +18,18 @@
#include <sys/param.h> // For MIN/MAX
#include <stdbool.h>
#include <string.h>
#include "soc/spi_periph.h"
#include "soc/spi_mem_reg.h"
#include "soc/spi_mem_struct.h"
#include "soc/spi1_mem_c_struct.h"
#include "soc/spi1_mem_c_reg.h"
#include "soc/hp_sys_clkrst_struct.h"
#include "soc/interrupts.h"
#include "soc/chip_revision.h"
#include "hal/assert.h"
#include "hal/spi_types.h"
#include "hal/spi_flash_types.h"
#include "hal/misc.h"
#include "hal/efuse_hal.h"
#include "soc/chip_revision.h"
#include "hal/clk_tree_ll.h"
#include "hal/config.h"
@@ -13,7 +13,7 @@
#pragma once
#include <stdlib.h>
#include "soc/spi_periph.h"
#include "soc/spi_reg.h"
#include "soc/spi_struct.h"
#include "hal/spi_types.h"
#include "hal/spi_flash_types.h"
@@ -18,8 +18,7 @@
#include <sys/param.h> // For MIN/MAX
#include <stdbool.h>
#include <string.h>
#include "soc/spi_periph.h"
#include "soc/spi_mem_reg.h"
#include "soc/spi_mem_struct.h"
#include "hal/assert.h"
#include "hal/spi_types.h"
@@ -13,8 +13,8 @@
#pragma once
#include <stdlib.h>
#include "soc/spi_periph.h"
#include "soc/spi_struct.h"
#include "soc/spi_reg.h"
#include "hal/spi_types.h"
#include "hal/spi_flash_types.h"
#include <sys/param.h> // For MIN/MAX
@@ -19,9 +19,10 @@
#include <stdbool.h>
#include <string.h>
#include "soc/spi_periph.h"
#include "hal/assert.h"
#include "soc/interrupts.h"
#include "soc/spi_mem_reg.h"
#include "soc/spi_mem_struct.h"
#include "hal/assert.h"
#include "hal/spi_types.h"
#include "hal/spi_flash_types.h"
#include "hal/misc.h"