ICARUS OS (Intelligent Cooperative Architecture for Real-time Unified Systems) 0.1.0
Preemptive Real-Time Operating System for ARM Cortex-M7
Loading...
Searching...
No Matches
lsm9ds1_reg.h File Reference

This file contains all the functions prototypes for the lsm9ds1_reg.c driver. More...

#include <stdint.h>
#include <stddef.h>
#include <math.h>

Go to the source code of this file.

Data Structures

struct  bitwise_t
 
struct  stmdev_ctx_t
 
struct  ucf_line_t
 
struct  lsm9ds1_act_ths_t
 
struct  lsm9ds1_int_gen_cfg_xl_t
 
struct  lsm9ds1_int_gen_dur_xl_t
 
struct  lsm9ds1_int1_ctrl_t
 
struct  lsm9ds1_int2_ctrl_t
 
struct  lsm9ds1_ctrl_reg1_g_t
 
struct  lsm9ds1_ctrl_reg2_g_t
 
struct  lsm9ds1_ctrl_reg3_g_t
 
struct  lsm9ds1_orient_cfg_g_t
 
struct  lsm9ds1_int_gen_src_g_t
 
struct  lsm9ds1_status_reg_t
 
struct  lsm9ds1_ctrl_reg4_t
 
struct  lsm9ds1_ctrl_reg5_xl_t
 
struct  lsm9ds1_ctrl_reg6_xl_t
 
struct  lsm9ds1_ctrl_reg7_xl_t
 
struct  lsm9ds1_ctrl_reg8_t
 
struct  lsm9ds1_ctrl_reg9_t
 
struct  lsm9ds1_ctrl_reg10_t
 
struct  lsm9ds1_int_gen_src_xl_t
 
struct  lsm9ds1_fifo_ctrl_t
 
struct  lsm9ds1_fifo_src_t
 
struct  lsm9ds1_int_gen_cfg_g_t
 
struct  lsm9ds1_int_gen_ths_xh_g_t
 
struct  lsm9ds1_int_gen_ths_xl_g_t
 
struct  lsm9ds1_int_gen_ths_yh_g_t
 
struct  lsm9ds1_int_gen_ths_yl_g_t
 
struct  lsm9ds1_int_gen_ths_zh_g_t
 
struct  lsm9ds1_int_gen_ths_zl_g_t
 
struct  lsm9ds1_int_gen_dur_g_t
 
struct  lsm9ds1_ctrl_reg1_m_t
 
struct  lsm9ds1_ctrl_reg2_m_t
 
struct  lsm9ds1_ctrl_reg3_m_t
 
struct  lsm9ds1_ctrl_reg4_m_t
 
struct  lsm9ds1_ctrl_reg5_m_t
 
struct  lsm9ds1_status_reg_m_t
 
struct  lsm9ds1_int_cfg_m_t
 
struct  lsm9ds1_int_src_m_t
 
struct  lsm9ds1_int_ths_l_m_t
 
struct  lsm9ds1_int_ths_h_m_t
 
union  lsm9ds1_reg_t
 
struct  lsm9ds1_gy_orient_t
 
struct  lsm9ds1_gy_axis_t
 
struct  lsm9ds1_xl_axis_t
 
struct  lsm9ds1_id_t
 
struct  lsm9ds1_status_t
 
struct  lsm9ds1_pin_int1_route_t
 
struct  lsm9ds1_pin_int2_route_t
 
struct  lsm9ds1_pin_m_route_t
 
struct  lsm9ds1_xl_trshld_en_t
 
struct  lsm9ds1_gy_trshld_src_t
 
struct  lsm9ds1_xl_trshld_src_t
 
struct  lsm9ds1_gy_trshld_en_t
 
struct  lsm9ds1_mag_trshld_axis_t
 
struct  lsm9ds1_mag_trshld_src_t
 
struct  lsm9ds1_6d_src_t
 

Macros

#define DRV_LITTLE_ENDIAN   1234
 
#define DRV_BIG_ENDIAN   4321
 
#define DRV_BYTE_ORDER   DRV_LITTLE_ENDIAN
 if _BYTE_ORDER is not defined, choose the endianness of your architecture by uncommenting the define which fits your platform endianness
 
#define MEMS_SHARED_TYPES
 
#define PROPERTY_DISABLE   (0U)
 
#define PROPERTY_ENABLE   (1U)
 
#define MEMS_UCF_SHARED_TYPES
 
#define LSM9DS1_IMU_I2C_ADD_L   0xD5U
 I2C Device Address 8 bit format if SA0=0 -> 0xD5 if SA0=1 -> 0xD7.
 
#define LSM9DS1_IMU_I2C_ADD_H   0xD7U
 
#define LSM9DS1_MAG_I2C_ADD_L   0x39U
 I2C Device Address 8 bit format if SA0=0 -> 0x3D if SA0=1 -> 0x39.
 
#define LSM9DS1_MAG_I2C_ADD_H   0x3DU
 
#define LSM9DS1_IMU_ID   0x68U
 Device Identification (Who am I)
 
#define LSM9DS1_MAG_ID   0x3DU
 Device Identification (Who am I)
 
#define LSM9DS1_ACT_THS   0x04U
 
#define LSM9DS1_ACT_DUR   0x05U
 
#define LSM9DS1_INT_GEN_CFG_XL   0x06U
 
#define LSM9DS1_INT_GEN_THS_X_XL   0x07U
 
#define LSM9DS1_INT_GEN_THS_Y_XL   0x08U
 
#define LSM9DS1_INT_GEN_THS_Z_XL   0x09U
 
#define LSM9DS1_INT_GEN_DUR_XL   0x0AU
 
#define LSM9DS1_REFERENCE_G   0x0BU
 
#define LSM9DS1_INT1_CTRL   0x0CU
 
#define LSM9DS1_INT2_CTRL   0x0DU
 
#define LSM9DS1_WHO_AM_I   0x0FU
 
#define LSM9DS1_CTRL_REG1_G   0x10U
 
#define LSM9DS1_CTRL_REG2_G   0x11U
 
#define LSM9DS1_CTRL_REG3_G   0x12U
 
