23#ifndef LSM6DSO32_REGS_H
50#define AIR_DENSITY_KG_M3 1.293f
51#define SPECIFIC_GAS_CONSTANT 287.0f
78int32_t
imuP_write(
void *handle, uint8_t reg_addr,
const uint8_t *buf, uint16_t len);
91int32_t
imuP_read(
void *handle, uint8_t reg_addr, uint8_t *buf, uint16_t len);
103int8_t
bmp390_P_write(uint8_t reg_addr,
const uint8_t *buf, uint32_t len,
void *intf_ptr);
115int8_t
bmp390_P_read(uint8_t reg_addr, uint8_t *buf, uint32_t len,
void *intf_ptr);
128int32_t
imuB_write(
void *handle, uint8_t reg_addr,
const uint8_t *buf, uint16_t len);
141int32_t
imuB_read(
void *handle, uint8_t reg_addr, uint8_t *buf, uint16_t len);
153int8_t
bmp390_B_write(uint8_t reg_addr,
const uint8_t *buf, uint32_t len,
void *intf_ptr);
165int8_t
bmp390_B_read(uint8_t reg_addr, uint8_t *buf, uint32_t len,
void *intf_ptr);
247int32_t
imuP_read_2(
void *handle, uint8_t reg_addr, uint8_t *buf, uint16_t len);
268float_t
readAltitude(float_t seaLevelPa,float_t seaLevelT,float_t currentPa);
int8_t calibrateIMU(stmdev_ctx_t *imu, uint16_t iterationNum, OFFSET_TYPE type)
Calibrates the IMU by calculating sensor offsets.
int32_t imuP_read(void *handle, uint8_t reg_addr, uint8_t *buf, uint16_t len)
SPI read function for the primary IMU (LSM6DSO32).
OFFSET_TYPE
Specifies the type of offset compensation to be used.
int32_t imuP_read_2(void *handle, uint8_t reg_addr, uint8_t *buf, uint16_t len)
SPI read function for the primary IMU (LSM6DSO32).
int32_t imuB_read(void *handle, uint8_t reg_addr, uint8_t *buf, uint16_t len)
SPI read function for the backup IMU (LSM6DSO32).
int8_t init_imup(stmdev_ctx_t *imu, lsm6dso32_fs_xl_t acc_full_scale, lsm6dso32_fs_g_t gyro_full_scale, lsm6dso32_odr_xl_t acc_output_data_rate, lsm6dso32_odr_g_t gyro_output_data_rate)
Initializes the primary IMU (LSM6DSO32).
int32_t imuP_write(void *handle, uint8_t reg_addr, const uint8_t *buf, uint16_t len)
SPI write function for the primary IMU (LSM6DSO32).
int8_t init_imuB(stmdev_ctx_t *imu, lsm6dso32_fs_xl_t acc_full_scale, lsm6dso32_fs_g_t gyro_full_scale, lsm6dso32_odr_xl_t acc_output_data_rate, lsm6dso32_odr_g_t gyro_output_data_rate)
Initializes the backup IMU (LSM6DSO32).
int32_t imuB_write(void *handle, uint8_t reg_addr, const uint8_t *buf, uint16_t len)
SPI write function for the backup IMU (LSM6DSO32).
@ SWOFFSET
Apply a software-based offset after reading the data.
@ HWOFFSET
Use the hardware's internal offset registers.
@ RESET_HWOFFSET
Reset the hardware offset registers to their default values.
int8_t bmp390_P_read(uint8_t reg_addr, uint8_t *buf, uint32_t len, void *intf_ptr)
SPI read function for the primary Barometer (bmp390).
int8_t init_bmp390_B(struct bmp3_dev *bmp390)
Initializes the backup barometer (BMP390).
int8_t bmp390_B_read(uint8_t reg_addr, uint8_t *buf, uint32_t len, void *intf_ptr)
SPI read function for the backup Barometer (bmp390).
int8_t bmp390_B_write(uint8_t reg_addr, const uint8_t *buf, uint32_t len, void *intf_ptr)
SPI write function for the backup Barometer (bmp390).
int8_t init_bmp390_p(struct bmp3_dev *bmp390)
Initializes the primary barometer (BMP390).
int8_t bmp390_P_write(uint8_t reg_addr, const uint8_t *buf, uint32_t len, void *intf_ptr)
SPI write function for the primary Barometer (bmp390).
This file contains all the functions prototypes for the lsm6dso32_reg.c driver.
: Header for main.c file. This file contains the common defines of the application.
float_t readAltitude(float_t seaLevelPa, float_t seaLevelT, float_t currentPa)
Calculates altitude based on the barometric formula.
HAL_StatusTypeDef
HAL Status structures definition.