tests: mspi: fix incorrect DT macro used in api test

DT macro should be used is DT_ENUM* for enum type bindings

Signed-off-by: Swift Tian <swift.tian@ambiq.com>
This commit is contained in:
Swift Tian 2024-10-19 13:29:47 +08:00 committed by Anas Nashif
commit c9a1db6e7e

View file

@ -31,8 +31,8 @@ static struct gpio_dt_spec ce_gpios[] = MSPI_CE_GPIOS_DT_SPEC_GET(MSPI_BUS_NODE)
#if TEST_MSPI_REINIT
struct mspi_cfg hardware_cfg = {
.channel_num = 0,
.op_mode = DT_PROP_OR(MSPI_BUS_NODE, op_mode, MSPI_OP_MODE_CONTROLLER),
.duplex = DT_PROP_OR(MSPI_BUS_NODE, duplex, MSPI_HALF_DUPLEX),
.op_mode = DT_ENUM_IDX_OR(MSPI_BUS_NODE, op_mode, MSPI_OP_MODE_CONTROLLER),
.duplex = DT_ENUM_IDX_OR(MSPI_BUS_NODE, duplex, MSPI_HALF_DUPLEX),
.dqs_support = DT_PROP_OR(MSPI_BUS_NODE, dqs_support, false),
.ce_group = ce_gpios,
.num_ce_gpios = ARRAY_SIZE(ce_gpios),