#define LSM9DS1_ORIENT_CFG_G   0x13U
 
#define LSM9DS1_INT_GEN_SRC_G   0x14U
 
#define LSM9DS1_OUT_TEMP_L   0x15U
 
#define LSM9DS1_OUT_TEMP_H   0x16U
 
#define LSM9DS1_STATUS_REG   0x17U
 
#define LSM9DS1_OUT_X_L_G   0x18U
 
#define LSM9DS1_OUT_X_H_G   0x19U
 
#define LSM9DS1_OUT_Y_L_G   0x1AU
 
#define LSM9DS1_OUT_Y_H_G   0x1BU
 
#define LSM9DS1_OUT_Z_L_G   0x1CU
 
#define LSM9DS1_OUT_Z_H_G   0x1DU
 
#define LSM9DS1_CTRL_REG4   0x1EU
 
#define LSM9DS1_CTRL_REG5_XL   0x1FU
 
#define LSM9DS1_CTRL_REG6_XL   0x20U
 
#define LSM9DS1_CTRL_REG7_XL   0x21U
 
#define LSM9DS1_CTRL_REG8   0x22U
 
#define LSM9DS1_CTRL_REG9   0x23U
 
#define LSM9DS1_CTRL_REG10   0x24U
 
#define LSM9DS1_INT_GEN_SRC_XL   0x26U
 
#define LSM9DS1_OUT_X_L_XL   0x28U
 
#define LSM9DS1_OUT_X_H_XL   0x29U
 
#define LSM9DS1_OUT_Y_L_XL   0x2AU
 
#define LSM9DS1_OUT_Y_H_XL   0x2BU
 
#define LSM9DS1_OUT_Z_L_XL   0x2CU
 
#define LSM9DS1_OUT_Z_H_XL   0x2DU
 
#define LSM9DS1_FIFO_CTRL   0x2EU
 
#define LSM9DS1_FIFO_SRC   0x2FU
 
#define LSM9DS1_INT_GEN_CFG_G   0x30U
 
#define LSM9DS1_INT_GEN_THS_XH_G   0x31U
 
#define LSM9DS1_INT_GEN_THS_XL_G   0x32U
 
#define LSM9DS1_INT_GEN_THS_YH_G   0x33U
 
#define LSM9DS1_INT_GEN_THS_YL_G   0x34U
 
#define LSM9DS1_INT_GEN_THS_ZH_G   0x35U
 
#define LSM9DS1_INT_GEN_THS_ZL_G   0x36U
 
#define LSM9DS1_INT_GEN_DUR_G   0x37U
 
#define LSM9DS1_OFFSET_X_REG_L_M   0x05U
 
#define LSM9DS1_OFFSET_X_REG_H_M   0x06U
 
#define LSM9DS1_OFFSET_Y_REG_L_M   0x07U
 
#define LSM9DS1_OFFSET_Y_REG_H_M   0x08U
 
#define LSM9DS1_OFFSET_Z_REG_L_M   0x09U
 
#define LSM9DS1_OFFSET_Z_REG_H_M   0x0AU
 
#define LSM9DS1_WHO_AM_I_M   0x0FU
 
#define LSM9DS1_CTRL_REG1_M   0x20U
 
#define LSM9DS1_CTRL_REG2_M   0x21U
 
#define LSM9DS1_CTRL_REG3_M   0x22U
 
#define LSM9DS1_CTRL_REG4_M   0x23U
 
#define LSM9DS1_CTRL_REG5_M   0x24U
 
#define LSM9DS1_STATUS_REG_M   0x27U
 
#define LSM9DS1_OUT_X_L_M   0x28U
 
#define LSM9DS1_OUT_X_H_M   0x29U
 
#define LSM9DS1_OUT_Y_L_M   0x2AU
 
#define LSM9DS1_OUT_Y_H_M   0x2BU
 
#define LSM9DS1_OUT_Z_L_M   0x2CU
 
#define LSM9DS1_OUT_Z_H_M   0x2DU
 
#define LSM9DS1_INT_CFG_M   0x30U
 
#define LSM9DS1_INT_SRC_M   0x31U
 
#define LSM9DS1_INT_THS_L_M   0x32U
 
#define LSM9DS1_INT_THS_H_M   0x33U
 
#define __weak   __attribute__((weak))
 

Typedefs

typedef int32_t(* stmdev_write_ptr) (void *, uint8_t, const uint8_t *, uint16_t)
 
typedef int32_t(* stmdev_read_ptr) (void *, uint8_t, uint8_t *, uint16_t)
 
typedef void(* stmdev_mdelay_ptr) (uint32_t millisec)
 

Enumerations

enum  lsm9ds1_gy_fs_t { LSM9DS1_245dps = 0 , LSM9DS1_500dps = 1 , LSM9DS1_2000dps = 3 }
 
enum  lsm9ds1_imu_odr_t {
  LSM9DS1_IMU_OFF = 0x00 , LSM9DS1_GY_OFF_XL_10Hz = 0x10 , LSM9DS1_GY_OFF_XL_50Hz = 0x20 , LSM9DS1_GY_OFF_XL_119Hz = 0x30 ,
  LSM9DS1_GY_OFF_XL_238Hz = 0x40 , LSM9DS1_GY_OFF_XL_476Hz = 0x50 , LSM9DS1_GY_OFF_XL_952Hz = 0x60 , LSM9DS1_XL_OFF_GY_14Hz9 = 0x01 ,
  LSM9DS1_XL_OFF_GY_59Hz5 = 0x02 , LSM9DS1_XL_OFF_GY_119Hz = 0x03 , LSM9DS1_XL_OFF_GY_238Hz = 0x04 , LSM9DS1_XL_OFF_GY_476Hz = 0x05 ,
  LSM9DS1_XL_OFF_GY_952Hz = 0x06 , LSM9DS1_IMU_14Hz9 = 0x11 , LSM9DS1_IMU_59Hz5 = 0x22 , LSM9DS1_IMU_119Hz = 0x33 ,
  LSM9DS1_IMU_238Hz = 0x44 , LSM9DS1_IMU_476Hz = 0x55 , LSM9DS1_IMU_952Hz = 0x66 , LSM9DS1_XL_OFF_GY_14Hz9_LP = 0x81 ,
  LSM9DS1_XL_OFF_GY_59Hz5_LP = 0x82 , LSM9DS1_XL_OFF_GY_119Hz_LP = 0x83 , LSM9DS1_IMU_14Hz9_LP = 0x91 , LSM9DS1_IMU_59Hz5_LP = 0xA2 ,
  LSM9DS1_IMU_119Hz_LP = 0xB3
}
 
