1 /* ST Microelectronics I3G4250D gyro driver 2 * 3 * Copyright (c) 2021 Jonathan Hahn 4 * 5 * SPDX-License-Identifier: Apache-2.0 6 * 7 * Datasheet: 8 * https://www.st.com/resource/en/datasheet/i3g4250d.pdf 9 */ 10 11 #ifndef ZEPHYR_DRIVERS_SENSOR_I3G4250D_I3G4250D_H_ 12 #define ZEPHYR_DRIVERS_SENSOR_I3G4250D_I3G4250D_H_ 13 14 #include <stdint.h> 15 #include <zephyr/drivers/spi.h> 16 #include <zephyr/drivers/gpio.h> 17 #include <zephyr/drivers/sensor.h> 18 #include <zephyr/sys/util.h> 19 #include <stmemsc.h> 20 #include "i3g4250d_reg.h" 21 22 struct i3g4250d_device_config { 23 struct spi_dt_spec spi; 24 }; 25 26 /* sensor data */ 27 struct i3g4250d_data { 28 int16_t angular_rate[3]; 29 stmdev_ctx_t *ctx; 30 }; 31 32 int i3g4250d_spi_init(const struct device *dev); 33 34 #endif /* __SENSOR_I3G4250D__ */ 35