12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- /* Includes ------------------------------------------------------------------*/
- #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_ILLEGAL_MODE = 2
- }lsm_fifo_mode_t;
- /* API ------------------------------------------------------------------*/
- 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_read_data_polling_mode(lsm_device_t dex_num);
- //void lsm6ds3tr_c_read_data_polling(lsm_device_t dex_num, int16_t *acc, int16_t *gry, int16_t *temp);
- //void lsm6ds3tr_c_low_power_acc_mode(lsm_device_t dex_num);
- //void lsm6ds3tr_c_low_power_acc(lsm_device_t dex_num, int16_t *acc);
- int16_t lsm6ds3tr_c_fifo_mode_read_group_num(lsm_device_t dex_num, lsm_fifo_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);
|