enum  lsm9ds1_dec_t { LSM9DS1_NO_DECIMATION = 0 , LSM9DS1_EVERY_2_SAMPLES = 1 , LSM9DS1_EVERY_4_SAMPLES = 2 , LSM9DS1_EVERY_8_SAMPLES = 3 }
 
enum  lsm9ds1_xl_fs_t { LSM9DS1_2g = 0 , LSM9DS1_16g = 1 , LSM9DS1_4g = 2 , LSM9DS1_8g = 3 }
 
enum  lsm9ds1_mag_data_rate_t {
  LSM9DS1_MAG_POWER_DOWN = 0xC0 , LSM9DS1_MAG_LP_0Hz625 = 0x00 , LSM9DS1_MAG_LP_1Hz25 = 0x01 , LSM9DS1_MAG_LP_2Hz5 = 0x02 ,
  LSM9DS1_MAG_LP_5Hz = 0x03 , LSM9DS1_MAG_LP_10Hz = 0x04 , LSM9DS1_MAG_LP_20Hz = 0x05 , LSM9DS1_MAG_LP_40Hz = 0x06 ,
  LSM9DS1_MAG_LP_80Hz = 0x07 , LSM9DS1_MAG_MP_0Hz625 = 0x10 , LSM9DS1_MAG_MP_1Hz25 = 0x11 , LSM9DS1_MAG_MP_2Hz5 = 0x12 ,
  LSM9DS1_MAG_MP_5Hz = 0x13 , LSM9DS1_MAG_MP_10Hz = 0x14 , LSM9DS1_MAG_MP_20Hz = 0x15 , LSM9DS1_MAG_MP_40Hz = 0x16 ,
  LSM9DS1_MAG_MP_80Hz = 0x17 , LSM9DS1_MAG_HP_0Hz625 = 0x20 , LSM9DS1_MAG_HP_1Hz25 = 0x21 , LSM9DS1_MAG_HP_2Hz5 = 0x22 ,
  LSM9DS1_MAG_HP_5Hz = 0x23 , LSM9DS1_MAG_HP_10Hz = 0x24 , LSM9DS1_MAG_HP_20Hz = 0x25 , LSM9DS1_MAG_HP_40Hz = 0x26 ,
  LSM9DS1_MAG_HP_80Hz = 0x27 , LSM9DS1_MAG_UHP_0Hz625 = 0x30 , LSM9DS1_MAG_UHP_1Hz25 = 0x31 , LSM9DS1_MAG_UHP_2Hz5 = 0x32 ,
  LSM9DS1_MAG_UHP_5Hz = 0x33 , LSM9DS1_MAG_UHP_10Hz = 0x34 , LSM9DS1_MAG_UHP_20Hz = 0x35 , LSM9DS1_MAG_UHP_40Hz = 0x36 ,
  LSM9DS1_MAG_UHP_80Hz = 0x37 , LSM9DS1_MAG_UHP_155Hz = 0x38 , LSM9DS1_MAG_HP_300Hz = 0x28 , LSM9DS1_MAG_MP_560Hz = 0x18 ,
  LSM9DS1_MAG_LP_1000Hz = 0x08 , LSM9DS1_MAG_ONE_SHOT = 0x70
}
 
enum  lsm9ds1_mag_fs_t { LSM9DS1_4Ga = 0 , LSM9DS1_8Ga = 1 , LSM9DS1_12Ga = 2 , LSM9DS1_16Ga = 3 }
 
enum  lsm9ds1_ble_t { LSM9DS1_LSB_LOW_ADDRESS = 0 , LSM9DS1_MSB_LOW_ADDRESS = 1 }
 
enum  lsm9ds1_gy_lp_bw_t { LSM9DS1_LP_STRONG = 0 , LSM9DS1_LP_MEDIUM = 1 , LSM9DS1_LP_LIGHT = 2 , LSM9DS1_LP_ULTRA_LIGHT = 3 }
 
enum  lsm9ds1_gy_out_path_t { LSM9DS1_LPF1_OUT = 0x00 , LSM9DS1_LPF1_HPF_OUT = 0x01 , LSM9DS1_LPF1_LPF2_OUT = 0x02 , LSM9DS1_LPF1_HPF_LPF2_OUT = 0x12 }
 
enum  lsm9ds1_gy_int_path_t { LSM9DS1_LPF1_INT = 0x00 , LSM9DS1_LPF1_HPF_INT = 0x01 , LSM9DS1_LPF1_LPF2_INT = 0x02 , LSM9DS1_LPF1_HPF_LPF2_INT = 0x12 }
 
enum  lsm9ds1_gy_hp_bw_t {
  LSM9DS1_HP_EXTREME = 0 , LSM9DS1_HP_ULTRA_STRONG = 1 , LSM9DS1_HP_STRONG = 2 , LSM9DS1_HP_ULTRA_HIGH = 3 ,
  LSM9DS1_HP_HIGH = 4 , LSM9DS1_HP_MEDIUM = 5 , LSM9DS1_HP_LOW = 6 , LSM9DS1_HP_ULTRA_LOW = 7 ,
  LSM9DS1_HP_LIGHT = 8 , LSM9DS1_HP_ULTRA_LIGHT = 9
}
 
enum  lsm9ds1_xl_aa_bw_t {
  LSM9DS1_AUTO = 0x00 , LSM9DS1_408Hz = 0x10 , LSM9DS1_211Hz = 0x11 , LSM9DS1_105Hz = 0x12 ,
  LSM9DS1_50Hz = 0x13
}
 
enum  lsm9ds1_xl_hp_path_t { LSM9DS1_HP_DIS = 0 , LSM9DS1_HP_EN = 1 }
 
