Add STEVAL-MKI217V1 SPI logger and replay

This commit is contained in:
2026-07-13 22:16:51 +03:00
parent f16ac8aa80
commit df563aa207
12 changed files with 629 additions and 13 deletions
@@ -0,0 +1,36 @@
#ifndef LSM6DSOX_H
#define LSM6DSOX_H
#include <stdint.h>
#define LSM6DSOX_WHO_AM_I_VALUE 0x6cu
typedef struct {
uint64_t timestamp_ticks;
int16_t accel[3];
int16_t gyro[3];
int16_t temperature;
} lsm6dsox_sample_t;
typedef struct {
uint32_t odr_hz;
uint32_t accel_ug_per_lsb;
uint32_t gyro_udps_per_lsb;
uint32_t temperature_lsb_per_c;
int32_t temperature_offset_millic;
} lsm6dsox_scale_t;
/* Initialize the PMOD SPI peripheral, identify and configure the IMU. */
int lsm6dsox_init(uint32_t odr_hz);
/* Read-only helpers used by the smoke-test diagnostics. */
uint8_t lsm6dsox_read_who_am_i(void);
uint8_t lsm6dsox_read_register(uint8_t reg);
/* Return 1 for a new coherent gyro+accelerometer sample, 0 if not ready. */
int lsm6dsox_poll_sample(lsm6dsox_sample_t *sample);
void lsm6dsox_power_down(void);
const lsm6dsox_scale_t *lsm6dsox_scale(void);
#endif