1 /*
2  * Copyright (c) 2023 Trackunit Corporation
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  */
6 
7 #ifndef ZEPHYR_DRIVERS_SENSOR_BMI323_BMI323_SPI_H_
8 #define ZEPHYR_DRIVERS_SENSOR_BMI323_BMI323_SPI_H_
9 
10 #include "bmi323.h"
11 #include <zephyr/devicetree.h>
12 #include <zephyr/drivers/spi.h>
13 
14 #define BMI323_DEVICE_SPI_BUS(inst)                                                                \
15 	extern const struct bosch_bmi323_bus_api bosch_bmi323_spi_bus_api;                         \
16                                                                                                    \
17 	static const struct spi_dt_spec spi_spec##inst =                                           \
18 		SPI_DT_SPEC_INST_GET(inst, SPI_WORD_SET(8), 0);                                    \
19                                                                                                    \
20 	static const struct bosch_bmi323_bus bosch_bmi323_bus_api##inst = {                        \
21 		.context = &spi_spec##inst, .api = &bosch_bmi323_spi_bus_api}
22 
23 #endif /* ZEPHYR_DRIVERS_SENSOR_BMI323_BMI323_SPI_H_ */
24