enum  lsm9ds1_xl_out_path_t { LSM9DS1_LP_OUT = 0 , LSM9DS1_HP_OUT = 1 }
 
enum  lsm9ds1_xl_lp_bw_t {
  LSM9DS1_LP_DISABLE = 0x00 , LSM9DS1_LP_ODR_DIV_50 = 0x10 , LSM9DS1_LP_ODR_DIV_100 = 0x11 , LSM9DS1_LP_ODR_DIV_9 = 0x12 ,
  LSM9DS1_LP_ODR_DIV_400 = 0x13
}
 
enum  lsm9ds1_xl_hp_bw_t { LSM9DS1_HP_ODR_DIV_50 = 0 , LSM9DS1_HP_ODR_DIV_100 = 1 , LSM9DS1_HP_ODR_DIV_9 = 2 , LSM9DS1_HP_ODR_DIV_400 = 3 }
 
enum  lsm9ds1_sim_t { LSM9DS1_SPI_4_WIRE = 0 , LSM9DS1_SPI_3_WIRE = 1 }
 
enum  lsm9ds1_i2c_dis_t { LSM9DS1_I2C_ENABLE = 0 , LSM9DS1_I2C_DISABLE = 1 }
 
enum  lsm9ds1_pin_logic_t { LSM9DS1_LOGIC_OR = 0 , LSM9DS1_LOGIC_AND = 1 }
 
enum  lsm9ds1_lir_t { LSM9DS1_INT_PULSED = 0 , LSM9DS1_INT_LATCHED = 1 }
 
enum  lsm9ds1_pp_od_t { LSM9DS1_PUSH_PULL = 0 , LSM9DS1_OPEN_DRAIN = 1 }
 
enum  lsm9ds1_polarity_t { LSM9DS1_ACTIVE_LOW = 0 , LSM9DS1_ACTIVE_HIGH = 1 }
 
enum  lsm9ds1_dcrm_g_t { LSM9DS1_RESET_MODE = 0 , LSM9DS1_DECREMENT_MODE = 1 }
 
enum  lsm9ds1_act_mode_t { LSM9DS1_GYRO_POWER_DOWN = 0 , LSM9DS1_GYRO_SLEEP = 1 }
 
enum  lsm9ds1_inact_t { LSM9DS1_ACTIVITY = 0 , LSM9DS1_INACTIVITY = 1 }
 
enum  lsm9ds1_6d_mode_t {
  LSM9DS1_POS_MOVE_RECO_DISABLE = 0x00 , LSM9DS1_6D_MOVE_RECO = 0x01 , LSM9DS1_4D_MOVE_RECO = 0x05 , LSM9DS1_6D_POS_RECO = 0x03 ,
  LSM9DS1_4D_POS_RECO = 0x07
}
 
enum  lsm9ds1_fifo_md_t {
  LSM9DS1_FIFO_OFF = 0x00 , LSM9DS1_BYPASS_MODE = 0x10 , LSM9DS1_FIFO_MODE = 0x11 , LSM9DS1_STREAM_TO_FIFO_MODE = 0x13 ,
  LSM9DS1_BYPASS_TO_STREAM_MODE = 0x14 , LSM9DS1_STREAM_MODE = 0x16
}
 

Functions

int32_t lsm9ds1_read_reg (const stmdev_ctx_t *ctx, uint8_t reg, uint8_t *data, uint16_t len)
 Read generic device register.
 
int32_t lsm9ds1_write_reg (const stmdev_ctx_t *ctx, uint8_t reg, uint8_t *data, uint16_t len)
 Write generic device register.
 
float_t lsm9ds1_from_fs2g_to_mg (int16_t lsb)
 
float_t lsm9ds1_from_fs4g_to_mg (int16_t lsb)
 
float_t lsm9ds1_from_fs8g_to_mg (int16_t lsb)
 
float_t lsm9ds1_from_fs16g_to_mg (int16_t lsb)
 
float_t lsm9ds1_from_fs245dps_to_mdps (int16_t lsb)
 
float_t lsm9ds1_from_fs500dps_to_mdps (int16_t lsb)
 
float_t lsm9ds1_from_fs2000dps_to_mdps (int16_t lsb)
 
float_t lsm9ds1_from_fs4gauss_to_mG (int16_t lsb)
 
float_t lsm9ds1_from_fs8gauss_to_mG (int16_t lsb)
 
float_t lsm9ds1_from_fs12gauss_to_mG (int16_t lsb)
 
float_t lsm9ds1_from_fs16gauss_to_mG (int16_t lsb)
 
float_t lsm9ds1_from_lsb_to_celsius (int16_t lsb)
 
int32_t lsm9ds1_gy_full_scale_set (const stmdev_ctx_t *ctx, lsm9ds1_gy_fs_t val)
 Gyroscope full-scale selection.
 
int32_t lsm9ds1_gy_full_scale_get (const stmdev_ctx_t *ctx, lsm9ds1_gy_fs_t *val)
 Gyroscope full-scale selection.
 
int32_t lsm9ds1_imu_data_rate_set (const stmdev_ctx_t *ctx, lsm9ds1_imu_odr_t val)
 Data rate selection when both the accelerometer and gyroscope are activated.
 
int32_t lsm9ds1_imu_data_rate_get (const stmdev_ctx_t *ctx, lsm9ds1_imu_odr_t *val)
 Data rate selection when both the accelerometer and gyroscope are activated.
 
int32_t lsm9ds1_gy_orient_set (const stmdev_ctx_t *ctx, lsm9ds1_gy_orient_t val)
 Configure gyro orientation.
 
int32_t lsm9ds1_gy_orient_get (const stmdev_ctx_t *ctx, lsm9ds1_gy_orient_t *val)
 Configure gyro orientation.
 
int32_t lsm9ds1_xl_flag_data_ready_get (const stmdev_ctx_t *ctx, uint8_t *val)
 Accelerometer new data available.
 
int32_t lsm9ds1_gy_flag_data_ready_get (const stmdev_ctx_t *ctx, uint8_t *val)
 Gyroscope new data available.
 
