mirror of
https://github.com/espressif/esp-idf.git
synced 2025-09-30 19:19:21 +00:00
test(sdio): dual board test sd host p4 + sdio slave c5
This commit is contained in:
@@ -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"
|
||||
)
|
||||
|
@@ -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
|
||||
|
@@ -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);
|
||||
|
Reference in New Issue
Block a user