| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- /*
- * app_imu.h
- *
- * Created on: Nov 23, 2023
- * Author: juraj
- */
- #ifndef INC_APP_IMU_H_
- #define INC_APP_IMU_H_
- #include "app_bridge.h"
- #if MODULE == MODULE_IMU
- #include "icm_datatypes.h"
- #endif
- #ifdef __cplusplus
- extern "C"
- {
- #endif
- nBusAppInterface_t *getImuDriver();
- void mcu_spi_init(void *hw_interface, void *hw_config);
- void mcu_spi_reset();
- nBus_statusType_t mcu_spi_start();
- nBus_statusType_t mcu_spi_stop();
- nBus_sensorType_t mcu_spi_getType(uint8_t sensor_index);
- nBus_sensorCount_t mcu_spi_getSensorCount();
- uint8_t mcu_spi_getData(uint8_t sensor_index, uint8_t *data);
- nBus_statusType_t mcu_spi_setData(uint8_t *data, uint8_t count, uint8_t *response);
- int32_t mcu_spi_getParam(uint8_t sensor_index, nBus_param_t param);
- uint8_t mcu_spi_hasParam(uint8_t sensor_index, nBus_param_t param);
- nBus_statusType_t mcu_spi_setParam(uint8_t sensor_index, nBus_param_t param, int32_t value);
- void mcu_spi_readData(void);
- /**
- * Run calibration procedure.
- * @param subslaveIndex index of sublave (specific sensor) to run calibration procedure. Can be: 0 - all sensors, 1, 2 - sensor index
- * @param calibrationParamsNum number of input calibration values for sensors ===> REMOVED
- * @param calibrationParams array of calibration parameters ===> REMOVED
- * @note calibrationParams needs to be updated, because it is only uint8_t array for now
- * @return 1 - success, 0 - sensor not found (when subslaveIndex != 0)
- */
- nBus_statusType_t mcu_spi_calibrate(uint8_t subslaveIndex);
- //uint8_t mcu_spi_store(void);
- #ifdef __cplusplus
- }
- #endif
- #endif /* INC_APP_IMU_H_ */
|