int32_t lsm9ds1_temp_flag_data_ready_get (const stmdev_ctx_t *ctx, uint8_t *val)
 Temperature new data available.
 
int32_t lsm9ds1_gy_axis_set (const stmdev_ctx_t *ctx, lsm9ds1_gy_axis_t val)
 Enable gyroscope axis.
 
int32_t lsm9ds1_gy_axis_get (const stmdev_ctx_t *ctx, lsm9ds1_gy_axis_t *val)
 Enable gyroscope axis.
 
int32_t lsm9ds1_xl_axis_set (const stmdev_ctx_t *ctx, lsm9ds1_xl_axis_t val)
 Enable accelerometer axis.
 
int32_t lsm9ds1_xl_axis_get (const stmdev_ctx_t *ctx, lsm9ds1_xl_axis_t *val)
 Enable accelerometer axis.
 
int32_t lsm9ds1_xl_decimation_set (const stmdev_ctx_t *ctx, lsm9ds1_dec_t val)
 Decimation of acceleration data on OUT REG and FIFO.
 
int32_t lsm9ds1_xl_decimation_get (const stmdev_ctx_t *ctx, lsm9ds1_dec_t *val)
 Decimation of acceleration data on OUT REG and FIFO.
 
int32_t lsm9ds1_xl_full_scale_set (const stmdev_ctx_t *ctx, lsm9ds1_xl_fs_t val)
 Accelerometer full-scale selection.
 
int32_t lsm9ds1_xl_full_scale_get (const stmdev_ctx_t *ctx, lsm9ds1_xl_fs_t *val)
 Accelerometer full-scale selection.
 
int32_t lsm9ds1_block_data_update_set (const stmdev_ctx_t *ctx_mag, stmdev_ctx_t *ctx_imu, uint8_t val)
 Blockdataupdate.
 
int32_t lsm9ds1_block_data_update_get (const stmdev_ctx_t *ctx_mag, stmdev_ctx_t *ctx_imu, uint8_t *val)
 Blockdataupdate.
 
int32_t lsm9ds1_mag_offset_set (const stmdev_ctx_t *ctx, int16_t *val)
 This register is a 16-bit register and represents the X offset used to compensate environmental effects (data is expressed as two’s complement).
 
int32_t lsm9ds1_mag_offset_get (const stmdev_ctx_t *ctx, int16_t *val)
 This register is a 16-bit register and represents the X offset used to compensate environmental effects (data is expressed as two’s complement).
 
int32_t lsm9ds1_mag_data_rate_set (const stmdev_ctx_t *ctx, lsm9ds1_mag_data_rate_t val)
 Magnetometer data rate selection.
 
int32_t lsm9ds1_mag_data_rate_get (const stmdev_ctx_t *ctx, lsm9ds1_mag_data_rate_t *val)
 Magnetometer data rate selection.
 
int32_t lsm9ds1_mag_full_scale_set (const stmdev_ctx_t *ctx, lsm9ds1_mag_fs_t val)
 Magnetometer full Scale Selection.
 
int32_t lsm9ds1_mag_full_scale_get (const stmdev_ctx_t *ctx, lsm9ds1_mag_fs_t *val)
 Magnetometer full scale selection.
 
int32_t lsm9ds1_mag_flag_data_ready_get (const stmdev_ctx_t *ctx, uint8_t *val)
 New data available from magnetometer.
 
int32_t lsm9ds1_temperature_raw_get (const stmdev_ctx_t *ctx, int16_t *val)
 Temperature data output register (r).
 
int32_t lsm9ds1_angular_rate_raw_get (const stmdev_ctx_t *ctx, int16_t *val)
 Angular rate sensor.
 
int32_t lsm9ds1_acceleration_raw_get (const stmdev_ctx_t *ctx, int16_t *val)
 Linear acceleration output register.
 
int32_t lsm9ds1_magnetic_raw_get (const stmdev_ctx_t *ctx, int16_t *val)
 Magnetic sensor.
 
int32_t lsm9ds1_magnetic_overflow_get (const stmdev_ctx_t *ctx, uint8_t *val)
 Internal measurement range overflow on magnetic value.
 
int32_t lsm9ds1_dev_id_get (const stmdev_ctx_t *ctx_mag, stmdev_ctx_t *ctx_imu, lsm9ds1_id_t *buff)
 DeviceWhoamI.
 
int32_t lsm9ds1_dev_status_get (const stmdev_ctx_t *ctx_mag, stmdev_ctx_t *ctx_imu, lsm9ds1_status_t *val)
 Device status register.
 
int32_t lsm9ds1_dev_reset_set (const stmdev_ctx_t *ctx_mag, stmdev_ctx_t *ctx_imu, uint8_t val)
 Software reset.
 
int32_t lsm9ds1_dev_reset_get (const stmdev_ctx_t *ctx_mag, stmdev_ctx_t *ctx_imu, uint8_t *val)
 Software reset.
 
int32_t lsm9ds1_dev_data_format_set (const stmdev_ctx_t *ctx_mag, stmdev_ctx_t *ctx_imu, lsm9ds1_ble_t val)
 Big/Little Endian data selection.
 
int32_t lsm9ds1_dev_data_format_get (const stmdev_ctx_t *ctx_mag, stmdev_ctx_t *ctx_imu, lsm9ds1_ble_t *val)
 Big/Little Endian data selection.
 
int32_t lsm9ds1_dev_boot_set (const stmdev_ctx_t *ctx_mag, stmdev_ctx_t *ctx_imu, uint8_t val)
 Reboot memory content.
 
int32_t lsm9ds1_dev_boot_get (const stmdev_ctx_t *ctx_mag, stmdev_ctx_t *ctx_imu, uint8_t *val)
 Reboot memory content.
 
int32_t lsm9ds1_gy_filter_reference_set (const stmdev_ctx_t *ctx, uint8_t *buff)
 Reference value for gyroscope’s digital high-pass filter.
 
int32_t lsm9ds1_gy_filter_reference_get (const stmdev_ctx_t *ctx, uint8_t *buff)
 Reference value for gyroscope’s digital high-pass filter.
 
