diff --git a/tests/drivers/mspi/api/src/main.c b/tests/drivers/mspi/api/src/main.c index d6b632f29c1..eb3494aa635 100644 --- a/tests/drivers/mspi/api/src/main.c +++ b/tests/drivers/mspi/api/src/main.c @@ -51,13 +51,17 @@ static struct mspi_dev_cfg device_cfg[] = { DT_FOREACH_CHILD_STATUS_OKAY_SEP(MSPI_BUS_NODE, MSPI_DEVICE_CONFIG_DT, (,)) }; +#if CONFIG_MSPI_XIP static struct mspi_xip_cfg xip_cfg[] = { DT_FOREACH_CHILD_STATUS_OKAY_SEP(MSPI_BUS_NODE, MSPI_XIP_CONFIG_DT, (,)) }; +#endif +#if CONFIG_MSPI_SCRAMBLE static struct mspi_scramble_cfg scramble_cfg[] = { DT_FOREACH_CHILD_STATUS_OKAY_SEP(MSPI_BUS_NODE, MSPI_SCRAMBLE_CONFIG_DT, (,)) }; +#endif ZTEST(mspi_api, test_mspi_api) { @@ -102,9 +106,11 @@ ZTEST(mspi_api, test_mspi_api) zassert_equal(ret, 0, "mspi_timing_config failed."); #endif +#if CONFIG_MSPI_ASYNC ret = mspi_register_callback(mspi_bus, &dev_id[dev_idx], MSPI_BUS_XFER_COMPLETE, NULL, NULL); zassert_equal(ret, 0, "mspi_register_callback failed."); +#endif ret = mspi_get_channel_status(mspi_bus, 0); zassert_equal(ret, 0, "mspi_get_channel_status failed.");