| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- /*
- * app_imu_dmp.h
- *
- * Created on: Nov 23, 2023
- * Author: juraj
- */
- #ifndef INC_APP_IMU_DMP_H_
- #define INC_APP_IMU_DMP_H_
- #include "app_bridge.h"
- #ifdef __cplusplus
- extern "C"
- {
- #endif
- #define ACC_MULT_LOG -4
- #define GYR_MULT_LOG -2
- #define EUL_MULT_LOG -2
- #define ACC_MULT_NUM 10000
- #define GYR_MULT_NUM 100
- #define EUL_MULT_NUM 100
- #define ACC_BYTES 3
- #define GYR_BYTES 2
- #define EUL_BYTES 3
- enum imu_sensorID_t
- {
- ID_ALL = 0,
- ID_ACCELEROMETER = 1,
- ID_GYROSCOPE = 2,
- ID_EULER_ANGLES_GAUGE = 3
- };
- nBusAppInterface_t *getImuDriver();
- void imuDmp_init(void *hw_interface, void *hw_config);
- void imuDmp_reset();
- nBus_sensorType_t imuDmp_getType(uint8_t sensor_index);
- nBus_sensorCount_t imuDmp_getSensorCount();
- uint8_t imuDmp_getData(uint8_t sensor_index, uint8_t *data);
- nBus_statusType_t imuDmp_setData(uint8_t *data, uint8_t count, uint8_t *response);
- uint8_t imuDmp_hasParam(uint8_t sensor_index, nBus_param_t param_name);
- int32_t imuDmp_getParam(uint8_t sensor_index, nBus_param_t param_name);
- nBus_statusType_t imuDmp_setParam(uint8_t sensor_index, nBus_param_t param_name, int32_t param_value);
- nBus_statusType_t imuDmp_start(void);
- nBus_statusType_t imuDmp_stop(void);
- void imuDmp_readData(void);
- uint8_t imuDmp_store(void);
- nBus_statusType_t imuDmp_calibrate(uint8_t sensor_index);
- nBus_sensorFormat_t imuDmp_getSensorFormat(uint8_t sensor_index);
- nBus_statusType_t imuDmp_find(uint8_t enable);
- uint8_t imuDmp_device_ready();
- #ifdef __cplusplus
- }
- #endif
- #endif /* INC_APP_IMU_DMP_H_ */
|