test(sdio): dual board test sd host p4 + sdio slave c5

This commit is contained in:
armando
2025-04-23 16:01:30 +08:00
parent 69164ed912
commit 6e2d52c802
13 changed files with 157 additions and 40 deletions

View File

@@ -1,16 +1,10 @@
set(srcs "essl.c")
if(CONFIG_SOC_GPSPI_SUPPORTED)
list(APPEND srcs "essl_spi.c")
endif()
if(CONFIG_SOC_SDIO_SLAVE_SUPPORTED)
list(APPEND srcs "essl_sdio.c" "essl_sdio_defs.c")
endif()
idf_component_register(
SRCS "${srcs}"
INCLUDE_DIRS "include"
PRIV_INCLUDE_DIRS "." "include/esp_serial_slave_link"
REQUIRES sdmmc driver
idf_component_register(SRCS "essl.c"
"essl_sdio.c"
"essl_spi.c"
"essl_sdio_defs.c"
INCLUDE_DIRS "include"
REQUIRES "sdmmc"
"driver"
PRIV_INCLUDE_DIRS "."
"include/esp_serial_slave_link"
)

View File

@@ -45,9 +45,10 @@ void test_prepare_buffer_pool(size_t pool_size, uint32_t flags);
*
* @param offset A random offset
* @param size Buffer size
* @param alignment Alignment
* @param[out] out_buffer Out buffer
*/
void test_get_buffer_from_pool(uint32_t offset, size_t size, void **out_buffer);
void test_get_buffer_from_pool(uint32_t offset, size_t size, size_t alignment, void **out_buffer);
/**
* Destroy the pool

View File

@@ -43,10 +43,10 @@ void test_prepare_buffer_pool(size_t pool_size, uint32_t flags)
test_fill_random_to_buffer(199, s_pool, pool_size);
}
void test_get_buffer_from_pool(uint32_t offset, size_t size, void **out_buffer)
void test_get_buffer_from_pool(uint32_t offset, size_t size, size_t alignment, void **out_buffer)
{
//to make sure the out_buffer is within the pool
offset = ((offset % (s_pool_size - size)) + 3) & ~3;
offset = ((offset % (s_pool_size - size)) + (alignment - 1)) & ~(alignment - 1);
// TEST_ASSERT(offset + size < (uint32_t)s_pool + s_pool_size)
*out_buffer = (void *)(s_pool + offset);