nrfConnectSDK V2.8
Toolchain
Board: nrf5340dk
Hi, while compiling ncs-spi-master-slave-example , I am getting below errors
In function 'spi_init':
C:/Users/hello/spi/src/main.c:34:8: error: macro "GPIO_DT_SPEC_GET_BY_IDX_OR" requires 4 arguments, but only 3 given
34 | struct gpio_dt_spec spim_cs_gpio = MY_SPI_MASTER_CS_DT_SPEC;
In file included from C:/Users/hello/spi/src/main.c:11:
C:/ncs/v2.8.0/zephyr/include/zephyr/drivers/spi.h:213:9: error: 'GPIO_DT_SPEC_GET_BY_IDX_OR' undeclared (first use in this function)
213 | GPIO_DT_SPEC_GET_BY_IDX_OR(DT_BUS(spi_dev), cs_gpios, \
C:/Users/hello/spi/src/main.c:44:8: error: macro "GPIO_DT_SPEC_GET_BY_IDX_OR" requires 4 arguments, but only 3 given
44 | .cs = {.gpio = MY_SPI_MASTER_CS_DT_SPEC, .delay = 0},
C:/ncs/v2.8.0/zephyr/include/zephyr/drivers/spi.h:213:9: error: 'GPIO_DT_SPEC_GET_BY_IDX_OR' undeclared here (not in a function)
213 | GPIO_DT_SPEC_GET_BY_IDX_OR(DT_BUS(spi_dev), cs_gpios, \
Is it related to sdk version? Can anyone help to resolve ?