int32_t lsm9ds1_gy_filter_lp_bandwidth_set (const stmdev_ctx_t *ctx, lsm9ds1_gy_lp_bw_t val)
 Gyroscope lowpass filter bandwidth selection.
 
int32_t lsm9ds1_gy_filter_lp_bandwidth_get (const stmdev_ctx_t *ctx, lsm9ds1_gy_lp_bw_t *val)
 Gyroscope lowpass filter bandwidth selection.
 
int32_t lsm9ds1_gy_filter_out_path_set (const stmdev_ctx_t *ctx, lsm9ds1_gy_out_path_t val)
 Gyro output filter path configuration.
 
int32_t lsm9ds1_gy_filter_out_path_get (const stmdev_ctx_t *ctx, lsm9ds1_gy_out_path_t *val)
 Gyro output filter path configuration.
 
int32_t lsm9ds1_gy_filter_int_path_set (const stmdev_ctx_t *ctx, lsm9ds1_gy_int_path_t val)
 Gyro interrupt filter path configuration.
 
int32_t lsm9ds1_gy_filter_int_path_get (const stmdev_ctx_t *ctx, lsm9ds1_gy_int_path_t *val)
 Gyro interrupt filter path configuration.
 
int32_t lsm9ds1_gy_filter_hp_bandwidth_set (const stmdev_ctx_t *ctx, lsm9ds1_gy_hp_bw_t val)
 Gyroscope high-pass filter bandwidth selection.
 
int32_t lsm9ds1_gy_filter_hp_bandwidth_get (const stmdev_ctx_t *ctx, lsm9ds1_gy_hp_bw_t *val)
 Gyroscope high-pass filter bandwidth selection.
 
int32_t lsm9ds1_xl_filter_aalias_bandwidth_set (const stmdev_ctx_t *ctx, lsm9ds1_xl_aa_bw_t val)
 Configure accelerometer anti aliasing filter.
 
int32_t lsm9ds1_xl_filter_aalias_bandwidth_get (const stmdev_ctx_t *ctx, lsm9ds1_xl_aa_bw_t *val)
 Configure accelerometer anti aliasing filter.
 
int32_t lsm9ds1_xl_filter_int_path_set (const stmdev_ctx_t *ctx, lsm9ds1_xl_hp_path_t val)
 Configure HP accelerometer filter.
 
int32_t lsm9ds1_xl_filter_int_path_get (const stmdev_ctx_t *ctx, lsm9ds1_xl_hp_path_t *val)
 
int32_t lsm9ds1_xl_filter_out_path_set (const stmdev_ctx_t *ctx, lsm9ds1_xl_out_path_t val)
 Accelerometer output filter path configuration.
 
int32_t lsm9ds1_xl_filter_out_path_get (const stmdev_ctx_t *ctx, lsm9ds1_xl_out_path_t *val)
 Accelerometer output filter path configuration.
 
int32_t lsm9ds1_xl_filter_lp_bandwidth_set (const stmdev_ctx_t *ctx, lsm9ds1_xl_lp_bw_t val)
 Accelerometer digital filter low pass cutoff frequency selection.
 
int32_t lsm9ds1_xl_filter_lp_bandwidth_get (const stmdev_ctx_t *ctx, lsm9ds1_xl_lp_bw_t *val)
 Accelerometer digital filter low pass cutoff frequency selection.
 
int32_t lsm9ds1_xl_filter_hp_bandwidth_set (const stmdev_ctx_t *ctx, lsm9ds1_xl_hp_bw_t val)
 Accelerometer digital filter high pass cutoff frequency selection.
 
int32_t lsm9ds1_xl_filter_hp_bandwidth_get (const stmdev_ctx_t *ctx, lsm9ds1_xl_hp_bw_t *val)
 Accelerometer digital filter high pass cutoff frequency selection.
 
int32_t lsm9ds1_filter_settling_mask_set (const stmdev_ctx_t *ctx, uint8_t val)
 Mask DRDY on pin (both XL & Gyro) until filter settling ends.
 
int32_t lsm9ds1_filter_settling_mask_get (const stmdev_ctx_t *ctx, uint8_t *val)
 Mask DRDY on pin (both XL & Gyro) until filter settling ends.
 
int32_t lsm9ds1_auto_increment_set (const stmdev_ctx_t *ctx, uint8_t val)
 Register address automatically incremented during a multiple byte access with a serial interface.
 
int32_t lsm9ds1_auto_increment_get (const stmdev_ctx_t *ctx, uint8_t *val)
 Register address automatically incremented during a multiple byte access with a serial interface.
 
int32_t lsm9ds1_spi_mode_set (const stmdev_ctx_t *ctx_mag, stmdev_ctx_t *ctx_imu, lsm9ds1_sim_t val)
 SPI Serial Interface Mode selection.
 
int32_t lsm9ds1_spi_mode_get (const stmdev_ctx_t *ctx_mag, stmdev_ctx_t *ctx_imu, lsm9ds1_sim_t *val)
 SPI Serial Interface Mode selection.
 
int32_t lsm9ds1_i2c_interface_set (const stmdev_ctx_t *ctx_mag, stmdev_ctx_t *ctx_imu, lsm9ds1_i2c_dis_t val)
 Enable / Disable I2C interface.
 
int32_t lsm9ds1_i2c_interface_get (const stmdev_ctx_t *ctx_mag, stmdev_ctx_t *ctx_imu, lsm9ds1_i2c_dis_t *val)
 Enable / Disable I2C interface.
 
int32_t lsm9ds1_pin_logic_set (const stmdev_ctx_t *ctx, lsm9ds1_pin_logic_t val)
 AND/OR combination of accelerometer’s interrupt events.
 
int32_t lsm9ds1_pin_logic_get (const stmdev_ctx_t *ctx, lsm9ds1_pin_logic_t *val)
 AND/OR combination of accelerometer’s interrupt events.
 
int32_t lsm9ds1_pin_int1_route_set (const stmdev_ctx_t *ctx, lsm9ds1_pin_int1_route_t val)
 Route a signal on INT 1_A/G pin.
 
