more esp32/esp32-s3 convergence

This commit is contained in:
philippe44
2023-05-17 23:55:28 +02:00
parent 9db17c8da8
commit 8ef3f8178b
15 changed files with 2323 additions and 19 deletions

View File

@@ -1,6 +1,11 @@
set(lib_dir ${build_dir}/esp-idf)
set(driver i2s.c i2s_hal.c spi_bus_lock.c)
if(IDF_TARGET STREQUAL esp32)
set(driver esp32/i2s.c esp32/i2s_hal.c esp32/spi_bus_lock.c)
else()
return()
endif()
string(REPLACE ".c" ".c.obj" driver_obj "${driver}")
idf_component_register( SRCS ${driver}
@@ -8,14 +13,14 @@ idf_component_register( SRCS ${driver}
INCLUDE_DIRS ${IDF_PATH}/components/driver
PRIV_INCLUDE_DIRS ${IDF_PATH}/components/driver/include/driver
)
# CMake is just a pile of crap
message("!! overriding ${driver} !!")
message("CAREFUL, LIBRARIES STRIPPING FROM DUPLICATED COMPONENTS DEPENDS ON THIS BEING REBUILD")
message(STATUS "!! overriding ${driver} !!")
message(STATUS "CAREFUL, LIBRARIES STRIPPING FROM DUPLICATED COMPONENTS DEPENDS ON THIS BEING REBUILD")
add_custom_command(
TARGET ${COMPONENT_LIB}
PRE_LINK
COMMAND xtensa-esp32-elf-ar -d ${lib_dir}/driver/libdriver.a ${driver_obj}
VERBATIM
)
)

View File

@@ -935,7 +935,7 @@ esp_err_t SPI_MASTER_ISR_ATTR spi_device_polling_start(spi_device_handle_t handl
ret = check_trans_valid(handle, trans_desc);
if (ret!=ESP_OK) return ret;
SPI_CHECK(!spi_bus_device_is_polling(handle), "Cannot send polling transaction while the previous polling transaction is not terminated.", ESP_ERR_INVALID_STATE );
ESP_LOGI("gragra", "LOCAL SPI_MASTER");
/* If device_acquiring_lock is set to handle, it means that the user has already
* acquired the bus thanks to the function `spi_device_acquire_bus()`.
* In that case, we don't need to take the lock again. */

File diff suppressed because it is too large Load Diff