123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- #include "lsm6ds3tr-c_reg.h"
- #include "nrf_delay.h"
- #include "SEGGER_RTT.h"
- #include <string.h>
- #include <stdio.h>
- typedef enum{
- LSM_DEV_FRONT = 0,
- LSM_DEV_CENTER = 1
- }lsm_device_t;
- typedef enum{
- LSM_STATE_ACC_QMC_FIFO_MODE = 0,
- LSM_STATE_GRY_ACC_QMC_FIFO_MODE = 1,
- LSM_STATE_ACC_MODE = 2,
- LSM_STATE_ILLEGAL_MODE = 3
- }lsm_mode_t;
- int32_t lsm6ds3tr_c_switch_read_sensor_hub_cx(lsm_device_t dex_num, uint8_t device_addr, uint8_t reg, uint8_t* data,uint16_t len);
- int32_t lsm6ds3_c_switch_write_sensor_hub_cx(lsm_device_t dex_num, uint8_t device_addr, uint8_t reg, uint8_t* data);
- int lsm6ds3tr_c_init(lsm_device_t dex_num);
- void lsm6ds3tr_c_standby_power_acc_mode_config(lsm_device_t dex_num);
- void lsm6ds3tr_c_standby_power_acc_mode_start(lsm_device_t dex_num);
- void lsm6ds3tr_c_standby_power_acc_read(lsm_device_t dex_num, int16_t *acc);
- int16_t lsm6ds3tr_c_fifo_mode_read_group_num(lsm_device_t dex_num, lsm_mode_t fifo_mode);
- void lsm6ds3tr_c_acc_sensor_hub_qmc6310_fifo_with_timestamp_mode_config(lsm_device_t dex_num);
- void lsm6ds3tr_c_acc_sensor_hub_qmc6310_fifo_with_timestamp_mode_start(lsm_device_t dex_num);
- int lsm6ds3tr_c_acc_sensor_hub_qmc6310_fifo_with_timestamp_read(lsm_device_t dex_num, int16_t *acc, int16_t *mag, int32_t *timestamp, int16_t group_num);
- void lsm6ds3tr_c_gry_acc_sensor_hub_qmc6310_fifo_with_timestamp_mode_config(lsm_device_t dex_num);
- void lsm6ds3tr_c_gry_acc_sensor_hub_qmc6310_fifo_with_timestamp_mode_start(lsm_device_t dex_num);
- int lsm6ds3tr_c_gry_acc_sensor_hub_qmc6310_fifo_with_timestamp_read(lsm_device_t dex_num, int16_t *gry, int16_t *acc, int16_t *mag, int32_t *timestamp, int16_t group_num);
- void lsm6ds3tr_c_get_mode_stat(lsm_device_t dex_num, uint8_t *stat);
- void lsm6ds3tr_c_powerdown_mode(lsm_device_t dex_num);
- void lsm6ds3tr_c_suspend_mode(lsm_device_t dex_num);
|