int32_t lsm9ds1_pin_int1_route_get (const stmdev_ctx_t *ctx, lsm9ds1_pin_int1_route_t *val)
 Route a signal on INT 1_A/G pin.
 
int32_t lsm9ds1_pin_int2_route_set (const stmdev_ctx_t *ctx, lsm9ds1_pin_int2_route_t val)
 Route a signal on INT 2_A/G pin.
 
int32_t lsm9ds1_pin_int2_route_get (const stmdev_ctx_t *ctx, lsm9ds1_pin_int2_route_t *val)
 Route a signal on INT 2_A/G pin.
 
int32_t lsm9ds1_pin_notification_set (const stmdev_ctx_t *ctx_mag, stmdev_ctx_t *ctx_imu, lsm9ds1_lir_t val)
 Latched/pulsed interrupt.
 
int32_t lsm9ds1_pin_notification_get (const stmdev_ctx_t *ctx_mag, stmdev_ctx_t *ctx_imu, lsm9ds1_lir_t *val)
 Configure the interrupt notification mode.
 
int32_t lsm9ds1_pin_mode_set (const stmdev_ctx_t *ctx, lsm9ds1_pp_od_t val)
 Push-pull/open drain selection on interrupt pads.
 
int32_t lsm9ds1_pin_mode_get (const stmdev_ctx_t *ctx, lsm9ds1_pp_od_t *val)
 Push-pull/open drain selection on interrupt pads.
 
int32_t lsm9ds1_pin_int_m_route_set (const stmdev_ctx_t *ctx, lsm9ds1_pin_m_route_t val)
 Route a signal on INT_M pin.
 
int32_t lsm9ds1_pin_int_m_route_get (const stmdev_ctx_t *ctx, lsm9ds1_pin_m_route_t *val)
 Route a signal on INT_M pin.
 
int32_t lsm9ds1_pin_polarity_set (const stmdev_ctx_t *ctx_mag, stmdev_ctx_t *ctx_imu, lsm9ds1_polarity_t val)
 Configure the interrupt pin polarity.
 
int32_t lsm9ds1_pin_polarity_get (const stmdev_ctx_t *ctx_mag, stmdev_ctx_t *ctx_imu, lsm9ds1_polarity_t *val)
 Configure the interrupt pin polarity.
 
int32_t lsm9ds1_xl_trshld_axis_set (const stmdev_ctx_t *ctx, lsm9ds1_xl_trshld_en_t val)
 Enable interrupt generation on threshold event.
 
int32_t lsm9ds1_xl_trshld_axis_get (const stmdev_ctx_t *ctx, lsm9ds1_xl_trshld_en_t *val)
 Enable interrupt generation on threshold event.
 
int32_t lsm9ds1_xl_trshld_set (const stmdev_ctx_t *ctx, uint8_t *buff)
 Axis interrupt threshold.
 
int32_t lsm9ds1_xl_trshld_get (const stmdev_ctx_t *ctx, uint8_t *buff)
 Axis interrupt threshold.
 
int32_t lsm9ds1_xl_trshld_min_sample_set (const stmdev_ctx_t *ctx, uint8_t val)
 Enter/exit interrupt duration value.
 
int32_t lsm9ds1_xl_trshld_min_sample_get (const stmdev_ctx_t *ctx, uint8_t *val)
 Enter/exit interrupt duration value.
 
int32_t lsm9ds1_gy_trshld_src_get (const stmdev_ctx_t *ctx, lsm9ds1_gy_trshld_src_t *val)
 Angular rate sensor interrupt on threshold source.
 
int32_t lsm9ds1_xl_trshld_src_get (const stmdev_ctx_t *ctx, lsm9ds1_xl_trshld_src_t *val)
 Accelerometer interrupt on threshold source.
 
int32_t lsm9ds1_gy_trshld_axis_set (const stmdev_ctx_t *ctx, lsm9ds1_gy_trshld_en_t val)
 Enable interrupt generation on threshold event.
 
int32_t lsm9ds1_gy_trshld_axis_get (const stmdev_ctx_t *ctx, lsm9ds1_gy_trshld_en_t *val)
 Enable interrupt generation on threshold event.
 
int32_t lsm9ds1_gy_trshld_mode_set (const stmdev_ctx_t *ctx, lsm9ds1_dcrm_g_t val)
 Decrement or reset counter mode selection.
 
int32_t lsm9ds1_gy_trshld_mode_get (const stmdev_ctx_t *ctx, lsm9ds1_dcrm_g_t *val)
 Decrement or reset counter mode selection.
 
int32_t lsm9ds1_gy_trshld_x_set (const stmdev_ctx_t *ctx, uint16_t val)
 Angular rate sensor interrupt threshold on pitch (X) axis.
 
int32_t lsm9ds1_gy_trshld_x_get (const stmdev_ctx_t *ctx, uint16_t *val)
 Angular rate sensor interrupt threshold on pitch (X) axis.
 
int32_t lsm9ds1_gy_trshld_y_set (const stmdev_ctx_t *ctx, uint16_t val)
 Angular rate sensor interrupt threshold on roll (Y) axis.
 
int32_t lsm9ds1_gy_trshld_y_get (const stmdev_ctx_t *ctx, uint16_t *val)
 Angular rate sensor interrupt threshold on roll (Y) axis.
 
int32_t lsm9ds1_gy_trshld_z_set (const stmdev_ctx_t *ctx, uint16_t val)
 Angular rate sensor interrupt thresholds on yaw (Z) axis.
 
int32_t lsm9ds1_gy_trshld_z_get (const stmdev_ctx_t *ctx, uint16_t *val)
 Angular rate sensor interrupt thresholds on yaw (Z) axis.
 
int32_t lsm9ds1_gy_trshld_min_sample_set (const stmdev_ctx_t *ctx, uint8_t val)
 Enter/exit interrupt duration value.
 
int32_t lsm9ds1_gy_trshld_min_sample_get (const stmdev_ctx_t *ctx, uint8_t *val)
 Enter/exit interrupt duration value.
 
int32_t lsm9ds1_mag_trshld_axis_set (const stmdev_ctx_t *ctx, lsm9ds1_mag_trshld_axis_t val)
 Enable interrupt generation on threshold event.
 
