mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-02 11:10:54 +03:00
fix(driver_spi): fix some master test apps
This commit is contained in:
@@ -124,7 +124,7 @@ TEST_CASE("SPI Master clockdiv calculation routines", "[spi]")
|
|||||||
|
|
||||||
// Test All clock source
|
// Test All clock source
|
||||||
#define TEST_CLK_BYTE_LEN 10000
|
#define TEST_CLK_BYTE_LEN 10000
|
||||||
#define TEST_TRANS_TIME_BIAS_RATIO (float)5.0/100 // think 5% transfer time bias as acceptable
|
#define TEST_TRANS_TIME_BIAS_RATIO (float)8.0/100 // think 8% transfer time bias as acceptable
|
||||||
TEST_CASE("SPI Master clk_source and divider accuracy", "[spi]")
|
TEST_CASE("SPI Master clk_source and divider accuracy", "[spi]")
|
||||||
{
|
{
|
||||||
int64_t start = 0, end = 0;
|
int64_t start = 0, end = 0;
|
||||||
|
|||||||
@@ -140,7 +140,6 @@ TEST_CASE("SPI Single Board Test SIO", "[spi]")
|
|||||||
}
|
}
|
||||||
#endif //#if (TEST_SPI_PERIPH_NUM >= 2)
|
#endif //#if (TEST_SPI_PERIPH_NUM >= 2)
|
||||||
|
|
||||||
#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32P4) //IDF-7503 slave support
|
|
||||||
/********************************************************************************
|
/********************************************************************************
|
||||||
* Test SIO Master
|
* Test SIO Master
|
||||||
* SIO Slave is not supported, and one unit test is limited to one feature, so,,,
|
* SIO Slave is not supported, and one unit test is limited to one feature, so,,,
|
||||||
@@ -271,7 +270,7 @@ void test_sio_slave_emulate(bool sio_master_in)
|
|||||||
|
|
||||||
unity_wait_for_signal("Master ready");
|
unity_wait_for_signal("Master ready");
|
||||||
for (int i = 0; i < TEST_NUM; i++) {
|
for (int i = 0; i < TEST_NUM; i++) {
|
||||||
spi_slave_transaction_t trans = {};
|
spi_slave_transaction_t trans = { .flags = SPI_SLAVE_TRANS_DMA_BUFFER_ALIGN_AUTO, };
|
||||||
if (sio_master_in) {
|
if (sio_master_in) {
|
||||||
// slave output only section
|
// slave output only section
|
||||||
trans.length = (i + 1) * 8 * 8;
|
trans.length = (i + 1) * 8 * 8;
|
||||||
@@ -324,4 +323,3 @@ void test_slave_run(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
TEST_CASE_MULTIPLE_DEVICES("SPI_Master:Test_SIO_Mode_Multi_Board", "[spi_ms][test_env=generic_multi_device]", test_master_run, test_slave_run);
|
TEST_CASE_MULTIPLE_DEVICES("SPI_Master:Test_SIO_Mode_Multi_Board", "[spi_ms][test_env=generic_multi_device]", test_master_run, test_slave_run);
|
||||||
#endif //p4 slave support
|
|
||||||
|
|||||||
Reference in New Issue
Block a user