12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- /* Includes ------------------------------------------------------------------*/
- #include "lsm6ds3tr-c_reg.h"
- #include "bsp_spi.h"
- #include "nrf_delay.h"
- #include "SEGGER_RTT.h"
- #include <string.h>
- #include <stdio.h>
- /* Private type -------------------------------------------------------------*/
- typedef union{
- int16_t i16bit[3];
- uint8_t u8bit[6];
- } axis3bit16_t;
- typedef struct {
- uint8_t enable;
- lsm6ds3tr_c_odr_xl_t odr;
- uint16_t odr_hz_val;
- lsm6ds3tr_c_fs_xl_t fs;
- uint8_t decimation;
- uint8_t samples_num_in_pattern;
- } sensor_lsm6ds3_xl;
- typedef struct {
- uint8_t enable;
- lsm6ds3tr_c_odr_g_t odr;
- uint16_t odr_hz_val;
- lsm6ds3tr_c_fs_g_t fs;
- uint8_t decimation;
- uint8_t samples_num_in_pattern;
- } sensor_lsm6ds3_gy;
- /* API ------------------------------------------------------------------*/
- void lsm6ds3tr_c_init(void);
- void lsm6ds3tr_c_fifo_mode(void);
- void lsm6ds3tr_c_fifo_read(axis3bit16_t **acc, uint16_t *acc_num, axis3bit16_t **gry, uint16_t *gry_num);
- void lsm6ds3tr_c_low_power_acc_mode(void);
- void lsm6ds3tr_c_low_power_acc(int16_t *acc);
- void lsm6ds3tr_c_read_data_polling_mode(void);
- void lsm6ds3tr_c_read_data_polling(int16_t *acc, int16_t *gry, int16_t *temp);
- void lsm6ds3tr_c_get_accel_power_mode_stat(uint8_t *stat);
|