int32_t lsm9ds1_mag_trshld_axis_get (const stmdev_ctx_t *ctx, lsm9ds1_mag_trshld_axis_t *val)
 Enable interrupt generation on threshold event.
 
int32_t lsm9ds1_mag_trshld_src_get (const stmdev_ctx_t *ctx, lsm9ds1_mag_trshld_src_t *val)
 Magnetometer interrupt on threshold source.
 
int32_t lsm9ds1_mag_trshld_set (const stmdev_ctx_t *ctx, uint8_t *val)
 
int32_t lsm9ds1_mag_trshld_get (const stmdev_ctx_t *ctx, uint8_t *val)
 The value is expressed in 15-bit unsigned.
 
int32_t lsm9ds1_act_threshold_set (const stmdev_ctx_t *ctx, uint8_t val)
 Inactivity threshold.
 
int32_t lsm9ds1_act_threshold_get (const stmdev_ctx_t *ctx, uint8_t *val)
 Inactivity threshold.
 
int32_t lsm9ds1_act_mode_set (const stmdev_ctx_t *ctx, lsm9ds1_act_mode_t val)
 Gyroscope operating mode during inactivity.
 
int32_t lsm9ds1_act_mode_get (const stmdev_ctx_t *ctx, lsm9ds1_act_mode_t *val)
 Gyroscope operating mode during inactivity.
 
int32_t lsm9ds1_act_duration_set (const stmdev_ctx_t *ctx, uint8_t *buff)
 Inactivity duration in number of sample.
 
int32_t lsm9ds1_act_duration_get (const stmdev_ctx_t *ctx, uint8_t *buff)
 Inactivity duration in number of sample.
 
int32_t lsm9ds1_act_src_get (const stmdev_ctx_t *ctx, lsm9ds1_inact_t *val)
 Inactivity interrupt output signal.
 
int32_t lsm9ds1_6d_mode_set (const stmdev_ctx_t *ctx, lsm9ds1_6d_mode_t val)
 6D feature working mode.
 
int32_t lsm9ds1_6d_mode_get (const stmdev_ctx_t *ctx, lsm9ds1_6d_mode_t *val)
 6D feature working mode.
 
int32_t lsm9ds1_6d_threshold_set (const stmdev_ctx_t *ctx, uint8_t *buff)
 6D functionality axis interrupt threshold.
 
int32_t lsm9ds1_6d_threshold_get (const stmdev_ctx_t *ctx, uint8_t *buff)
 6D functionality axis interrupt threshold.
 
int32_t lsm9ds1_6d_src_get (const stmdev_ctx_t *ctx, lsm9ds1_6d_src_t *val)
 
int32_t lsm9ds1_fifo_stop_on_wtm_set (const stmdev_ctx_t *ctx, uint8_t val)
 Sensing chain FIFO stop values memorization at threshold level.
 
int32_t lsm9ds1_fifo_stop_on_wtm_get (const stmdev_ctx_t *ctx, uint8_t *val)
 Sensing chain FIFO stop values memorization at threshold level.
 
int32_t lsm9ds1_fifo_mode_set (const stmdev_ctx_t *ctx, lsm9ds1_fifo_md_t val)
 FIFO mode selection.
 
int32_t lsm9ds1_fifo_mode_get (const stmdev_ctx_t *ctx, lsm9ds1_fifo_md_t *val)
 FIFO mode selection.
 
int32_t lsm9ds1_fifo_temp_batch_set (const stmdev_ctx_t *ctx, uint8_t val)
 Batching of temperature data.
 
int32_t lsm9ds1_fifo_temp_batch_get (const stmdev_ctx_t *ctx, uint8_t *val)
 Batching of temperature data.
 
int32_t lsm9ds1_fifo_watermark_set (const stmdev_ctx_t *ctx, uint8_t val)
 FIFO watermark level selection.
 
int32_t lsm9ds1_fifo_watermark_get (const stmdev_ctx_t *ctx, uint8_t *val)
 FIFO watermark level selection.
 
int32_t lsm9ds1_fifo_full_flag_get (const stmdev_ctx_t *ctx, uint8_t *val)
 FIFOfullstatus.
 
int32_t lsm9ds1_fifo_data_level_get (const stmdev_ctx_t *ctx, uint8_t *val)
 Number of unread words (16-bit axes) stored in FIFO.
 
int32_t lsm9ds1_fifo_ovr_flag_get (const stmdev_ctx_t *ctx, uint8_t *val)
 FIFO overrun status.
 
int32_t lsm9ds1_fifo_wtm_flag_get (const stmdev_ctx_t *ctx, uint8_t *val)
 FIFO watermark status.
 
int32_t lsm9ds1_xl_self_test_set (const stmdev_ctx_t *ctx, uint8_t val)
 Enable/disable self-test mode for accelerometer.
 
int32_t lsm9ds1_xl_self_test_get (const stmdev_ctx_t *ctx, uint8_t *val)
 Enable/disable self-test mode for accelerometer.
 
int32_t lsm9ds1_gy_self_test_set (const stmdev_ctx_t *ctx, uint8_t val)
 Enable/disable self-test mode for gyroscope.
 
int32_t lsm9ds1_gy_self_test_get (const stmdev_ctx_t *ctx, uint8_t *val)
 Enable/disable self-test mode for gyroscope.
 
int32_t lsm9ds1_mag_self_test_set (const stmdev_ctx_t *ctx, uint8_t val)
 Enable/disable self-test mode for magnatic sensor.
 
int32_t lsm9ds1_mag_self_test_get (const stmdev_ctx_t *ctx, uint8_t *val)
 Enable/disable self-test mode for magnatic sensor.
 

Detailed Description

This file contains all the functions prototypes for the lsm9ds1_reg.c driver.

Author
Sensors Software Solution Team
Attention

© Copyright (c) 2021 STMicroelectronics. All rights reserved.

This software component is licensed by ST under BSD 3-Clause license, the "License"; You may not use this file except in compliance with the License. You may obtain a copy of the License at: opensource.org/licenses/BSD-3-Clause

Definition in file lsm9ds1_reg.h.