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

This file provides a set of functions needed to drive the lsm9ds1 enhanced inertial module. More...

Modules

 definitions
 
 sensors common types
 
 LSM9DS1_Infos
 
 LSM9DS1_Register_Union
 This union group all the registers having a bit-field description.
 
 LSM9DS1_Interfaces_Functions
 This section provide a set of functions used to read and write a generic register of the device.
 
 LSM9DS1_Sensitivity
 These functions convert raw-data into engineering units.
 
 LSM9DS1_Data_generation
 This section groups all the functions concerning data generation.
 
 LSM9DS1_Dataoutput
 This section groups all the data output functions.
 
 LSM9DS1_Common
 This section groups common useful functions.
 
 LSM9DS1_Filters
 This section group all the functions concerning the filters configuration.
 
 LSM9DS1_Serial_interface
 This section groups all the functions concerning main serial interface management (not auxiliary)
 
 LSM9DS1_Interrupt_pins
 This section groups all the functions that manage interrupt pins.
 
 LSM9DS1_Interrupt_on_threshold
 This section group all the functions concerning the interrupt on threshold configuration.
 
 Activity/Inactivity_detection
 This section groups all the functions concerning activity/inactivity detection.
 
 LSM9DS1_Fifo
 This section group all the functions concerning the fifo usage.
 
 LSM9DS1_Self_test
 This section groups all the functions that manage self test configuration.
 

Data Structures

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
 
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 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))
 

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 provides a set of functions needed to drive the lsm9ds1 enhanced inertial module.

Macro Definition Documentation

◆ __weak

#define __weak   __attribute__((weak))

Definition at line 948 of file lsm9ds1_reg.h.

◆ LSM9DS1_ACT_DUR

#define LSM9DS1_ACT_DUR   0x05U

Definition at line 202 of file lsm9ds1_reg.h.

◆ LSM9DS1_ACT_THS

#define LSM9DS1_ACT_THS   0x04U

Definition at line 190 of file lsm9ds1_reg.h.

◆ LSM9DS1_CTRL_REG10

#define LSM9DS1_CTRL_REG10   0x24U

Definition at line 536 of file lsm9ds1_reg.h.

◆ LSM9DS1_CTRL_REG1_G

#define LSM9DS1_CTRL_REG1_G   0x10U

Definition at line 292 of file lsm9ds1_reg.h.

◆ LSM9DS1_CTRL_REG1_M

#define LSM9DS1_CTRL_REG1_M   0x20U

Definition at line 703 of file lsm9ds1_reg.h.

◆ LSM9DS1_CTRL_REG2_G

#define LSM9DS1_CTRL_REG2_G   0x11U

Definition at line 308 of file lsm9ds1_reg.h.

◆ LSM9DS1_CTRL_REG2_M

#define LSM9DS1_CTRL_REG2_M   0x21U

Definition at line 721 of file lsm9ds1_reg.h.

◆ LSM9DS1_CTRL_REG3_G

#define LSM9DS1_CTRL_REG3_G   0x12U

Definition at line 322 of file lsm9ds1_reg.h.

◆ LSM9DS1_CTRL_REG3_M

#define LSM9DS1_CTRL_REG3_M   0x22U

Definition at line 741 of file lsm9ds1_reg.h.

◆ LSM9DS1_CTRL_REG4

#define LSM9DS1_CTRL_REG4   0x1EU

Definition at line 412 of file lsm9ds1_reg.h.

◆ LSM9DS1_CTRL_REG4_M

#define LSM9DS1_CTRL_REG4_M   0x23U

Definition at line 761 of file lsm9ds1_reg.h.

◆ LSM9DS1_CTRL_REG5_M

#define LSM9DS1_CTRL_REG5_M   0x24U

Definition at line 777 of file lsm9ds1_reg.h.

◆ LSM9DS1_CTRL_REG5_XL

#define LSM9DS1_CTRL_REG5_XL   0x1FU

Definition at line 434 of file lsm9ds1_reg.h.

◆ LSM9DS1_CTRL_REG6_XL

#define LSM9DS1_CTRL_REG6_XL   0x20U

Definition at line 452 of file lsm9ds1_reg.h.

◆ LSM9DS1_CTRL_REG7_XL

#define LSM9DS1_CTRL_REG7_XL   0x21U

Definition at line 468 of file lsm9ds1_reg.h.

◆ LSM9DS1_CTRL_REG8

#define LSM9DS1_CTRL_REG8   0x22U

Definition at line 488 of file lsm9ds1_reg.h.

◆ LSM9DS1_CTRL_REG9

#define LSM9DS1_CTRL_REG9   0x23U

Definition at line 512 of file lsm9ds1_reg.h.

◆ LSM9DS1_FIFO_CTRL

#define LSM9DS1_FIFO_CTRL   0x2EU

Definition at line 582 of file lsm9ds1_reg.h.

◆ LSM9DS1_FIFO_SRC

#define LSM9DS1_FIFO_SRC   0x2FU

Definition at line 594 of file lsm9ds1_reg.h.

◆ LSM9DS1_INT1_CTRL

#define LSM9DS1_INT1_CTRL   0x0CU

Definition at line 243 of file lsm9ds1_reg.h.

◆ LSM9DS1_INT2_CTRL

#define LSM9DS1_INT2_CTRL   0x0DU

Definition at line 267 of file lsm9ds1_reg.h.

◆ LSM9DS1_INT_CFG_M

#define LSM9DS1_INT_CFG_M   0x30U

Definition at line 821 of file lsm9ds1_reg.h.

◆ LSM9DS1_INT_GEN_CFG_G

#define LSM9DS1_INT_GEN_CFG_G   0x30U

Definition at line 608 of file lsm9ds1_reg.h.

◆ LSM9DS1_INT_GEN_CFG_XL

#define LSM9DS1_INT_GEN_CFG_XL   0x06U

Definition at line 203 of file lsm9ds1_reg.h.

◆ LSM9DS1_INT_GEN_DUR_G

#define LSM9DS1_INT_GEN_DUR_G   0x37U

Definition at line 683 of file lsm9ds1_reg.h.

◆ LSM9DS1_INT_GEN_DUR_XL

#define LSM9DS1_INT_GEN_DUR_XL   0x0AU

Definition at line 230 of file lsm9ds1_reg.h.

◆ LSM9DS1_INT_GEN_SRC_G

#define LSM9DS1_INT_GEN_SRC_G   0x14U

Definition at line 356 of file lsm9ds1_reg.h.

◆ LSM9DS1_INT_GEN_SRC_XL

#define LSM9DS1_INT_GEN_SRC_XL   0x26U

Definition at line 552 of file lsm9ds1_reg.h.

◆ LSM9DS1_INT_GEN_THS_X_XL

#define LSM9DS1_INT_GEN_THS_X_XL   0x07U

Definition at line 227 of file lsm9ds1_reg.h.

◆ LSM9DS1_INT_GEN_THS_XH_G

#define LSM9DS1_INT_GEN_THS_XH_G   0x31U

Definition at line 632 of file lsm9ds1_reg.h.

◆ LSM9DS1_INT_GEN_THS_XL_G

#define LSM9DS1_INT_GEN_THS_XL_G   0x32U

Definition at line 644 of file lsm9ds1_reg.h.

◆ LSM9DS1_INT_GEN_THS_Y_XL

#define LSM9DS1_INT_GEN_THS_Y_XL   0x08U

Definition at line 228 of file lsm9ds1_reg.h.

◆ LSM9DS1_INT_GEN_THS_YH_G

#define LSM9DS1_INT_GEN_THS_YH_G   0x33U

Definition at line 649 of file lsm9ds1_reg.h.

◆ LSM9DS1_INT_GEN_THS_YL_G

#define LSM9DS1_INT_GEN_THS_YL_G   0x34U

Definition at line 661 of file lsm9ds1_reg.h.

◆ LSM9DS1_INT_GEN_THS_Z_XL

#define LSM9DS1_INT_GEN_THS_Z_XL   0x09U

Definition at line 229 of file lsm9ds1_reg.h.

◆ LSM9DS1_INT_GEN_THS_ZH_G

#define LSM9DS1_INT_GEN_THS_ZH_G   0x35U

Definition at line 666 of file lsm9ds1_reg.h.

◆ LSM9DS1_INT_GEN_THS_ZL_G

#define LSM9DS1_INT_GEN_THS_ZL_G   0x36U

Definition at line 678 of file lsm9ds1_reg.h.

◆ LSM9DS1_INT_SRC_M

#define LSM9DS1_INT_SRC_M   0x31U

Definition at line 843 of file lsm9ds1_reg.h.

◆ LSM9DS1_INT_THS_H_M

#define LSM9DS1_INT_THS_H_M   0x33U

Definition at line 873 of file lsm9ds1_reg.h.

◆ LSM9DS1_INT_THS_L_M

#define LSM9DS1_INT_THS_L_M   0x32U

Definition at line 867 of file lsm9ds1_reg.h.

◆ LSM9DS1_OFFSET_X_REG_H_M

#define LSM9DS1_OFFSET_X_REG_H_M   0x06U

Definition at line 696 of file lsm9ds1_reg.h.

◆ LSM9DS1_OFFSET_X_REG_L_M

#define LSM9DS1_OFFSET_X_REG_L_M   0x05U

Definition at line 695 of file lsm9ds1_reg.h.

◆ LSM9DS1_OFFSET_Y_REG_H_M

#define LSM9DS1_OFFSET_Y_REG_H_M   0x08U

Definition at line 698 of file lsm9ds1_reg.h.

◆ LSM9DS1_OFFSET_Y_REG_L_M

#define LSM9DS1_OFFSET_Y_REG_L_M   0x07U

Definition at line 697 of file lsm9ds1_reg.h.

◆ LSM9DS1_OFFSET_Z_REG_H_M

#define LSM9DS1_OFFSET_Z_REG_H_M   0x0AU

Definition at line 700 of file lsm9ds1_reg.h.

◆ LSM9DS1_OFFSET_Z_REG_L_M

#define LSM9DS1_OFFSET_Z_REG_L_M   0x09U

Definition at line 699 of file lsm9ds1_reg.h.

◆ LSM9DS1_ORIENT_CFG_G

#define LSM9DS1_ORIENT_CFG_G   0x13U

Definition at line 338 of file lsm9ds1_reg.h.

◆ LSM9DS1_OUT_TEMP_H

#define LSM9DS1_OUT_TEMP_H   0x16U

Definition at line 381 of file lsm9ds1_reg.h.

◆ LSM9DS1_OUT_TEMP_L

#define LSM9DS1_OUT_TEMP_L   0x15U

Definition at line 380 of file lsm9ds1_reg.h.

◆ LSM9DS1_OUT_X_H_G

#define LSM9DS1_OUT_X_H_G   0x19U

Definition at line 407 of file lsm9ds1_reg.h.

◆ LSM9DS1_OUT_X_H_M

#define LSM9DS1_OUT_X_H_M   0x29U

Definition at line 816 of file lsm9ds1_reg.h.

◆ LSM9DS1_OUT_X_H_XL

#define LSM9DS1_OUT_X_H_XL   0x29U

Definition at line 577 of file lsm9ds1_reg.h.

◆ LSM9DS1_OUT_X_L_G

#define LSM9DS1_OUT_X_L_G   0x18U

Definition at line 406 of file lsm9ds1_reg.h.

◆ LSM9DS1_OUT_X_L_M

#define LSM9DS1_OUT_X_L_M   0x28U

Definition at line 815 of file lsm9ds1_reg.h.

◆ LSM9DS1_OUT_X_L_XL

#define LSM9DS1_OUT_X_L_XL   0x28U

Definition at line 576 of file lsm9ds1_reg.h.

◆ LSM9DS1_OUT_Y_H_G

#define LSM9DS1_OUT_Y_H_G   0x1BU

Definition at line 409 of file lsm9ds1_reg.h.

◆ LSM9DS1_OUT_Y_H_M

#define LSM9DS1_OUT_Y_H_M   0x2BU

Definition at line 818 of file lsm9ds1_reg.h.

◆ LSM9DS1_OUT_Y_H_XL

#define LSM9DS1_OUT_Y_H_XL   0x2BU

Definition at line 579 of file lsm9ds1_reg.h.

◆ LSM9DS1_OUT_Y_L_G

#define LSM9DS1_OUT_Y_L_G   0x1AU

Definition at line 408 of file lsm9ds1_reg.h.

◆ LSM9DS1_OUT_Y_L_M

#define LSM9DS1_OUT_Y_L_M   0x2AU

Definition at line 817 of file lsm9ds1_reg.h.

◆ LSM9DS1_OUT_Y_L_XL

#define LSM9DS1_OUT_Y_L_XL   0x2AU

Definition at line 578 of file lsm9ds1_reg.h.

◆ LSM9DS1_OUT_Z_H_G

#define LSM9DS1_OUT_Z_H_G   0x1DU

Definition at line 411 of file lsm9ds1_reg.h.

◆ LSM9DS1_OUT_Z_H_M

#define LSM9DS1_OUT_Z_H_M   0x2DU

Definition at line 820 of file lsm9ds1_reg.h.

◆ LSM9DS1_OUT_Z_H_XL

#define LSM9DS1_OUT_Z_H_XL   0x2DU

Definition at line 581 of file lsm9ds1_reg.h.

◆ LSM9DS1_OUT_Z_L_G

#define LSM9DS1_OUT_Z_L_G   0x1CU

Definition at line 410 of file lsm9ds1_reg.h.

◆ LSM9DS1_OUT_Z_L_M

#define LSM9DS1_OUT_Z_L_M   0x2CU

Definition at line 819 of file lsm9ds1_reg.h.

◆ LSM9DS1_OUT_Z_L_XL

#define LSM9DS1_OUT_Z_L_XL   0x2CU

Definition at line 580 of file lsm9ds1_reg.h.

◆ LSM9DS1_REFERENCE_G

#define LSM9DS1_REFERENCE_G   0x0BU

Definition at line 242 of file lsm9ds1_reg.h.

◆ LSM9DS1_STATUS_REG

#define LSM9DS1_STATUS_REG   0x17U

Definition at line 382 of file lsm9ds1_reg.h.

◆ LSM9DS1_STATUS_REG_M

#define LSM9DS1_STATUS_REG_M   0x27U

Definition at line 791 of file lsm9ds1_reg.h.

◆ LSM9DS1_WHO_AM_I

#define LSM9DS1_WHO_AM_I   0x0FU

Definition at line 291 of file lsm9ds1_reg.h.

◆ LSM9DS1_WHO_AM_I_M

#define LSM9DS1_WHO_AM_I_M   0x0FU

Definition at line 702 of file lsm9ds1_reg.h.

Enumeration Type Documentation

◆ lsm9ds1_6d_mode_t

Enumerator
LSM9DS1_POS_MOVE_RECO_DISABLE 
LSM9DS1_6D_MOVE_RECO 
LSM9DS1_4D_MOVE_RECO 
LSM9DS1_6D_POS_RECO 
LSM9DS1_4D_POS_RECO 

Definition at line 1579 of file lsm9ds1_reg.h.

◆ lsm9ds1_act_mode_t

Enumerator
LSM9DS1_GYRO_POWER_DOWN 
LSM9DS1_GYRO_SLEEP 

Definition at line 1559 of file lsm9ds1_reg.h.

◆ lsm9ds1_ble_t

Enumerator
LSM9DS1_LSB_LOW_ADDRESS 
LSM9DS1_MSB_LOW_ADDRESS 

Definition at line 1197 of file lsm9ds1_reg.h.

◆ lsm9ds1_dcrm_g_t

Enumerator
LSM9DS1_RESET_MODE 
LSM9DS1_DECREMENT_MODE 

Definition at line 1506 of file lsm9ds1_reg.h.

◆ lsm9ds1_dec_t

Enumerator
LSM9DS1_NO_DECIMATION 
LSM9DS1_EVERY_2_SAMPLES 
LSM9DS1_EVERY_4_SAMPLES 
LSM9DS1_EVERY_8_SAMPLES 

Definition at line 1068 of file lsm9ds1_reg.h.

◆ lsm9ds1_fifo_md_t

Enumerator
LSM9DS1_FIFO_OFF 
LSM9DS1_BYPASS_MODE 
LSM9DS1_FIFO_MODE 
LSM9DS1_STREAM_TO_FIFO_MODE 
LSM9DS1_BYPASS_TO_STREAM_MODE 
LSM9DS1_STREAM_MODE 

Definition at line 1609 of file lsm9ds1_reg.h.

◆ lsm9ds1_gy_fs_t

Enumerator
LSM9DS1_245dps 
LSM9DS1_500dps 
LSM9DS1_2000dps 

Definition at line 983 of file lsm9ds1_reg.h.

◆ lsm9ds1_gy_hp_bw_t

Enumerator
LSM9DS1_HP_EXTREME 
LSM9DS1_HP_ULTRA_STRONG 
LSM9DS1_HP_STRONG 
LSM9DS1_HP_ULTRA_HIGH 
LSM9DS1_HP_HIGH 
LSM9DS1_HP_MEDIUM 
LSM9DS1_HP_LOW 
LSM9DS1_HP_ULTRA_LOW 
LSM9DS1_HP_LIGHT 
LSM9DS1_HP_ULTRA_LIGHT 

Definition at line 1257 of file lsm9ds1_reg.h.

◆ lsm9ds1_gy_int_path_t

Enumerator
LSM9DS1_LPF1_INT 
LSM9DS1_LPF1_HPF_INT 
LSM9DS1_LPF1_LPF2_INT 
LSM9DS1_LPF1_HPF_LPF2_INT 

Definition at line 1245 of file lsm9ds1_reg.h.

◆ lsm9ds1_gy_lp_bw_t

Enumerator
LSM9DS1_LP_STRONG 
LSM9DS1_LP_MEDIUM 
LSM9DS1_LP_LIGHT 
LSM9DS1_LP_ULTRA_LIGHT 

Definition at line 1221 of file lsm9ds1_reg.h.

◆ lsm9ds1_gy_out_path_t

Enumerator
LSM9DS1_LPF1_OUT 
LSM9DS1_LPF1_HPF_OUT 
LSM9DS1_LPF1_LPF2_OUT 
LSM9DS1_LPF1_HPF_LPF2_OUT 

Definition at line 1233 of file lsm9ds1_reg.h.

◆ lsm9ds1_i2c_dis_t

Enumerator
LSM9DS1_I2C_ENABLE 
LSM9DS1_I2C_DISABLE 

Definition at line 1352 of file lsm9ds1_reg.h.

◆ lsm9ds1_imu_odr_t

Enumerator
LSM9DS1_IMU_OFF 
LSM9DS1_GY_OFF_XL_10Hz 
LSM9DS1_GY_OFF_XL_50Hz 
LSM9DS1_GY_OFF_XL_119Hz 
LSM9DS1_GY_OFF_XL_238Hz 
LSM9DS1_GY_OFF_XL_476Hz 
LSM9DS1_GY_OFF_XL_952Hz 
LSM9DS1_XL_OFF_GY_14Hz9 
LSM9DS1_XL_OFF_GY_59Hz5 
LSM9DS1_XL_OFF_GY_119Hz 
LSM9DS1_XL_OFF_GY_238Hz 
LSM9DS1_XL_OFF_GY_476Hz 
LSM9DS1_XL_OFF_GY_952Hz 
LSM9DS1_IMU_14Hz9 
LSM9DS1_IMU_59Hz5 
LSM9DS1_IMU_119Hz 
LSM9DS1_IMU_238Hz 
LSM9DS1_IMU_476Hz 
LSM9DS1_IMU_952Hz 
LSM9DS1_XL_OFF_GY_14Hz9_LP 
LSM9DS1_XL_OFF_GY_59Hz5_LP 
LSM9DS1_XL_OFF_GY_119Hz_LP 
LSM9DS1_IMU_14Hz9_LP 
LSM9DS1_IMU_59Hz5_LP 
LSM9DS1_IMU_119Hz_LP 

Definition at line 994 of file lsm9ds1_reg.h.

◆ lsm9ds1_inact_t

Enumerator
LSM9DS1_ACTIVITY 
LSM9DS1_INACTIVITY 

Definition at line 1572 of file lsm9ds1_reg.h.

◆ lsm9ds1_lir_t

Enumerator
LSM9DS1_INT_PULSED 
LSM9DS1_INT_LATCHED 

Definition at line 1404 of file lsm9ds1_reg.h.

◆ lsm9ds1_mag_data_rate_t

Enumerator
LSM9DS1_MAG_POWER_DOWN 
LSM9DS1_MAG_LP_0Hz625 
LSM9DS1_MAG_LP_1Hz25 
LSM9DS1_MAG_LP_2Hz5 
LSM9DS1_MAG_LP_5Hz 
LSM9DS1_MAG_LP_10Hz 
LSM9DS1_MAG_LP_20Hz 
LSM9DS1_MAG_LP_40Hz 
LSM9DS1_MAG_LP_80Hz 
LSM9DS1_MAG_MP_0Hz625 
LSM9DS1_MAG_MP_1Hz25 
LSM9DS1_MAG_MP_2Hz5 
LSM9DS1_MAG_MP_5Hz 
LSM9DS1_MAG_MP_10Hz 
LSM9DS1_MAG_MP_20Hz 
LSM9DS1_MAG_MP_40Hz 
LSM9DS1_MAG_MP_80Hz 
LSM9DS1_MAG_HP_0Hz625 
LSM9DS1_MAG_HP_1Hz25 
LSM9DS1_MAG_HP_2Hz5 
LSM9DS1_MAG_HP_5Hz 
LSM9DS1_MAG_HP_10Hz 
LSM9DS1_MAG_HP_20Hz 
LSM9DS1_MAG_HP_40Hz 
LSM9DS1_MAG_HP_80Hz 
LSM9DS1_MAG_UHP_0Hz625 
LSM9DS1_MAG_UHP_1Hz25 
LSM9DS1_MAG_UHP_2Hz5 
LSM9DS1_MAG_UHP_5Hz 
LSM9DS1_MAG_UHP_10Hz 
LSM9DS1_MAG_UHP_20Hz 
LSM9DS1_MAG_UHP_40Hz 
LSM9DS1_MAG_UHP_80Hz 
LSM9DS1_MAG_UHP_155Hz 
LSM9DS1_MAG_HP_300Hz 
LSM9DS1_MAG_MP_560Hz 
LSM9DS1_MAG_LP_1000Hz 
LSM9DS1_MAG_ONE_SHOT 

Definition at line 1100 of file lsm9ds1_reg.h.

◆ lsm9ds1_mag_fs_t

Enumerator
LSM9DS1_4Ga 
LSM9DS1_8Ga 
LSM9DS1_12Ga 
LSM9DS1_16Ga 

Definition at line 1146 of file lsm9ds1_reg.h.

◆ lsm9ds1_pin_logic_t

Enumerator
LSM9DS1_LOGIC_OR 
LSM9DS1_LOGIC_AND 

Definition at line 1364 of file lsm9ds1_reg.h.

◆ lsm9ds1_polarity_t

Enumerator
LSM9DS1_ACTIVE_LOW 
LSM9DS1_ACTIVE_HIGH 

Definition at line 1432 of file lsm9ds1_reg.h.

◆ lsm9ds1_pp_od_t

Enumerator
LSM9DS1_PUSH_PULL 
LSM9DS1_OPEN_DRAIN 

Definition at line 1416 of file lsm9ds1_reg.h.

◆ lsm9ds1_sim_t

Enumerator
LSM9DS1_SPI_4_WIRE 
LSM9DS1_SPI_3_WIRE 

Definition at line 1340 of file lsm9ds1_reg.h.

◆ lsm9ds1_xl_aa_bw_t

Enumerator
LSM9DS1_AUTO 
LSM9DS1_408Hz 
LSM9DS1_211Hz 
LSM9DS1_105Hz 
LSM9DS1_50Hz 

Definition at line 1275 of file lsm9ds1_reg.h.

◆ lsm9ds1_xl_fs_t

Enumerator
LSM9DS1_2g 
LSM9DS1_16g 
LSM9DS1_4g 
LSM9DS1_8g 

Definition at line 1080 of file lsm9ds1_reg.h.

◆ lsm9ds1_xl_hp_bw_t

Enumerator
LSM9DS1_HP_ODR_DIV_50 
LSM9DS1_HP_ODR_DIV_100 
LSM9DS1_HP_ODR_DIV_9 
LSM9DS1_HP_ODR_DIV_400 

Definition at line 1320 of file lsm9ds1_reg.h.

◆ lsm9ds1_xl_hp_path_t

Enumerator
LSM9DS1_HP_DIS 
LSM9DS1_HP_EN 

Definition at line 1287 of file lsm9ds1_reg.h.

◆ lsm9ds1_xl_lp_bw_t

Enumerator
LSM9DS1_LP_DISABLE 
LSM9DS1_LP_ODR_DIV_50 
LSM9DS1_LP_ODR_DIV_100 
LSM9DS1_LP_ODR_DIV_9 
LSM9DS1_LP_ODR_DIV_400 

Definition at line 1307 of file lsm9ds1_reg.h.

◆ lsm9ds1_xl_out_path_t

Enumerator
LSM9DS1_LP_OUT 
LSM9DS1_HP_OUT 

Definition at line 1297 of file lsm9ds1_reg.h.

Function Documentation

◆ lsm9ds1_6d_mode_get()

int32_t lsm9ds1_6d_mode_get ( const stmdev_ctx_t ctx,
lsm9ds1_6d_mode_t val 
)

6D feature working mode.

[get]

Parameters
ctxRead / write interface definitions.(ptr)
valGet the values of 6d in reg INT_GEN_CFG_XL.(ptr)
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 4188 of file lsm9ds1_reg.c.

References lsm9ds1_ctrl_reg4_t::_4d_xl1, lsm9ds1_int_gen_cfg_xl_t::aoi_xl, LSM9DS1_4D_MOVE_RECO, LSM9DS1_4D_POS_RECO, LSM9DS1_6D_MOVE_RECO, LSM9DS1_6D_POS_RECO, LSM9DS1_CTRL_REG4, LSM9DS1_INT_GEN_CFG_XL, LSM9DS1_POS_MOVE_RECO_DISABLE, and lsm9ds1_read_reg().

◆ lsm9ds1_6d_mode_set()

int32_t lsm9ds1_6d_mode_set ( const stmdev_ctx_t ctx,
lsm9ds1_6d_mode_t  val 
)

6D feature working mode.

[set]

Parameters
ctxRead / write interface definitions.(ptr)
valChange the values of "6d" in reg LSM9DS1.
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 4147 of file lsm9ds1_reg.c.

References lsm9ds1_ctrl_reg4_t::_4d_xl1, lsm9ds1_int_gen_cfg_xl_t::_6d, lsm9ds1_int_gen_cfg_xl_t::aoi_xl, LSM9DS1_CTRL_REG4, LSM9DS1_INT_GEN_CFG_XL, lsm9ds1_read_reg(), and lsm9ds1_write_reg().

◆ lsm9ds1_6d_src_get()

◆ lsm9ds1_6d_threshold_get()

int32_t lsm9ds1_6d_threshold_get ( const stmdev_ctx_t ctx,
uint8_t *  buff 
)

6D functionality axis interrupt threshold.

[get]

Parameters
ctxRead / write interface definitions.(ptr)
buffBuffer that stores data read.(ptr)
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 4259 of file lsm9ds1_reg.c.

References LSM9DS1_INT_GEN_THS_X_XL, and lsm9ds1_read_reg().

◆ lsm9ds1_6d_threshold_set()

int32_t lsm9ds1_6d_threshold_set ( const stmdev_ctx_t ctx,
uint8_t *  buff 
)

6D functionality axis interrupt threshold.

[set]

Parameters
ctxRead / write interface definitions.(ptr)
buffBuffer that stores data to be write.(ptr)
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 4242 of file lsm9ds1_reg.c.

References LSM9DS1_INT_GEN_THS_X_XL, and lsm9ds1_write_reg().

◆ lsm9ds1_acceleration_raw_get()

int32_t lsm9ds1_acceleration_raw_get ( const stmdev_ctx_t ctx,
int16_t *  val 
)

Linear acceleration output register.

The value is expressed as a 16-bit word in two’s complement.[get]

Parameters
ctxRead / write interface definitions.(ptr)
buffBuffer that stores the data read.(ptr)
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 1322 of file lsm9ds1_reg.c.

References LSM9DS1_OUT_X_L_XL, and lsm9ds1_read_reg().

◆ lsm9ds1_act_duration_get()

int32_t lsm9ds1_act_duration_get ( const stmdev_ctx_t ctx,
uint8_t *  buff 
)

Inactivity duration in number of sample.

[get]

Parameters
ctxRead / write interface definitions.(ptr)
buffBuffer that stores data read.(ptr)
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 4083 of file lsm9ds1_reg.c.

References LSM9DS1_ACT_DUR, and lsm9ds1_read_reg().

◆ lsm9ds1_act_duration_set()

int32_t lsm9ds1_act_duration_set ( const stmdev_ctx_t ctx,
uint8_t *  buff 
)

Inactivity duration in number of sample.

[set]

Parameters
ctxRead / write interface definitions.(ptr)
buffBuffer that stores data to be write.(ptr)
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 4066 of file lsm9ds1_reg.c.

References LSM9DS1_ACT_DUR, and lsm9ds1_write_reg().

◆ lsm9ds1_act_mode_get()

int32_t lsm9ds1_act_mode_get ( const stmdev_ctx_t ctx,
lsm9ds1_act_mode_t val 
)

Gyroscope operating mode during inactivity.

[get]

Parameters
ctxRead / write interface definitions.(ptr)
valGet the values of sleep_on_inact_en in reg ACT_THS.(ptr)
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 4026 of file lsm9ds1_reg.c.

References LSM9DS1_ACT_THS, LSM9DS1_CTRL_REG9, LSM9DS1_GYRO_POWER_DOWN, LSM9DS1_GYRO_SLEEP, lsm9ds1_read_reg(), lsm9ds1_ctrl_reg9_t::sleep_g, and lsm9ds1_act_ths_t::sleep_on_inact_en.

◆ lsm9ds1_act_mode_set()

int32_t lsm9ds1_act_mode_set ( const stmdev_ctx_t ctx,
lsm9ds1_act_mode_t  val 
)

Gyroscope operating mode during inactivity.

[set]

Parameters
ctxRead / write interface definitions.(ptr)
valChange the values of "sleep_on_inact_en" in reg LSM9DS1.
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 3989 of file lsm9ds1_reg.c.

References LSM9DS1_ACT_THS, LSM9DS1_CTRL_REG9, lsm9ds1_read_reg(), lsm9ds1_write_reg(), lsm9ds1_ctrl_reg9_t::sleep_g, and lsm9ds1_act_ths_t::sleep_on_inact_en.

◆ lsm9ds1_act_src_get()

int32_t lsm9ds1_act_src_get ( const stmdev_ctx_t ctx,
lsm9ds1_inact_t val 
)

Inactivity interrupt output signal.

[get]

Parameters
ctxRead / write interface definitions.(ptr)
valReturn an option of "lsm9ds1_inact_t".(ptr)
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 4100 of file lsm9ds1_reg.c.

References lsm9ds1_status_reg_t::inact, LSM9DS1_ACTIVITY, LSM9DS1_INACTIVITY, lsm9ds1_read_reg(), and LSM9DS1_STATUS_REG.

◆ lsm9ds1_act_threshold_get()

int32_t lsm9ds1_act_threshold_get ( const stmdev_ctx_t ctx,
uint8_t *  val 
)

Inactivity threshold.

[get]

Parameters
ctxRead / write interface definitions.(ptr)
valGet the values of act_ths in reg ACT_THS.(ptr)
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 3970 of file lsm9ds1_reg.c.

References lsm9ds1_act_ths_t::act_ths, LSM9DS1_ACT_THS, and lsm9ds1_read_reg().

◆ lsm9ds1_act_threshold_set()

int32_t lsm9ds1_act_threshold_set ( const stmdev_ctx_t ctx,
uint8_t  val 
)

Inactivity threshold.

[set]

Parameters
ctxRead / write interface definitions.(ptr)
valChange the values of act_ths in reg ACT_THS.
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 3946 of file lsm9ds1_reg.c.

References lsm9ds1_act_ths_t::act_ths, LSM9DS1_ACT_THS, lsm9ds1_read_reg(), and lsm9ds1_write_reg().

◆ lsm9ds1_angular_rate_raw_get()

int32_t lsm9ds1_angular_rate_raw_get ( const stmdev_ctx_t ctx,
int16_t *  val 
)

Angular rate sensor.

The value is expressed as a 16-bit word in two’s complement.[get]

Parameters
ctxRead / write interface definitions.(ptr)
buffBuffer that stores the data read.(ptr)
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 1297 of file lsm9ds1_reg.c.

References LSM9DS1_OUT_X_L_G, and lsm9ds1_read_reg().

◆ lsm9ds1_auto_increment_get()

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.

[get]

Parameters
ctxRead / write interface definitions.(ptr)
valGet the values of if_add_inc in reg CTRL_REG8.(ptr)
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 2516 of file lsm9ds1_reg.c.

References lsm9ds1_ctrl_reg8_t::if_add_inc, LSM9DS1_CTRL_REG8, and lsm9ds1_read_reg().

◆ lsm9ds1_auto_increment_set()

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.

[set]

Parameters
ctxRead / write interface definitions.(ptr)
valChange the values of "if_add_inc" in reg LSM9DS1.
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 2491 of file lsm9ds1_reg.c.

References lsm9ds1_ctrl_reg8_t::if_add_inc, LSM9DS1_CTRL_REG8, lsm9ds1_read_reg(), and lsm9ds1_write_reg().

◆ lsm9ds1_block_data_update_get()

int32_t lsm9ds1_block_data_update_get ( const stmdev_ctx_t ctx_mag,
stmdev_ctx_t ctx_imu,
uint8_t *  val 
)

Blockdataupdate.

[get]

Parameters
ctx_magRead / write magnetometer interface definitions.(ptr)
ctx_imuRead / write imu interface definitions.(ptr)
valGet the values of bdu in reg CTRL_REG8.(ptr)
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 847 of file lsm9ds1_reg.c.

References lsm9ds1_ctrl_reg8_t::bdu, LSM9DS1_CTRL_REG5_M, LSM9DS1_CTRL_REG8, and lsm9ds1_read_reg().

◆ lsm9ds1_block_data_update_set()

int32_t lsm9ds1_block_data_update_set ( const stmdev_ctx_t ctx_mag,
stmdev_ctx_t ctx_imu,
uint8_t  val 
)

Blockdataupdate.

[set]

Parameters
ctx_magRead / write magnetometer interface definitions.(ptr)
ctx_imuRead / write imu interface definitions.(ptr)
valChange the values of bdu in reg CTRL_REG8.
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 804 of file lsm9ds1_reg.c.

References lsm9ds1_ctrl_reg8_t::bdu, lsm9ds1_ctrl_reg5_m_t::bdu, lsm9ds1_ctrl_reg5_m_t::fast_read, LSM9DS1_CTRL_REG5_M, LSM9DS1_CTRL_REG8, lsm9ds1_read_reg(), and lsm9ds1_write_reg().

◆ lsm9ds1_dev_boot_get()

int32_t lsm9ds1_dev_boot_get ( const stmdev_ctx_t ctx_mag,
stmdev_ctx_t ctx_imu,
uint8_t *  val 
)

Reboot memory content.

Reload the calibration parameters.[get]

Parameters
ctx_magRead / write magnetometer interface definitions.(ptr)
ctx_imuRead / write imu interface definitions.(ptr)
valGet the values of boot in reg CTRL_REG8.(ptr)
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 1660 of file lsm9ds1_reg.c.

References lsm9ds1_ctrl_reg8_t::boot, LSM9DS1_CTRL_REG2_M, LSM9DS1_CTRL_REG8, and lsm9ds1_read_reg().

◆ lsm9ds1_dev_boot_set()

int32_t lsm9ds1_dev_boot_set ( const stmdev_ctx_t ctx_mag,
stmdev_ctx_t ctx_imu,
uint8_t  val 
)

Reboot memory content.

Reload the calibration parameters.[set]

Parameters
ctx_magRead / write magnetometer interface definitions.(ptr)
ctx_imuRead / write imu interface definitions.(ptr)
valChange the values of boot in reg CTRL_REG8.
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 1617 of file lsm9ds1_reg.c.

References lsm9ds1_ctrl_reg8_t::boot, LSM9DS1_CTRL_REG2_M, LSM9DS1_CTRL_REG8, lsm9ds1_read_reg(), lsm9ds1_write_reg(), and lsm9ds1_ctrl_reg2_m_t::reboot.

◆ lsm9ds1_dev_data_format_get()

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.

[get]

Parameters
ctx_magRead / write magnetometer interface definitions.(ptr)
ctx_imuRead / write imu interface definitions.(ptr)
valGet the values of ble in reg CTRL_REG8.(ptr)
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 1573 of file lsm9ds1_reg.c.

References lsm9ds1_ctrl_reg8_t::ble, lsm9ds1_ctrl_reg4_m_t::ble, LSM9DS1_CTRL_REG4_M, LSM9DS1_CTRL_REG8, LSM9DS1_LSB_LOW_ADDRESS, LSM9DS1_MSB_LOW_ADDRESS, and lsm9ds1_read_reg().

◆ lsm9ds1_dev_data_format_set()

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.

[set]

Parameters
ctx_magRead / write magnetometer interface definitions.(ptr)
ctx_imuRead / write imu interface definitions.(ptr)
valChange the values of "ble" in reg LSM9DS1.
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 1530 of file lsm9ds1_reg.c.

References lsm9ds1_ctrl_reg8_t::ble, lsm9ds1_ctrl_reg4_m_t::ble, LSM9DS1_CTRL_REG4_M, LSM9DS1_CTRL_REG8, lsm9ds1_read_reg(), and lsm9ds1_write_reg().

◆ lsm9ds1_dev_id_get()

int32_t lsm9ds1_dev_id_get ( const stmdev_ctx_t ctx_mag,
stmdev_ctx_t ctx_imu,
lsm9ds1_id_t buff 
)

DeviceWhoamI.

[get]

Parameters
ctx_magRead / write magnetometer interface definitions.(ptr)
ctx_imuRead / write imu interface definitions.(ptr)
buffBuffer that stores the data read.(ptr)
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 1403 of file lsm9ds1_reg.c.

References lsm9ds1_id_t::imu, lsm9ds1_read_reg(), LSM9DS1_WHO_AM_I, LSM9DS1_WHO_AM_I_M, and lsm9ds1_id_t::mag.

◆ lsm9ds1_dev_reset_get()

int32_t lsm9ds1_dev_reset_get ( const stmdev_ctx_t ctx_mag,
stmdev_ctx_t ctx_imu,
uint8_t *  val 
)

Software reset.

Restore the default values in user registers.[get]

Parameters
ctx_magRead / write magnetometer interface definitions.(ptr)
ctx_imuRead / write imu interface definitions.(ptr)
valGet the values of sw_reset in reg CTRL_REG8.(ptr)
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 1500 of file lsm9ds1_reg.c.

References LSM9DS1_CTRL_REG2_M, LSM9DS1_CTRL_REG8, lsm9ds1_read_reg(), and lsm9ds1_ctrl_reg8_t::sw_reset.

◆ lsm9ds1_dev_reset_set()

int32_t lsm9ds1_dev_reset_set ( const stmdev_ctx_t ctx_mag,
stmdev_ctx_t ctx_imu,
uint8_t  val 
)

Software reset.

Restore the default values in user registers.[set]

Parameters
ctx_magRead / write magnetometer interface definitions.(ptr)
ctx_imuRead / write imu interface definitions.(ptr)
valChange the values of sw_reset in reg CTRL_REG8.
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 1457 of file lsm9ds1_reg.c.

References LSM9DS1_CTRL_REG2_M, LSM9DS1_CTRL_REG8, lsm9ds1_read_reg(), lsm9ds1_write_reg(), lsm9ds1_ctrl_reg2_m_t::soft_rst, and lsm9ds1_ctrl_reg8_t::sw_reset.

◆ lsm9ds1_dev_status_get()

int32_t lsm9ds1_dev_status_get ( const stmdev_ctx_t ctx_mag,
stmdev_ctx_t ctx_imu,
lsm9ds1_status_t val 
)

Device status register.

[get]

Parameters
ctx_magRead / write magnetometer interface definitions.(ptr)
ctx_imuRead / write imu interface definitions.(ptr)
valDevice status registers.(ptr)
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 1430 of file lsm9ds1_reg.c.

References lsm9ds1_read_reg(), LSM9DS1_STATUS_REG, LSM9DS1_STATUS_REG_M, lsm9ds1_status_t::status_imu, and lsm9ds1_status_t::status_mag.

◆ lsm9ds1_fifo_data_level_get()

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.

[get]

Parameters
ctxRead / write interface definitions.(ptr)
valIet the values of "fss" in reg FIFO_SRC.(ptr)
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 4558 of file lsm9ds1_reg.c.

References lsm9ds1_fifo_src_t::fss, LSM9DS1_FIFO_SRC, and lsm9ds1_read_reg().

◆ lsm9ds1_fifo_full_flag_get()

int32_t lsm9ds1_fifo_full_flag_get ( const stmdev_ctx_t ctx,
uint8_t *  val 
)

FIFOfullstatus.

[get]

Parameters
ctxRead / write interface definitions.(ptr)
valIet the values of "fss" in reg FIFO_SRC.(ptr)
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 4539 of file lsm9ds1_reg.c.

References lsm9ds1_fifo_src_t::fss, LSM9DS1_FIFO_SRC, and lsm9ds1_read_reg().

◆ lsm9ds1_fifo_mode_get()

int32_t lsm9ds1_fifo_mode_get ( const stmdev_ctx_t ctx,
lsm9ds1_fifo_md_t val 
)

FIFO mode selection.

[get]

Parameters
ctxRead / write interface definitions.(ptr)
valGet the values of fifo_en in reg CTRL_REG9.(ptr)
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 4397 of file lsm9ds1_reg.c.

References lsm9ds1_ctrl_reg9_t::fifo_en, LSM9DS1_BYPASS_MODE, LSM9DS1_BYPASS_TO_STREAM_MODE, LSM9DS1_CTRL_REG9, LSM9DS1_FIFO_CTRL, LSM9DS1_FIFO_MODE, LSM9DS1_FIFO_OFF, lsm9ds1_read_reg(), LSM9DS1_STREAM_MODE, and LSM9DS1_STREAM_TO_FIFO_MODE.

◆ lsm9ds1_fifo_mode_set()

int32_t lsm9ds1_fifo_mode_set ( const stmdev_ctx_t ctx,
lsm9ds1_fifo_md_t  val 
)

FIFO mode selection.

[set]

Parameters
ctxRead / write interface definitions.(ptr)
valChange the values of "fifo_en" in reg LSM9DS1.
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 4360 of file lsm9ds1_reg.c.

References lsm9ds1_ctrl_reg9_t::fifo_en, lsm9ds1_fifo_ctrl_t::fmode, LSM9DS1_CTRL_REG9, LSM9DS1_FIFO_CTRL, lsm9ds1_read_reg(), and lsm9ds1_write_reg().

◆ lsm9ds1_fifo_ovr_flag_get()

int32_t lsm9ds1_fifo_ovr_flag_get ( const stmdev_ctx_t ctx,
uint8_t *  val 
)

FIFO overrun status.

[get]

Parameters
ctxRead / write interface definitions.(ptr)
valIet the values of "ovrn" in reg FIFO_SRC.(ptr)
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 4577 of file lsm9ds1_reg.c.

References LSM9DS1_FIFO_SRC, lsm9ds1_read_reg(), and lsm9ds1_fifo_src_t::ovrn.

◆ lsm9ds1_fifo_stop_on_wtm_get()

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.

[get]

Parameters
ctxRead / write interface definitions.(ptr)
valGet the values of stop_on_fth in reg CTRL_REG9.(ptr)
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 4341 of file lsm9ds1_reg.c.

References LSM9DS1_CTRL_REG9, lsm9ds1_read_reg(), and lsm9ds1_ctrl_reg9_t::stop_on_fth.

◆ lsm9ds1_fifo_stop_on_wtm_set()

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.

[set]

Parameters
ctxRead / write interface definitions.(ptr)
valChange the values of stop_on_fth in reg CTRL_REG9.
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 4316 of file lsm9ds1_reg.c.

References LSM9DS1_CTRL_REG9, lsm9ds1_read_reg(), lsm9ds1_write_reg(), and lsm9ds1_ctrl_reg9_t::stop_on_fth.

◆ lsm9ds1_fifo_temp_batch_get()

int32_t lsm9ds1_fifo_temp_batch_get ( const stmdev_ctx_t ctx,
uint8_t *  val 
)

Batching of temperature data.

[get]

Parameters
ctxRead / write interface definitions.(ptr)
valGet the values of fifo_temp_en in reg CTRL_REG9.(ptr)
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 4477 of file lsm9ds1_reg.c.

References lsm9ds1_ctrl_reg9_t::fifo_temp_en, LSM9DS1_CTRL_REG9, and lsm9ds1_read_reg().

◆ lsm9ds1_fifo_temp_batch_set()

int32_t lsm9ds1_fifo_temp_batch_set ( const stmdev_ctx_t ctx,
uint8_t  val 
)

Batching of temperature data.

[set]

Parameters
ctxRead / write interface definitions.(ptr)
valChange the values of fifo_temp_en in reg CTRL_REG9.
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 4453 of file lsm9ds1_reg.c.

References lsm9ds1_ctrl_reg9_t::fifo_temp_en, LSM9DS1_CTRL_REG9, lsm9ds1_read_reg(), and lsm9ds1_write_reg().

◆ lsm9ds1_fifo_watermark_get()

int32_t lsm9ds1_fifo_watermark_get ( const stmdev_ctx_t ctx,
uint8_t *  val 
)

FIFO watermark level selection.

[get]

Parameters
ctxRead / write interface definitions.(ptr)
valGet the values of fth in reg FIFO_CTRL.(ptr)
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 4520 of file lsm9ds1_reg.c.

References lsm9ds1_fifo_ctrl_t::fth, LSM9DS1_FIFO_CTRL, and lsm9ds1_read_reg().

◆ lsm9ds1_fifo_watermark_set()

int32_t lsm9ds1_fifo_watermark_set ( const stmdev_ctx_t ctx,
uint8_t  val 
)

FIFO watermark level selection.

[set]

Parameters
ctxRead / write interface definitions.(ptr)
valChange the values of fth in reg FIFO_CTRL.
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 4496 of file lsm9ds1_reg.c.

References lsm9ds1_fifo_ctrl_t::fth, LSM9DS1_FIFO_CTRL, lsm9ds1_read_reg(), and lsm9ds1_write_reg().

◆ lsm9ds1_fifo_wtm_flag_get()

int32_t lsm9ds1_fifo_wtm_flag_get ( const stmdev_ctx_t ctx,
uint8_t *  val 
)

FIFO watermark status.

[get]

Parameters
ctxRead / write interface definitions.(ptr)
valIet the values of "fth" in reg FIFO_SRC.(ptr)
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 4596 of file lsm9ds1_reg.c.

References lsm9ds1_fifo_src_t::fth, LSM9DS1_FIFO_SRC, and lsm9ds1_read_reg().

◆ lsm9ds1_filter_settling_mask_get()

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.

[get]

Parameters
ctxRead / write interface definitions.(ptr)
valGet the values of drdy_mask_bit in reg CTRL_REG9.(ptr)
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 2457 of file lsm9ds1_reg.c.

References lsm9ds1_ctrl_reg9_t::drdy_mask_bit, LSM9DS1_CTRL_REG9, and lsm9ds1_read_reg().

◆ lsm9ds1_filter_settling_mask_set()

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.

[set]

Parameters
ctxRead / write interface definitions.(ptr)
valChange the values of drdy_mask_bit in reg CTRL_REG9.
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 2432 of file lsm9ds1_reg.c.

References lsm9ds1_ctrl_reg9_t::drdy_mask_bit, LSM9DS1_CTRL_REG9, lsm9ds1_read_reg(), and lsm9ds1_write_reg().

◆ lsm9ds1_from_fs12gauss_to_mG()

float_t lsm9ds1_from_fs12gauss_to_mG ( int16_t  lsb)

Definition at line 148 of file lsm9ds1_reg.c.

◆ lsm9ds1_from_fs16g_to_mg()

float_t lsm9ds1_from_fs16g_to_mg ( int16_t  lsb)

Definition at line 118 of file lsm9ds1_reg.c.

◆ lsm9ds1_from_fs16gauss_to_mG()

float_t lsm9ds1_from_fs16gauss_to_mG ( int16_t  lsb)

Definition at line 153 of file lsm9ds1_reg.c.

◆ lsm9ds1_from_fs2000dps_to_mdps()

float_t lsm9ds1_from_fs2000dps_to_mdps ( int16_t  lsb)

Definition at line 133 of file lsm9ds1_reg.c.

◆ lsm9ds1_from_fs245dps_to_mdps()

float_t lsm9ds1_from_fs245dps_to_mdps ( int16_t  lsb)

Definition at line 123 of file lsm9ds1_reg.c.

◆ lsm9ds1_from_fs2g_to_mg()

float_t lsm9ds1_from_fs2g_to_mg ( int16_t  lsb)

Definition at line 103 of file lsm9ds1_reg.c.

◆ lsm9ds1_from_fs4g_to_mg()

float_t lsm9ds1_from_fs4g_to_mg ( int16_t  lsb)

Definition at line 108 of file lsm9ds1_reg.c.

◆ lsm9ds1_from_fs4gauss_to_mG()

float_t lsm9ds1_from_fs4gauss_to_mG ( int16_t  lsb)

Definition at line 138 of file lsm9ds1_reg.c.

◆ lsm9ds1_from_fs500dps_to_mdps()

float_t lsm9ds1_from_fs500dps_to_mdps ( int16_t  lsb)

Definition at line 128 of file lsm9ds1_reg.c.

◆ lsm9ds1_from_fs8g_to_mg()

float_t lsm9ds1_from_fs8g_to_mg ( int16_t  lsb)

Definition at line 113 of file lsm9ds1_reg.c.

◆ lsm9ds1_from_fs8gauss_to_mG()

float_t lsm9ds1_from_fs8gauss_to_mG ( int16_t  lsb)

Definition at line 143 of file lsm9ds1_reg.c.

◆ lsm9ds1_from_lsb_to_celsius()

float_t lsm9ds1_from_lsb_to_celsius ( int16_t  lsb)

Definition at line 158 of file lsm9ds1_reg.c.

◆ lsm9ds1_gy_axis_get()

int32_t lsm9ds1_gy_axis_get ( const stmdev_ctx_t ctx,
lsm9ds1_gy_axis_t val 
)

Enable gyroscope axis.

[get]

Parameters
ctxRead / write interface definitions.(ptr)
valGyroscope’s pitch axis (X) output enable.(ptr)
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 592 of file lsm9ds1_reg.c.

References LSM9DS1_CTRL_REG4, lsm9ds1_read_reg(), lsm9ds1_ctrl_reg4_t::xen_g, lsm9ds1_gy_axis_t::xen_g, lsm9ds1_ctrl_reg4_t::yen_g, lsm9ds1_gy_axis_t::yen_g, lsm9ds1_ctrl_reg4_t::zen_g, and lsm9ds1_gy_axis_t::zen_g.

◆ lsm9ds1_gy_axis_set()

int32_t lsm9ds1_gy_axis_set ( const stmdev_ctx_t ctx,
lsm9ds1_gy_axis_t  val 
)

Enable gyroscope axis.

[set]

Parameters
ctxRead / write interface definitions.(ptr)
valGyroscope’s pitch axis (X) output enable.
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 566 of file lsm9ds1_reg.c.

References LSM9DS1_CTRL_REG4, lsm9ds1_read_reg(), lsm9ds1_write_reg(), lsm9ds1_ctrl_reg4_t::xen_g, lsm9ds1_gy_axis_t::xen_g, lsm9ds1_ctrl_reg4_t::yen_g, lsm9ds1_gy_axis_t::yen_g, lsm9ds1_ctrl_reg4_t::zen_g, and lsm9ds1_gy_axis_t::zen_g.

◆ lsm9ds1_gy_filter_hp_bandwidth_get()

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.

[get]

Parameters
ctxRead / write interface definitions.(ptr)
valGet the values of hpcf_g in reg CTRL_REG3_G.(ptr)
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 2017 of file lsm9ds1_reg.c.

References lsm9ds1_ctrl_reg3_g_t::hpcf_g, LSM9DS1_CTRL_REG3_G, LSM9DS1_HP_EXTREME, LSM9DS1_HP_HIGH, LSM9DS1_HP_LIGHT, LSM9DS1_HP_LOW, LSM9DS1_HP_MEDIUM, LSM9DS1_HP_STRONG, LSM9DS1_HP_ULTRA_HIGH, LSM9DS1_HP_ULTRA_LIGHT, LSM9DS1_HP_ULTRA_LOW, LSM9DS1_HP_ULTRA_STRONG, and lsm9ds1_read_reg().

◆ lsm9ds1_gy_filter_hp_bandwidth_set()

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.

[set]

Parameters
ctxRead / write interface definitions.(ptr)
valChange the values of "hpcf_g" in reg LSM9DS1.
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 1990 of file lsm9ds1_reg.c.

References lsm9ds1_ctrl_reg3_g_t::hpcf_g, LSM9DS1_CTRL_REG3_G, lsm9ds1_read_reg(), and lsm9ds1_write_reg().

◆ lsm9ds1_gy_filter_int_path_get()

int32_t lsm9ds1_gy_filter_int_path_get ( const stmdev_ctx_t ctx,
lsm9ds1_gy_int_path_t val 
)

Gyro interrupt filter path configuration.

[get]

Parameters
ctxRead / write interface definitions.(ptr)
valGet the values of int_sel in reg CTRL_REG2_G.(ptr)
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 1940 of file lsm9ds1_reg.c.

References lsm9ds1_ctrl_reg3_g_t::hp_en, lsm9ds1_ctrl_reg2_g_t::int_sel, LSM9DS1_CTRL_REG2_G, LSM9DS1_CTRL_REG3_G, LSM9DS1_LPF1_HPF_INT, LSM9DS1_LPF1_HPF_LPF2_INT, LSM9DS1_LPF1_INT, LSM9DS1_LPF1_LPF2_INT, and lsm9ds1_read_reg().

◆ lsm9ds1_gy_filter_int_path_set()

int32_t lsm9ds1_gy_filter_int_path_set ( const stmdev_ctx_t ctx,
lsm9ds1_gy_int_path_t  val 
)

Gyro interrupt filter path configuration.

[set]

Parameters
ctxRead / write interface definitions.(ptr)
valChange the values of "int_sel" in reg LSM9DS1.
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 1899 of file lsm9ds1_reg.c.

References lsm9ds1_ctrl_reg3_g_t::hp_en, lsm9ds1_ctrl_reg2_g_t::int_sel, LSM9DS1_CTRL_REG2_G, LSM9DS1_CTRL_REG3_G, lsm9ds1_read_reg(), and lsm9ds1_write_reg().

◆ lsm9ds1_gy_filter_lp_bandwidth_get()

int32_t lsm9ds1_gy_filter_lp_bandwidth_get ( const stmdev_ctx_t ctx,
lsm9ds1_gy_lp_bw_t val 
)

Gyroscope lowpass filter bandwidth selection.

[get]

Parameters
ctxRead / write interface definitions.(ptr)
valGet the values of bw_g in reg CTRL_REG1_G.(ptr)
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 1765 of file lsm9ds1_reg.c.

References lsm9ds1_ctrl_reg1_g_t::bw_g, LSM9DS1_CTRL_REG1_G, LSM9DS1_LP_LIGHT, LSM9DS1_LP_MEDIUM, LSM9DS1_LP_STRONG, LSM9DS1_LP_ULTRA_LIGHT, and lsm9ds1_read_reg().

◆ lsm9ds1_gy_filter_lp_bandwidth_set()

int32_t lsm9ds1_gy_filter_lp_bandwidth_set ( const stmdev_ctx_t ctx,
lsm9ds1_gy_lp_bw_t  val 
)

Gyroscope lowpass filter bandwidth selection.

[set]

Parameters
ctxRead / write interface definitions.(ptr)
valChange the values of "bw_g" in reg LSM9DS1.
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 1738 of file lsm9ds1_reg.c.

References lsm9ds1_ctrl_reg1_g_t::bw_g, LSM9DS1_CTRL_REG1_G, lsm9ds1_read_reg(), and lsm9ds1_write_reg().

◆ lsm9ds1_gy_filter_out_path_get()

int32_t lsm9ds1_gy_filter_out_path_get ( const stmdev_ctx_t ctx,
lsm9ds1_gy_out_path_t val 
)

Gyro output filter path configuration.

[get]

Parameters
ctxRead / write interface definitions.(ptr)
valGet the values of out_sel in reg CTRL_REG2_G.(ptr)
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 1849 of file lsm9ds1_reg.c.

References lsm9ds1_ctrl_reg3_g_t::hp_en, LSM9DS1_CTRL_REG2_G, LSM9DS1_CTRL_REG3_G, LSM9DS1_LPF1_HPF_LPF2_OUT, LSM9DS1_LPF1_HPF_OUT, LSM9DS1_LPF1_LPF2_OUT, LSM9DS1_LPF1_OUT, lsm9ds1_read_reg(), and lsm9ds1_ctrl_reg2_g_t::out_sel.

◆ lsm9ds1_gy_filter_out_path_set()

int32_t lsm9ds1_gy_filter_out_path_set ( const stmdev_ctx_t ctx,
lsm9ds1_gy_out_path_t  val 
)

Gyro output filter path configuration.

[set]

Parameters
ctxRead / write interface definitions.(ptr)
valChange the values of "out_sel" in reg LSM9DS1.
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 1808 of file lsm9ds1_reg.c.

References lsm9ds1_ctrl_reg3_g_t::hp_en, LSM9DS1_CTRL_REG2_G, LSM9DS1_CTRL_REG3_G, lsm9ds1_read_reg(), lsm9ds1_write_reg(), and lsm9ds1_ctrl_reg2_g_t::out_sel.

◆ lsm9ds1_gy_filter_reference_get()

int32_t lsm9ds1_gy_filter_reference_get ( const stmdev_ctx_t ctx,
uint8_t *  buff 
)

Reference value for gyroscope’s digital high-pass filter.

[get]

Parameters
ctxRead / write interface definitions.(ptr)
buffBuffer that stores data read.(ptr)
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 1720 of file lsm9ds1_reg.c.

References lsm9ds1_read_reg(), and LSM9DS1_REFERENCE_G.

◆ lsm9ds1_gy_filter_reference_set()

int32_t lsm9ds1_gy_filter_reference_set ( const stmdev_ctx_t ctx,
uint8_t *  buff 
)

Reference value for gyroscope’s digital high-pass filter.

[set]

Parameters
ctxRead / write interface definitions.(ptr)
buffBuffer that stores data to be write.(ptr)
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 1702 of file lsm9ds1_reg.c.

References LSM9DS1_REFERENCE_G, and lsm9ds1_write_reg().

◆ lsm9ds1_gy_flag_data_ready_get()

int32_t lsm9ds1_gy_flag_data_ready_get ( const stmdev_ctx_t ctx,
uint8_t *  val 
)

Gyroscope new data available.

[get]

Parameters
ctxRead / write interface definitions.(ptr)
valIet the values of "gda" in reg STATUS_REG.(ptr)
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 524 of file lsm9ds1_reg.c.

References lsm9ds1_status_reg_t::gda, lsm9ds1_read_reg(), and LSM9DS1_STATUS_REG.

◆ lsm9ds1_gy_full_scale_get()

int32_t lsm9ds1_gy_full_scale_get ( const stmdev_ctx_t ctx,
lsm9ds1_gy_fs_t val 
)

Gyroscope full-scale selection.

[get]

Parameters
ctxRead / write interface definitions.(ptr)
valGet the values of fs_g in reg CTRL_REG1_G.(ptr)
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 211 of file lsm9ds1_reg.c.

References lsm9ds1_ctrl_reg1_g_t::fs_g, LSM9DS1_2000dps, LSM9DS1_245dps, LSM9DS1_500dps, LSM9DS1_CTRL_REG1_G, and lsm9ds1_read_reg().

◆ lsm9ds1_gy_full_scale_set()

int32_t lsm9ds1_gy_full_scale_set ( const stmdev_ctx_t ctx,
lsm9ds1_gy_fs_t  val 
)

Gyroscope full-scale selection.

[set]

Parameters
ctxRead / write interface definitions.(ptr)
valChange the values of "fs_g" in reg LSM9DS1.
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 184 of file lsm9ds1_reg.c.

References lsm9ds1_ctrl_reg1_g_t::fs_g, LSM9DS1_CTRL_REG1_G, lsm9ds1_read_reg(), and lsm9ds1_write_reg().

◆ lsm9ds1_gy_orient_get()

int32_t lsm9ds1_gy_orient_get ( const stmdev_ctx_t ctx,
lsm9ds1_gy_orient_t val 
)

Configure gyro orientation.

[get]

Parameters
ctxRead / write interface definitions.(ptr)
valDirectional user orientation selection.(ptr)
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 479 of file lsm9ds1_reg.c.

References LSM9DS1_ORIENT_CFG_G, lsm9ds1_read_reg(), lsm9ds1_orient_cfg_g_t::orient, lsm9ds1_gy_orient_t::orient, lsm9ds1_orient_cfg_g_t::signx_g, lsm9ds1_gy_orient_t::signx_g, lsm9ds1_orient_cfg_g_t::signy_g, lsm9ds1_gy_orient_t::signy_g, lsm9ds1_orient_cfg_g_t::signz_g, and lsm9ds1_gy_orient_t::signz_g.

◆ lsm9ds1_gy_orient_set()

int32_t lsm9ds1_gy_orient_set ( const stmdev_ctx_t ctx,
lsm9ds1_gy_orient_t  val 
)

Configure gyro orientation.

[set]

Parameters
ctxRead / write interface definitions.(ptr)
valDirectional user orientation selection.
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 449 of file lsm9ds1_reg.c.

References LSM9DS1_ORIENT_CFG_G, lsm9ds1_read_reg(), lsm9ds1_write_reg(), lsm9ds1_orient_cfg_g_t::orient, lsm9ds1_gy_orient_t::orient, lsm9ds1_orient_cfg_g_t::signx_g, lsm9ds1_gy_orient_t::signx_g, lsm9ds1_orient_cfg_g_t::signy_g, lsm9ds1_gy_orient_t::signy_g, lsm9ds1_orient_cfg_g_t::signz_g, and lsm9ds1_gy_orient_t::signz_g.

◆ lsm9ds1_gy_self_test_get()

int32_t lsm9ds1_gy_self_test_get ( const stmdev_ctx_t ctx,
uint8_t *  val 
)

Enable/disable self-test mode for gyroscope.

[get]

Parameters
ctxRead / write interface definitions.(ptr)
valGet the values of st_g in reg CTRL_REG10.(ptr)
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 4700 of file lsm9ds1_reg.c.

References LSM9DS1_CTRL_REG10, lsm9ds1_read_reg(), and lsm9ds1_ctrl_reg10_t::st_g.

◆ lsm9ds1_gy_self_test_set()

int32_t lsm9ds1_gy_self_test_set ( const stmdev_ctx_t ctx,
uint8_t  val 
)

Enable/disable self-test mode for gyroscope.

[set]

Parameters
ctxRead / write interface definitions.(ptr)
valChange the values of st_g in reg CTRL_REG10.
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 4674 of file lsm9ds1_reg.c.

References LSM9DS1_CTRL_REG10, lsm9ds1_read_reg(), lsm9ds1_write_reg(), and lsm9ds1_ctrl_reg10_t::st_g.

◆ lsm9ds1_gy_trshld_axis_get()

int32_t lsm9ds1_gy_trshld_axis_get ( const stmdev_ctx_t ctx,
lsm9ds1_gy_trshld_en_t val 
)

Enable interrupt generation on threshold event.

[get]

Parameters
ctxRead / write interface definitions.(ptr)
valEnable interrupt generation on gyroscope’s pitch (X) axis low event.(ptr)
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 3471 of file lsm9ds1_reg.c.

References LSM9DS1_INT_GEN_CFG_G, lsm9ds1_read_reg(), lsm9ds1_int_gen_cfg_g_t::xhie_g, lsm9ds1_gy_trshld_en_t::xhie_g, lsm9ds1_int_gen_cfg_g_t::xlie_g, lsm9ds1_gy_trshld_en_t::xlie_g, lsm9ds1_int_gen_cfg_g_t::yhie_g, lsm9ds1_gy_trshld_en_t::yhie_g, lsm9ds1_int_gen_cfg_g_t::ylie_g, lsm9ds1_gy_trshld_en_t::ylie_g, lsm9ds1_int_gen_cfg_g_t::zhie_g, lsm9ds1_gy_trshld_en_t::zhie_g, lsm9ds1_int_gen_cfg_g_t::zlie_g, and lsm9ds1_gy_trshld_en_t::zlie_g.

◆ lsm9ds1_gy_trshld_axis_set()

int32_t lsm9ds1_gy_trshld_axis_set ( const stmdev_ctx_t ctx,
lsm9ds1_gy_trshld_en_t  val 
)

Enable interrupt generation on threshold event.

[set]

Parameters
ctxRead / write interface definitions.(ptr)
valEnable interrupt generation on gyroscope’s pitch (X) axis low event.
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 3438 of file lsm9ds1_reg.c.

References LSM9DS1_INT_GEN_CFG_G, lsm9ds1_read_reg(), lsm9ds1_write_reg(), lsm9ds1_int_gen_cfg_g_t::xhie_g, lsm9ds1_gy_trshld_en_t::xhie_g, lsm9ds1_int_gen_cfg_g_t::xlie_g, lsm9ds1_gy_trshld_en_t::xlie_g, lsm9ds1_int_gen_cfg_g_t::yhie_g, lsm9ds1_gy_trshld_en_t::yhie_g, lsm9ds1_int_gen_cfg_g_t::ylie_g, lsm9ds1_gy_trshld_en_t::ylie_g, lsm9ds1_int_gen_cfg_g_t::zhie_g, lsm9ds1_gy_trshld_en_t::zhie_g, lsm9ds1_int_gen_cfg_g_t::zlie_g, and lsm9ds1_gy_trshld_en_t::zlie_g.

◆ lsm9ds1_gy_trshld_min_sample_get()

int32_t lsm9ds1_gy_trshld_min_sample_get ( const stmdev_ctx_t ctx,
uint8_t *  val 
)

Enter/exit interrupt duration value.

[get]

Parameters
ctxRead / write interface definitions.(ptr)
valGet the values of dur_g in reg INT_GEN_DUR_G.(ptr)
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 3807 of file lsm9ds1_reg.c.

References lsm9ds1_int_gen_dur_g_t::dur_g, LSM9DS1_INT_GEN_DUR_G, and lsm9ds1_read_reg().

◆ lsm9ds1_gy_trshld_min_sample_set()

int32_t lsm9ds1_gy_trshld_min_sample_set ( const stmdev_ctx_t ctx,
uint8_t  val 
)

Enter/exit interrupt duration value.

[set]

Parameters
ctxRead / write interface definitions.(ptr)
valChange the values of dur_g in reg INT_GEN_DUR_G.
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 3770 of file lsm9ds1_reg.c.

References lsm9ds1_int_gen_dur_g_t::dur_g, LSM9DS1_INT_GEN_DUR_G, lsm9ds1_read_reg(), lsm9ds1_write_reg(), PROPERTY_DISABLE, PROPERTY_ENABLE, and lsm9ds1_int_gen_dur_g_t::wait_g.

◆ lsm9ds1_gy_trshld_mode_get()

int32_t lsm9ds1_gy_trshld_mode_get ( const stmdev_ctx_t ctx,
lsm9ds1_dcrm_g_t val 
)

Decrement or reset counter mode selection.

[get]

Parameters
ctxRead / write interface definitions.(ptr)
valGet the values of dcrm_g in reg INT_GEN_THS_XH_G.(ptr)
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 3524 of file lsm9ds1_reg.c.

References lsm9ds1_int_gen_ths_xh_g_t::dcrm_g, LSM9DS1_DECREMENT_MODE, LSM9DS1_INT_GEN_THS_XH_G, lsm9ds1_read_reg(), and LSM9DS1_RESET_MODE.

◆ lsm9ds1_gy_trshld_mode_set()

int32_t lsm9ds1_gy_trshld_mode_set ( const stmdev_ctx_t ctx,
lsm9ds1_dcrm_g_t  val 
)

Decrement or reset counter mode selection.

[set]

Parameters
ctxRead / write interface definitions.(ptr)
valChange the values of "dcrm_g" in reg LSM9DS1.
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 3497 of file lsm9ds1_reg.c.

References lsm9ds1_int_gen_ths_xh_g_t::dcrm_g, LSM9DS1_INT_GEN_THS_XH_G, lsm9ds1_read_reg(), and lsm9ds1_write_reg().

◆ lsm9ds1_gy_trshld_src_get()

int32_t lsm9ds1_gy_trshld_src_get ( const stmdev_ctx_t ctx,
lsm9ds1_gy_trshld_src_t val 
)

◆ lsm9ds1_gy_trshld_x_get()

int32_t lsm9ds1_gy_trshld_x_get ( const stmdev_ctx_t ctx,
uint16_t *  val 
)

Angular rate sensor interrupt threshold on pitch (X) axis.

[get]

Parameters
ctxRead / write interface definitions.(ptr)
valGet the values of ths_g_x in reg INT_GEN_THS_XH_G.(ptr)
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 3599 of file lsm9ds1_reg.c.

References LSM9DS1_INT_GEN_THS_XH_G, LSM9DS1_INT_GEN_THS_XL_G, lsm9ds1_read_reg(), lsm9ds1_int_gen_ths_xh_g_t::ths_g_x, and lsm9ds1_int_gen_ths_xl_g_t::ths_g_x.

◆ lsm9ds1_gy_trshld_x_set()

int32_t lsm9ds1_gy_trshld_x_set ( const stmdev_ctx_t ctx,
uint16_t  val 
)

Angular rate sensor interrupt threshold on pitch (X) axis.

[set]

Parameters
ctxRead / write interface definitions.(ptr)
valChange the values of ths_g_x in reg INT_GEN_THS_XH_G.
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 3559 of file lsm9ds1_reg.c.

References LSM9DS1_INT_GEN_THS_XH_G, LSM9DS1_INT_GEN_THS_XL_G, lsm9ds1_read_reg(), lsm9ds1_write_reg(), lsm9ds1_int_gen_ths_xh_g_t::ths_g_x, and lsm9ds1_int_gen_ths_xl_g_t::ths_g_x.

◆ lsm9ds1_gy_trshld_y_get()

int32_t lsm9ds1_gy_trshld_y_get ( const stmdev_ctx_t ctx,
uint16_t *  val 
)

Angular rate sensor interrupt threshold on roll (Y) axis.

[get]

Parameters
ctxRead / write interface definitions.(ptr)
valGet the values of ths_g_y in reg INT_GEN_THS_YH_G.(ptr)
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 3670 of file lsm9ds1_reg.c.

References LSM9DS1_INT_GEN_THS_YH_G, LSM9DS1_INT_GEN_THS_YL_G, lsm9ds1_read_reg(), lsm9ds1_int_gen_ths_yh_g_t::ths_g_y, and lsm9ds1_int_gen_ths_yl_g_t::ths_g_y.

◆ lsm9ds1_gy_trshld_y_set()

int32_t lsm9ds1_gy_trshld_y_set ( const stmdev_ctx_t ctx,
uint16_t  val 
)

Angular rate sensor interrupt threshold on roll (Y) axis.

[set]

Parameters
ctxRead / write interface definitions.(ptr)
valChange the values of ths_g_y in reg INT_GEN_THS_YH_G.
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 3630 of file lsm9ds1_reg.c.

References LSM9DS1_INT_GEN_THS_YH_G, LSM9DS1_INT_GEN_THS_YL_G, lsm9ds1_read_reg(), lsm9ds1_write_reg(), lsm9ds1_int_gen_ths_yh_g_t::ths_g_y, and lsm9ds1_int_gen_ths_yl_g_t::ths_g_y.

◆ lsm9ds1_gy_trshld_z_get()

int32_t lsm9ds1_gy_trshld_z_get ( const stmdev_ctx_t ctx,
uint16_t *  val 
)

Angular rate sensor interrupt thresholds on yaw (Z) axis.

[get]

Parameters
ctxRead / write interface definitions.(ptr)
valGet the values of ths_g_z in reg INT_GEN_THS_ZH_G.(ptr)
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 3740 of file lsm9ds1_reg.c.

References LSM9DS1_INT_GEN_THS_ZH_G, LSM9DS1_INT_GEN_THS_ZL_G, lsm9ds1_read_reg(), lsm9ds1_int_gen_ths_zh_g_t::ths_g_z, and lsm9ds1_int_gen_ths_zl_g_t::ths_g_z.

◆ lsm9ds1_gy_trshld_z_set()

int32_t lsm9ds1_gy_trshld_z_set ( const stmdev_ctx_t ctx,
uint16_t  val 
)

Angular rate sensor interrupt thresholds on yaw (Z) axis.

[set]

Parameters
ctxRead / write interface definitions.(ptr)
valChange the values of ths_g_z in reg INT_GEN_THS_ZH_G.
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 3700 of file lsm9ds1_reg.c.

References LSM9DS1_INT_GEN_THS_ZH_G, LSM9DS1_INT_GEN_THS_ZL_G, lsm9ds1_read_reg(), lsm9ds1_write_reg(), lsm9ds1_int_gen_ths_zh_g_t::ths_g_z, and lsm9ds1_int_gen_ths_zl_g_t::ths_g_z.

◆ lsm9ds1_i2c_interface_get()

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.

[get]

Parameters
ctx_magRead / write magnetometer interface definitions.(ptr)
ctx_imuRead / write imu interface definitions.(ptr)
valGet the values of i2c_disable in reg CTRL_REG9.(ptr)
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 2666 of file lsm9ds1_reg.c.

References lsm9ds1_ctrl_reg9_t::i2c_disable, lsm9ds1_ctrl_reg3_m_t::i2c_disable, LSM9DS1_CTRL_REG3_M, LSM9DS1_CTRL_REG9, LSM9DS1_I2C_DISABLE, LSM9DS1_I2C_ENABLE, and lsm9ds1_read_reg().

◆ lsm9ds1_i2c_interface_set()

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.

[set]

Parameters
ctx_magRead / write magnetometer interface definitions.(ptr)
ctx_imuRead / write imu interface definitions.(ptr)
valChange the values of "i2c_disable" in reg LSM9DS1.
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 2623 of file lsm9ds1_reg.c.

References lsm9ds1_ctrl_reg9_t::i2c_disable, lsm9ds1_ctrl_reg3_m_t::i2c_disable, LSM9DS1_CTRL_REG3_M, LSM9DS1_CTRL_REG9, lsm9ds1_read_reg(), and lsm9ds1_write_reg().

◆ lsm9ds1_imu_data_rate_get()

◆ lsm9ds1_imu_data_rate_set()

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.

[set]

Parameters
ctxRead / write interface definitions.(ptr)
valChange the values of "odr_g" in reg LSM9DS1.
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 251 of file lsm9ds1_reg.c.

References lsm9ds1_ctrl_reg3_g_t::lp_mode, LSM9DS1_CTRL_REG1_G, LSM9DS1_CTRL_REG3_G, LSM9DS1_CTRL_REG6_XL, lsm9ds1_read_reg(), lsm9ds1_write_reg(), lsm9ds1_ctrl_reg1_g_t::odr_g, and lsm9ds1_ctrl_reg6_xl_t::odr_xl.

◆ lsm9ds1_mag_data_rate_get()

◆ lsm9ds1_mag_data_rate_set()

int32_t lsm9ds1_mag_data_rate_set ( const stmdev_ctx_t ctx,
lsm9ds1_mag_data_rate_t  val 
)

Magnetometer data rate selection.

[set]

Parameters
ctxRead / write interface definitions.(ptr)
valChange the values of "fast_odr" in reg LSM9DS1.
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 927 of file lsm9ds1_reg.c.

References lsm9ds1_ctrl_reg1_m_t::_do, lsm9ds1_ctrl_reg1_m_t::fast_odr, LSM9DS1_CTRL_REG1_M, LSM9DS1_CTRL_REG3_M, LSM9DS1_CTRL_REG4_M, lsm9ds1_read_reg(), lsm9ds1_write_reg(), lsm9ds1_ctrl_reg3_m_t::md, lsm9ds1_ctrl_reg1_m_t::om, lsm9ds1_ctrl_reg4_m_t::omz, PROPERTY_ENABLE, and lsm9ds1_ctrl_reg1_m_t::temp_comp.

◆ lsm9ds1_mag_flag_data_ready_get()

int32_t lsm9ds1_mag_flag_data_ready_get ( const stmdev_ctx_t ctx,
uint8_t *  val 
)

New data available from magnetometer.

[get]

Parameters
ctxRead / write interface definitions.(ptr)
valIet the values of "zyxda" in reg STATUS_REG_M.(ptr)
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 1242 of file lsm9ds1_reg.c.

References lsm9ds1_read_reg(), LSM9DS1_STATUS_REG_M, and lsm9ds1_status_reg_m_t::zyxda.

◆ lsm9ds1_mag_full_scale_get()

int32_t lsm9ds1_mag_full_scale_get ( const stmdev_ctx_t ctx,
lsm9ds1_mag_fs_t val 
)

Magnetometer full scale selection.

[get]

Parameters
ctxRead / write interface definitions.(ptr)
valGet the values of fs in reg CTRL_REG2_M.(ptr)
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 1199 of file lsm9ds1_reg.c.

References lsm9ds1_ctrl_reg2_m_t::fs, LSM9DS1_12Ga, LSM9DS1_16Ga, LSM9DS1_4Ga, LSM9DS1_8Ga, LSM9DS1_CTRL_REG2_M, and lsm9ds1_read_reg().

◆ lsm9ds1_mag_full_scale_set()

int32_t lsm9ds1_mag_full_scale_set ( const stmdev_ctx_t ctx,
lsm9ds1_mag_fs_t  val 
)

Magnetometer full Scale Selection.

[set]

Parameters
ctxRead / write interface definitions.(ptr)
valChange the values of "fs" in reg LSM9DS1.
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 1172 of file lsm9ds1_reg.c.

References lsm9ds1_ctrl_reg2_m_t::fs, LSM9DS1_CTRL_REG2_M, lsm9ds1_read_reg(), and lsm9ds1_write_reg().

◆ lsm9ds1_mag_offset_get()

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).

[get]

Parameters
ctxRead / write interface definitions.(ptr)
buffBuffer that stores data read.(ptr)
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 903 of file lsm9ds1_reg.c.

References LSM9DS1_OFFSET_X_REG_L_M, and lsm9ds1_read_reg().

◆ lsm9ds1_mag_offset_set()

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).

[set]

Parameters
ctxRead / write interface definitions.(ptr)
buffBuffer that stores data to be write.(ptr)
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 877 of file lsm9ds1_reg.c.

References LSM9DS1_OFFSET_X_REG_L_M, and lsm9ds1_write_reg().

◆ lsm9ds1_mag_self_test_get()

int32_t lsm9ds1_mag_self_test_get ( const stmdev_ctx_t ctx,
uint8_t *  val 
)

Enable/disable self-test mode for magnatic sensor.

[get]

Parameters
ctxRead / write interface definitions.(ptr)
valGet the values of st in reg CTRL_REG1_M.(ptr)
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 4746 of file lsm9ds1_reg.c.

References LSM9DS1_CTRL_REG1_M, lsm9ds1_read_reg(), and lsm9ds1_ctrl_reg1_m_t::st.

◆ lsm9ds1_mag_self_test_set()

int32_t lsm9ds1_mag_self_test_set ( const stmdev_ctx_t ctx,
uint8_t  val 
)

Enable/disable self-test mode for magnatic sensor.

[set]

Parameters
ctxRead / write interface definitions.(ptr)
valChange the values of st in reg CTRL_REG1_M.
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 4720 of file lsm9ds1_reg.c.

References LSM9DS1_CTRL_REG1_M, lsm9ds1_read_reg(), lsm9ds1_write_reg(), and lsm9ds1_ctrl_reg1_m_t::st.

◆ lsm9ds1_mag_trshld_axis_get()

int32_t lsm9ds1_mag_trshld_axis_get ( const stmdev_ctx_t ctx,
lsm9ds1_mag_trshld_axis_t val 
)

Enable interrupt generation on threshold event.

[get]

Parameters
ctxRead / write interface definitions.(ptr)
valEnable interrupt generation on Z-axis. .(ptr)
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 3855 of file lsm9ds1_reg.c.

References LSM9DS1_INT_CFG_M, lsm9ds1_read_reg(), lsm9ds1_int_cfg_m_t::xien, lsm9ds1_mag_trshld_axis_t::xien, lsm9ds1_int_cfg_m_t::yien, lsm9ds1_mag_trshld_axis_t::yien, lsm9ds1_int_cfg_m_t::zien, and lsm9ds1_mag_trshld_axis_t::zien.

◆ lsm9ds1_mag_trshld_axis_set()

int32_t lsm9ds1_mag_trshld_axis_set ( const stmdev_ctx_t ctx,
lsm9ds1_mag_trshld_axis_t  val 
)

Enable interrupt generation on threshold event.

[set]

Parameters
ctxRead / write interface definitions.(ptr)
valEnable interrupt generation on Z-axis. .
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 3828 of file lsm9ds1_reg.c.

References LSM9DS1_INT_CFG_M, lsm9ds1_read_reg(), lsm9ds1_write_reg(), lsm9ds1_int_cfg_m_t::xien, lsm9ds1_mag_trshld_axis_t::xien, lsm9ds1_int_cfg_m_t::yien, lsm9ds1_mag_trshld_axis_t::yien, lsm9ds1_int_cfg_m_t::zien, and lsm9ds1_mag_trshld_axis_t::zien.

◆ lsm9ds1_mag_trshld_get()

int32_t lsm9ds1_mag_trshld_get ( const stmdev_ctx_t ctx,
uint8_t *  val 
)

The value is expressed in 15-bit unsigned.

[get]

Parameters
ctxRead / write interface definitions.(ptr)
valIet the values of "ths" in reg INT_THS_L_M.(ptr)
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 3903 of file lsm9ds1_reg.c.

References LSM9DS1_INT_THS_H_M, LSM9DS1_INT_THS_L_M, lsm9ds1_read_reg(), lsm9ds1_int_ths_l_m_t::ths, and lsm9ds1_int_ths_h_m_t::ths.

◆ lsm9ds1_mag_trshld_set()

int32_t lsm9ds1_mag_trshld_set ( const stmdev_ctx_t ctx,
uint8_t *  val 
)

◆ lsm9ds1_mag_trshld_src_get()

int32_t lsm9ds1_mag_trshld_src_get ( const stmdev_ctx_t ctx,
lsm9ds1_mag_trshld_src_t val 
)

Magnetometer interrupt on threshold source.

[get]

Parameters
ctxRead / write interface definitions.(ptr)
valThis bit signals when the interrupt event occurs.(ptr)
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 3877 of file lsm9ds1_reg.c.

References lsm9ds1_int_src_m_t::_int, lsm9ds1_mag_trshld_src_t::_int, LSM9DS1_INT_SRC_M, lsm9ds1_read_reg(), lsm9ds1_int_src_m_t::nth_x, lsm9ds1_mag_trshld_src_t::nth_x, lsm9ds1_int_src_m_t::nth_y, lsm9ds1_mag_trshld_src_t::nth_y, lsm9ds1_int_src_m_t::nth_z, lsm9ds1_mag_trshld_src_t::nth_z, lsm9ds1_int_src_m_t::pth_x, lsm9ds1_mag_trshld_src_t::pth_x, lsm9ds1_int_src_m_t::pth_y, lsm9ds1_mag_trshld_src_t::pth_y, lsm9ds1_int_src_m_t::pth_z, and lsm9ds1_mag_trshld_src_t::pth_z.

◆ lsm9ds1_magnetic_overflow_get()

int32_t lsm9ds1_magnetic_overflow_get ( const stmdev_ctx_t ctx,
uint8_t *  val 
)

Internal measurement range overflow on magnetic value.

[get]

Parameters
ctxRead / write interface definitions.(ptr)
valIet the values of "mroi" in reg INT_SRC_M.(ptr)
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 1371 of file lsm9ds1_reg.c.

References LSM9DS1_INT_SRC_M, lsm9ds1_read_reg(), and lsm9ds1_int_src_m_t::mroi.

◆ lsm9ds1_magnetic_raw_get()

int32_t lsm9ds1_magnetic_raw_get ( const stmdev_ctx_t ctx,
int16_t *  val 
)

Magnetic sensor.

The value is expressed as a 16-bit word in two’s complement.[get]

Parameters
ctxRead / write interface definitions.(ptr)
buffBuffer that stores the data read.(ptr)
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 1347 of file lsm9ds1_reg.c.

References LSM9DS1_OUT_X_L_M, and lsm9ds1_read_reg().

◆ lsm9ds1_pin_int1_route_get()

◆ lsm9ds1_pin_int1_route_set()

◆ lsm9ds1_pin_int2_route_get()

◆ lsm9ds1_pin_int2_route_set()

◆ lsm9ds1_pin_int_m_route_get()

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.

[get]

Parameters
ctxRead / write interface definitions.(ptr)
valInterrupt enable on the INT_M pin.(ptr)
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 3110 of file lsm9ds1_reg.c.

References lsm9ds1_int_cfg_m_t::ien, lsm9ds1_pin_m_route_t::ien, LSM9DS1_INT_CFG_M, and lsm9ds1_read_reg().

◆ lsm9ds1_pin_int_m_route_set()

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.

[set]

Parameters
ctxRead / write interface definitions.(ptr)
valInterrupt enable on the INT_M pin.
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 3085 of file lsm9ds1_reg.c.

References lsm9ds1_int_cfg_m_t::ien, lsm9ds1_pin_m_route_t::ien, LSM9DS1_INT_CFG_M, lsm9ds1_read_reg(), and lsm9ds1_write_reg().

◆ lsm9ds1_pin_logic_get()

int32_t lsm9ds1_pin_logic_get ( const stmdev_ctx_t ctx,
lsm9ds1_pin_logic_t val 
)

AND/OR combination of accelerometer’s interrupt events.

[get]

Parameters
ctxRead / write interface definitions.(ptr)
valGet the values of aoi_xl in reg INT_GEN_CFG_XL.(ptr)
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 2763 of file lsm9ds1_reg.c.

References lsm9ds1_int_gen_cfg_g_t::aoi_g, lsm9ds1_int_gen_cfg_xl_t::aoi_xl, LSM9DS1_INT_GEN_CFG_G, LSM9DS1_INT_GEN_CFG_XL, LSM9DS1_LOGIC_AND, LSM9DS1_LOGIC_OR, and lsm9ds1_read_reg().

◆ lsm9ds1_pin_logic_set()

int32_t lsm9ds1_pin_logic_set ( const stmdev_ctx_t ctx,
lsm9ds1_pin_logic_t  val 
)

AND/OR combination of accelerometer’s interrupt events.

[set]

Parameters
ctxRead / write interface definitions.(ptr)
valChange the values of "aoi_xl" in reg LSM9DS1.
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 2722 of file lsm9ds1_reg.c.

References lsm9ds1_int_gen_cfg_g_t::aoi_g, lsm9ds1_int_gen_cfg_xl_t::aoi_xl, LSM9DS1_INT_GEN_CFG_G, LSM9DS1_INT_GEN_CFG_XL, lsm9ds1_read_reg(), and lsm9ds1_write_reg().

◆ lsm9ds1_pin_mode_get()

int32_t lsm9ds1_pin_mode_get ( const stmdev_ctx_t ctx,
lsm9ds1_pp_od_t val 
)

Push-pull/open drain selection on interrupt pads.

[get]

Parameters
ctxRead / write interface definitions.(ptr)
valGet the values of pp_od in reg CTRL_REG8.(ptr)
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 3052 of file lsm9ds1_reg.c.

References LSM9DS1_CTRL_REG8, LSM9DS1_OPEN_DRAIN, LSM9DS1_PUSH_PULL, lsm9ds1_read_reg(), and lsm9ds1_ctrl_reg8_t::pp_od.

◆ lsm9ds1_pin_mode_set()

int32_t lsm9ds1_pin_mode_set ( const stmdev_ctx_t ctx,
lsm9ds1_pp_od_t  val 
)

Push-pull/open drain selection on interrupt pads.

[set]

Parameters
ctxRead / write interface definitions.(ptr)
valChange the values of "pp_od" in reg LSM9DS1.
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 3028 of file lsm9ds1_reg.c.

References LSM9DS1_CTRL_REG8, lsm9ds1_read_reg(), lsm9ds1_write_reg(), and lsm9ds1_ctrl_reg8_t::pp_od.

◆ lsm9ds1_pin_notification_get()

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.

[get]

Parameters
ctx_magRead / write magnetometer interface definitions.(ptr)
ctx_imuRead / write imu interface definitions.(ptr)
valGet the values of iel in reg INT_CFG_M.(ptr)
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 2979 of file lsm9ds1_reg.c.

References lsm9ds1_int_cfg_m_t::iel, lsm9ds1_int_gen_cfg_g_t::lir_g, lsm9ds1_ctrl_reg4_t::lir_xl1, LSM9DS1_CTRL_REG4, LSM9DS1_INT_CFG_M, LSM9DS1_INT_GEN_CFG_G, LSM9DS1_INT_LATCHED, LSM9DS1_INT_PULSED, and lsm9ds1_read_reg().

◆ lsm9ds1_pin_notification_set()

int32_t lsm9ds1_pin_notification_set ( const stmdev_ctx_t ctx_mag,
stmdev_ctx_t ctx_imu,
lsm9ds1_lir_t  val 
)

Latched/pulsed interrupt.

[set]

Parameters
ctx_magRead / write magnetometer interface definitions.(ptr)
ctx_imuRead / write imu interface definitions.(ptr)
valChange the values of "lir_xl1" in reg LSM9DS1.
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 2922 of file lsm9ds1_reg.c.

References lsm9ds1_int_cfg_m_t::iel, lsm9ds1_int_gen_cfg_g_t::lir_g, lsm9ds1_ctrl_reg4_t::lir_xl1, LSM9DS1_CTRL_REG4, LSM9DS1_INT_CFG_M, LSM9DS1_INT_GEN_CFG_G, lsm9ds1_read_reg(), and lsm9ds1_write_reg().

◆ lsm9ds1_pin_polarity_get()

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.

[get]

Parameters
ctx_magRead / write magnetometer interface definitions.(ptr)
ctx_imuRead / write imu interface definitions.(ptr)
valGet the values of iea in reg INT_CFG_M.(ptr)
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 3174 of file lsm9ds1_reg.c.

References lsm9ds1_ctrl_reg8_t::h_lactive, lsm9ds1_int_cfg_m_t::iea, LSM9DS1_ACTIVE_HIGH, LSM9DS1_ACTIVE_LOW, LSM9DS1_CTRL_REG8, LSM9DS1_INT_CFG_M, and lsm9ds1_read_reg().

◆ lsm9ds1_pin_polarity_set()

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.

[set]

Parameters
ctx_magRead / write magnetometer interface definitions.(ptr)
ctx_imuRead / write imu interface definitions.(ptr)
valChange the values of "iea" in reg LSM9DS1.
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 3131 of file lsm9ds1_reg.c.

References lsm9ds1_ctrl_reg8_t::h_lactive, lsm9ds1_int_cfg_m_t::iea, LSM9DS1_CTRL_REG8, LSM9DS1_INT_CFG_M, lsm9ds1_read_reg(), and lsm9ds1_write_reg().

◆ lsm9ds1_read_reg()

int32_t lsm9ds1_read_reg ( const stmdev_ctx_t ctx,
uint8_t  reg,
uint8_t *  data,
uint16_t  len 
)

Read generic device register.

Parameters
ctxread / write interface definitions(ptr)
regregister to read
datapointer to buffer that store the data read(ptr)
lennumber of consecutive register to read
Return values
interfacestatus (MANDATORY: return 0 -> no Error)

Definition at line 49 of file lsm9ds1_reg.c.

References stmdev_ctx_t::handle, and stmdev_ctx_t::read_reg.

Referenced by lsm9ds1_6d_mode_get(), lsm9ds1_6d_mode_set(), lsm9ds1_6d_src_get(), lsm9ds1_6d_threshold_get(), lsm9ds1_acceleration_raw_get(), lsm9ds1_act_duration_get(), lsm9ds1_act_mode_get(), lsm9ds1_act_mode_set(), lsm9ds1_act_src_get(), lsm9ds1_act_threshold_get(), lsm9ds1_act_threshold_set(), lsm9ds1_angular_rate_raw_get(), lsm9ds1_auto_increment_get(), lsm9ds1_auto_increment_set(), lsm9ds1_block_data_update_get(), lsm9ds1_block_data_update_set(), lsm9ds1_dev_boot_get(), lsm9ds1_dev_boot_set(), lsm9ds1_dev_data_format_get(), lsm9ds1_dev_data_format_set(), lsm9ds1_dev_id_get(), lsm9ds1_dev_reset_get(), lsm9ds1_dev_reset_set(), lsm9ds1_dev_status_get(), lsm9ds1_fifo_data_level_get(), lsm9ds1_fifo_full_flag_get(), lsm9ds1_fifo_mode_get(), lsm9ds1_fifo_mode_set(), lsm9ds1_fifo_ovr_flag_get(), lsm9ds1_fifo_stop_on_wtm_get(), lsm9ds1_fifo_stop_on_wtm_set(), lsm9ds1_fifo_temp_batch_get(), lsm9ds1_fifo_temp_batch_set(), lsm9ds1_fifo_watermark_get(), lsm9ds1_fifo_watermark_set(), lsm9ds1_fifo_wtm_flag_get(), lsm9ds1_filter_settling_mask_get(), lsm9ds1_filter_settling_mask_set(), lsm9ds1_gy_axis_get(), lsm9ds1_gy_axis_set(), lsm9ds1_gy_filter_hp_bandwidth_get(), lsm9ds1_gy_filter_hp_bandwidth_set(), lsm9ds1_gy_filter_int_path_get(), lsm9ds1_gy_filter_int_path_set(), lsm9ds1_gy_filter_lp_bandwidth_get(), lsm9ds1_gy_filter_lp_bandwidth_set(), lsm9ds1_gy_filter_out_path_get(), lsm9ds1_gy_filter_out_path_set(), lsm9ds1_gy_filter_reference_get(), lsm9ds1_gy_flag_data_ready_get(), lsm9ds1_gy_full_scale_get(), lsm9ds1_gy_full_scale_set(), lsm9ds1_gy_orient_get(), lsm9ds1_gy_orient_set(), lsm9ds1_gy_self_test_get(), lsm9ds1_gy_self_test_set(), lsm9ds1_gy_trshld_axis_get(), lsm9ds1_gy_trshld_axis_set(), lsm9ds1_gy_trshld_min_sample_get(), lsm9ds1_gy_trshld_min_sample_set(), lsm9ds1_gy_trshld_mode_get(), lsm9ds1_gy_trshld_mode_set(), lsm9ds1_gy_trshld_src_get(), lsm9ds1_gy_trshld_x_get(), lsm9ds1_gy_trshld_x_set(), lsm9ds1_gy_trshld_y_get(), lsm9ds1_gy_trshld_y_set(), lsm9ds1_gy_trshld_z_get(), lsm9ds1_gy_trshld_z_set(), lsm9ds1_i2c_interface_get(), lsm9ds1_i2c_interface_set(), lsm9ds1_imu_data_rate_get(), lsm9ds1_imu_data_rate_set(), lsm9ds1_mag_data_rate_get(), lsm9ds1_mag_data_rate_set(), lsm9ds1_mag_flag_data_ready_get(), lsm9ds1_mag_full_scale_get(), lsm9ds1_mag_full_scale_set(), lsm9ds1_mag_offset_get(), lsm9ds1_mag_self_test_get(), lsm9ds1_mag_self_test_set(), lsm9ds1_mag_trshld_axis_get(), lsm9ds1_mag_trshld_axis_set(), lsm9ds1_mag_trshld_get(), lsm9ds1_mag_trshld_src_get(), lsm9ds1_magnetic_overflow_get(), lsm9ds1_magnetic_raw_get(), lsm9ds1_pin_int1_route_get(), lsm9ds1_pin_int1_route_set(), lsm9ds1_pin_int2_route_get(), lsm9ds1_pin_int2_route_set(), lsm9ds1_pin_int_m_route_get(), lsm9ds1_pin_int_m_route_set(), lsm9ds1_pin_logic_get(), lsm9ds1_pin_logic_set(), lsm9ds1_pin_mode_get(), lsm9ds1_pin_mode_set(), lsm9ds1_pin_notification_get(), lsm9ds1_pin_notification_set(), lsm9ds1_pin_polarity_get(), lsm9ds1_pin_polarity_set(), lsm9ds1_spi_mode_get(), lsm9ds1_spi_mode_set(), lsm9ds1_temp_flag_data_ready_get(), lsm9ds1_temperature_raw_get(), lsm9ds1_xl_axis_get(), lsm9ds1_xl_axis_set(), lsm9ds1_xl_decimation_get(), lsm9ds1_xl_decimation_set(), lsm9ds1_xl_filter_aalias_bandwidth_get(), lsm9ds1_xl_filter_aalias_bandwidth_set(), lsm9ds1_xl_filter_hp_bandwidth_get(), lsm9ds1_xl_filter_hp_bandwidth_set(), lsm9ds1_xl_filter_int_path_get(), lsm9ds1_xl_filter_int_path_set(), lsm9ds1_xl_filter_lp_bandwidth_get(), lsm9ds1_xl_filter_lp_bandwidth_set(), lsm9ds1_xl_filter_out_path_get(), lsm9ds1_xl_filter_out_path_set(), lsm9ds1_xl_flag_data_ready_get(), lsm9ds1_xl_full_scale_get(), lsm9ds1_xl_full_scale_set(), lsm9ds1_xl_self_test_get(), lsm9ds1_xl_self_test_set(), lsm9ds1_xl_trshld_axis_get(), lsm9ds1_xl_trshld_axis_set(), lsm9ds1_xl_trshld_get(), lsm9ds1_xl_trshld_min_sample_get(), lsm9ds1_xl_trshld_min_sample_set(), and lsm9ds1_xl_trshld_src_get().

◆ lsm9ds1_spi_mode_get()

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.

[get]

Parameters
ctx_magRead / write magnetometer interface definitions.(ptr)
ctx_imuRead / write imu interface definitions.(ptr)
valGet the values of sim in reg CTRL_REG8.(ptr)
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 2579 of file lsm9ds1_reg.c.

References LSM9DS1_CTRL_REG3_M, LSM9DS1_CTRL_REG8, lsm9ds1_read_reg(), LSM9DS1_SPI_3_WIRE, LSM9DS1_SPI_4_WIRE, lsm9ds1_ctrl_reg8_t::sim, and lsm9ds1_ctrl_reg3_m_t::sim.

◆ lsm9ds1_spi_mode_set()

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.

[set]

Parameters
ctx_magRead / write magnetometer interface definitions.(ptr)
ctx_imuRead / write imu interface definitions.(ptr)
valChange the values of "sim" in reg LSM9DS1.
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 2536 of file lsm9ds1_reg.c.

References LSM9DS1_CTRL_REG3_M, LSM9DS1_CTRL_REG8, lsm9ds1_read_reg(), lsm9ds1_write_reg(), lsm9ds1_ctrl_reg8_t::sim, and lsm9ds1_ctrl_reg3_m_t::sim.

◆ lsm9ds1_temp_flag_data_ready_get()

int32_t lsm9ds1_temp_flag_data_ready_get ( const stmdev_ctx_t ctx,
uint8_t *  val 
)

Temperature new data available.

[get]

Parameters
ctxRead / write interface definitions.(ptr)
valIet the values of "tda" in reg STATUS_REG.(ptr)
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 545 of file lsm9ds1_reg.c.

References lsm9ds1_read_reg(), LSM9DS1_STATUS_REG, and lsm9ds1_status_reg_t::tda.

◆ lsm9ds1_temperature_raw_get()

int32_t lsm9ds1_temperature_raw_get ( const stmdev_ctx_t ctx,
int16_t *  val 
)

Temperature data output register (r).

L and H registers together express a 16-bit word in two’s complement.[get]

Parameters
ctxRead / write interface definitions.(ptr)
buffBuffer that stores the data read.(ptr)
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 1276 of file lsm9ds1_reg.c.

References LSM9DS1_OUT_TEMP_L, and lsm9ds1_read_reg().

◆ lsm9ds1_write_reg()

int32_t lsm9ds1_write_reg ( const stmdev_ctx_t ctx,
uint8_t  reg,
uint8_t *  data,
uint16_t  len 
)

Write generic device register.

Parameters
ctxread / write interface definitions(ptr)
regregister to write
datapointer to data to write in register reg(ptr)
lennumber of consecutive register to write
Return values
interfacestatus (MANDATORY: return 0 -> no Error)

Definition at line 75 of file lsm9ds1_reg.c.

References stmdev_ctx_t::handle, and stmdev_ctx_t::write_reg.

Referenced by lsm9ds1_6d_mode_set(), lsm9ds1_6d_threshold_set(), lsm9ds1_act_duration_set(), lsm9ds1_act_mode_set(), lsm9ds1_act_threshold_set(), lsm9ds1_auto_increment_set(), lsm9ds1_block_data_update_set(), lsm9ds1_dev_boot_set(), lsm9ds1_dev_data_format_set(), lsm9ds1_dev_reset_set(), lsm9ds1_fifo_mode_set(), lsm9ds1_fifo_stop_on_wtm_set(), lsm9ds1_fifo_temp_batch_set(), lsm9ds1_fifo_watermark_set(), lsm9ds1_filter_settling_mask_set(), lsm9ds1_gy_axis_set(), lsm9ds1_gy_filter_hp_bandwidth_set(), lsm9ds1_gy_filter_int_path_set(), lsm9ds1_gy_filter_lp_bandwidth_set(), lsm9ds1_gy_filter_out_path_set(), lsm9ds1_gy_filter_reference_set(), lsm9ds1_gy_full_scale_set(), lsm9ds1_gy_orient_set(), lsm9ds1_gy_self_test_set(), lsm9ds1_gy_trshld_axis_set(), lsm9ds1_gy_trshld_min_sample_set(), lsm9ds1_gy_trshld_mode_set(), lsm9ds1_gy_trshld_x_set(), lsm9ds1_gy_trshld_y_set(), lsm9ds1_gy_trshld_z_set(), lsm9ds1_i2c_interface_set(), lsm9ds1_imu_data_rate_set(), lsm9ds1_mag_data_rate_set(), lsm9ds1_mag_full_scale_set(), lsm9ds1_mag_offset_set(), lsm9ds1_mag_self_test_set(), lsm9ds1_mag_trshld_axis_set(), lsm9ds1_pin_int1_route_set(), lsm9ds1_pin_int2_route_set(), lsm9ds1_pin_int_m_route_set(), lsm9ds1_pin_logic_set(), lsm9ds1_pin_mode_set(), lsm9ds1_pin_notification_set(), lsm9ds1_pin_polarity_set(), lsm9ds1_spi_mode_set(), lsm9ds1_xl_axis_set(), lsm9ds1_xl_decimation_set(), lsm9ds1_xl_filter_aalias_bandwidth_set(), lsm9ds1_xl_filter_hp_bandwidth_set(), lsm9ds1_xl_filter_int_path_set(), lsm9ds1_xl_filter_lp_bandwidth_set(), lsm9ds1_xl_filter_out_path_set(), lsm9ds1_xl_full_scale_set(), lsm9ds1_xl_self_test_set(), lsm9ds1_xl_trshld_axis_set(), lsm9ds1_xl_trshld_min_sample_set(), and lsm9ds1_xl_trshld_set().

◆ lsm9ds1_xl_axis_get()

int32_t lsm9ds1_xl_axis_get ( const stmdev_ctx_t ctx,
lsm9ds1_xl_axis_t val 
)

Enable accelerometer axis.

[get]

Parameters
ctxRead / write interface definitions.(ptr)
valAccelerometer’s X-axis output enable.(ptr)
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 641 of file lsm9ds1_reg.c.

References LSM9DS1_CTRL_REG5_XL, lsm9ds1_read_reg(), lsm9ds1_ctrl_reg5_xl_t::xen_xl, lsm9ds1_xl_axis_t::xen_xl, lsm9ds1_ctrl_reg5_xl_t::yen_xl, lsm9ds1_xl_axis_t::yen_xl, lsm9ds1_ctrl_reg5_xl_t::zen_xl, and lsm9ds1_xl_axis_t::zen_xl.

◆ lsm9ds1_xl_axis_set()

int32_t lsm9ds1_xl_axis_set ( const stmdev_ctx_t ctx,
lsm9ds1_xl_axis_t  val 
)

Enable accelerometer axis.

[set]

Parameters
ctxRead / write interface definitions.(ptr)
valAccelerometer’s X-axis output enable.
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 613 of file lsm9ds1_reg.c.

References LSM9DS1_CTRL_REG5_XL, lsm9ds1_read_reg(), lsm9ds1_write_reg(), lsm9ds1_ctrl_reg5_xl_t::xen_xl, lsm9ds1_xl_axis_t::xen_xl, lsm9ds1_ctrl_reg5_xl_t::yen_xl, lsm9ds1_xl_axis_t::yen_xl, lsm9ds1_ctrl_reg5_xl_t::zen_xl, and lsm9ds1_xl_axis_t::zen_xl.

◆ lsm9ds1_xl_decimation_get()

int32_t lsm9ds1_xl_decimation_get ( const stmdev_ctx_t ctx,
lsm9ds1_dec_t val 
)

Decimation of acceleration data on OUT REG and FIFO.

[get]

Parameters
ctxRead / write interface definitions.(ptr)
valGet the values of dec in reg CTRL_REG5_XL.(ptr)
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 690 of file lsm9ds1_reg.c.

References lsm9ds1_ctrl_reg5_xl_t::dec, LSM9DS1_CTRL_REG5_XL, LSM9DS1_EVERY_2_SAMPLES, LSM9DS1_EVERY_4_SAMPLES, LSM9DS1_EVERY_8_SAMPLES, LSM9DS1_NO_DECIMATION, and lsm9ds1_read_reg().

◆ lsm9ds1_xl_decimation_set()

int32_t lsm9ds1_xl_decimation_set ( const stmdev_ctx_t ctx,
lsm9ds1_dec_t  val 
)

Decimation of acceleration data on OUT REG and FIFO.

[set]

Parameters
ctxRead / write interface definitions.(ptr)
valChange the values of "dec" in reg LSM9DS1.
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 663 of file lsm9ds1_reg.c.

References lsm9ds1_ctrl_reg5_xl_t::dec, LSM9DS1_CTRL_REG5_XL, lsm9ds1_read_reg(), and lsm9ds1_write_reg().

◆ lsm9ds1_xl_filter_aalias_bandwidth_get()

int32_t lsm9ds1_xl_filter_aalias_bandwidth_get ( const stmdev_ctx_t ctx,
lsm9ds1_xl_aa_bw_t val 
)

Configure accelerometer anti aliasing filter.

[get]

Parameters
ctxRead / write interface definitions.(ptr)
valGet the values of bw_xl in reg CTRL_REG6_XL.(ptr)
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 2112 of file lsm9ds1_reg.c.

References lsm9ds1_ctrl_reg6_xl_t::bw_scal_odr, lsm9ds1_ctrl_reg6_xl_t::bw_xl, LSM9DS1_105Hz, LSM9DS1_211Hz, LSM9DS1_408Hz, LSM9DS1_50Hz, LSM9DS1_AUTO, LSM9DS1_CTRL_REG6_XL, and lsm9ds1_read_reg().

◆ lsm9ds1_xl_filter_aalias_bandwidth_set()

int32_t lsm9ds1_xl_filter_aalias_bandwidth_set ( const stmdev_ctx_t ctx,
lsm9ds1_xl_aa_bw_t  val 
)

Configure accelerometer anti aliasing filter.

[set]

Parameters
ctxRead / write interface definitions.(ptr)
valChange the values of "bw_xl" in reg LSM9DS1.
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 2084 of file lsm9ds1_reg.c.

References lsm9ds1_ctrl_reg6_xl_t::bw_scal_odr, lsm9ds1_ctrl_reg6_xl_t::bw_xl, LSM9DS1_CTRL_REG6_XL, lsm9ds1_read_reg(), and lsm9ds1_write_reg().

◆ lsm9ds1_xl_filter_hp_bandwidth_get()

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.

[get]

Parameters
ctxRead / write interface definitions.(ptr)
valGet the values of dcf in reg CTRL_REG7_XL.(ptr)
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 2389 of file lsm9ds1_reg.c.

References lsm9ds1_ctrl_reg7_xl_t::dcf, LSM9DS1_CTRL_REG7_XL, LSM9DS1_HP_ODR_DIV_100, LSM9DS1_HP_ODR_DIV_400, LSM9DS1_HP_ODR_DIV_50, LSM9DS1_HP_ODR_DIV_9, and lsm9ds1_read_reg().

◆ lsm9ds1_xl_filter_hp_bandwidth_set()

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.

[set]

Parameters
ctxRead / write interface definitions.(ptr)
valChange the values of "dcf" in reg LSM9DS1.
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 2361 of file lsm9ds1_reg.c.

References lsm9ds1_ctrl_reg7_xl_t::dcf, LSM9DS1_CTRL_REG7_XL, lsm9ds1_read_reg(), and lsm9ds1_write_reg().

◆ lsm9ds1_xl_filter_int_path_get()

int32_t lsm9ds1_xl_filter_int_path_get ( const stmdev_ctx_t ctx,
lsm9ds1_xl_hp_path_t val 
)

[get]

Parameters
ctxRead / write interface definitions.(ptr)
valGet the values of hpis1 in reg CTRL_REG7_XL.(ptr)
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 2186 of file lsm9ds1_reg.c.

References lsm9ds1_ctrl_reg7_xl_t::hpis1, LSM9DS1_CTRL_REG7_XL, LSM9DS1_HP_DIS, LSM9DS1_HP_EN, and lsm9ds1_read_reg().

◆ lsm9ds1_xl_filter_int_path_set()

int32_t lsm9ds1_xl_filter_int_path_set ( const stmdev_ctx_t ctx,
lsm9ds1_xl_hp_path_t  val 
)

Configure HP accelerometer filter.

[set]

Parameters
ctxRead / write interface definitions.(ptr)
valChange the values of "hpis1" in reg LSM9DS1.
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 2159 of file lsm9ds1_reg.c.

References lsm9ds1_ctrl_reg7_xl_t::hpis1, LSM9DS1_CTRL_REG7_XL, lsm9ds1_read_reg(), and lsm9ds1_write_reg().

◆ lsm9ds1_xl_filter_lp_bandwidth_get()

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.

[get]

Parameters
ctxRead / write interface definitions.(ptr)
valGet the values of dcf in reg CTRL_REG7_XL.(ptr)
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 2313 of file lsm9ds1_reg.c.

References lsm9ds1_ctrl_reg7_xl_t::dcf, lsm9ds1_ctrl_reg7_xl_t::hr, LSM9DS1_CTRL_REG7_XL, LSM9DS1_LP_DISABLE, LSM9DS1_LP_ODR_DIV_100, LSM9DS1_LP_ODR_DIV_400, LSM9DS1_LP_ODR_DIV_50, LSM9DS1_LP_ODR_DIV_9, and lsm9ds1_read_reg().

◆ lsm9ds1_xl_filter_lp_bandwidth_set()

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.

[set]

Parameters
ctxRead / write interface definitions.(ptr)
valChange the values of "dcf" in reg LSM9DS1.
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 2284 of file lsm9ds1_reg.c.

References lsm9ds1_ctrl_reg7_xl_t::dcf, lsm9ds1_ctrl_reg7_xl_t::hr, LSM9DS1_CTRL_REG7_XL, lsm9ds1_read_reg(), and lsm9ds1_write_reg().

◆ lsm9ds1_xl_filter_out_path_get()

int32_t lsm9ds1_xl_filter_out_path_get ( const stmdev_ctx_t ctx,
lsm9ds1_xl_out_path_t val 
)

Accelerometer output filter path configuration.

[get]

Parameters
ctxRead / write interface definitions.(ptr)
valGet the values of fds in reg CTRL_REG7_XL.(ptr)
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 2248 of file lsm9ds1_reg.c.

References lsm9ds1_ctrl_reg7_xl_t::fds, LSM9DS1_CTRL_REG7_XL, LSM9DS1_HP_OUT, LSM9DS1_LP_OUT, and lsm9ds1_read_reg().

◆ lsm9ds1_xl_filter_out_path_set()

int32_t lsm9ds1_xl_filter_out_path_set ( const stmdev_ctx_t ctx,
lsm9ds1_xl_out_path_t  val 
)

Accelerometer output filter path configuration.

[set]

Parameters
ctxRead / write interface definitions.(ptr)
valChange the values of "fds" in reg LSM9DS1.
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 2221 of file lsm9ds1_reg.c.

References lsm9ds1_ctrl_reg7_xl_t::fds, LSM9DS1_CTRL_REG7_XL, lsm9ds1_read_reg(), and lsm9ds1_write_reg().

◆ lsm9ds1_xl_flag_data_ready_get()

int32_t lsm9ds1_xl_flag_data_ready_get ( const stmdev_ctx_t ctx,
uint8_t *  val 
)

Accelerometer new data available.

[get]

Parameters
ctxRead / write interface definitions.(ptr)
valIet the values of "xlda" in reg STATUS_REG.(ptr)
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 503 of file lsm9ds1_reg.c.

References lsm9ds1_read_reg(), LSM9DS1_STATUS_REG, and lsm9ds1_status_reg_t::xlda.

◆ lsm9ds1_xl_full_scale_get()

int32_t lsm9ds1_xl_full_scale_get ( const stmdev_ctx_t ctx,
lsm9ds1_xl_fs_t val 
)

Accelerometer full-scale selection.

[get]

Parameters
ctxRead / write interface definitions.(ptr)
valGet the values of fs_xl in reg CTRL_REG6_XL.(ptr)
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 760 of file lsm9ds1_reg.c.

References lsm9ds1_ctrl_reg6_xl_t::fs_xl, LSM9DS1_16g, LSM9DS1_2g, LSM9DS1_4g, LSM9DS1_8g, LSM9DS1_CTRL_REG6_XL, and lsm9ds1_read_reg().

◆ lsm9ds1_xl_full_scale_set()

int32_t lsm9ds1_xl_full_scale_set ( const stmdev_ctx_t ctx,
lsm9ds1_xl_fs_t  val 
)

Accelerometer full-scale selection.

[set]

Parameters
ctxRead / write interface definitions.(ptr)
valChange the values of "fs_xl" in reg LSM9DS1.
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 733 of file lsm9ds1_reg.c.

References lsm9ds1_ctrl_reg6_xl_t::fs_xl, LSM9DS1_CTRL_REG6_XL, lsm9ds1_read_reg(), and lsm9ds1_write_reg().

◆ lsm9ds1_xl_self_test_get()

int32_t lsm9ds1_xl_self_test_get ( const stmdev_ctx_t ctx,
uint8_t *  val 
)

Enable/disable self-test mode for accelerometer.

[get]

Parameters
ctxRead / write interface definitions.(ptr)
valGet the values of st_xl in reg CTRL_REG10.(ptr)
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 4654 of file lsm9ds1_reg.c.

References LSM9DS1_CTRL_REG10, lsm9ds1_read_reg(), and lsm9ds1_ctrl_reg10_t::st_xl.

◆ lsm9ds1_xl_self_test_set()

int32_t lsm9ds1_xl_self_test_set ( const stmdev_ctx_t ctx,
uint8_t  val 
)

Enable/disable self-test mode for accelerometer.

[set]

Parameters
ctxRead / write interface definitions.(ptr)
valChange the values of st_xl in reg CTRL_REG10.
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 4628 of file lsm9ds1_reg.c.

References LSM9DS1_CTRL_REG10, lsm9ds1_read_reg(), lsm9ds1_write_reg(), and lsm9ds1_ctrl_reg10_t::st_xl.

◆ lsm9ds1_xl_trshld_axis_get()

int32_t lsm9ds1_xl_trshld_axis_get ( const stmdev_ctx_t ctx,
lsm9ds1_xl_trshld_en_t val 
)

Enable interrupt generation on threshold event.

[get]

Parameters
ctxRead / write interface definitions.(ptr)
valEnable interrupt generation on accelerometer’s X-axis low event.(ptr)
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 3264 of file lsm9ds1_reg.c.

References LSM9DS1_INT_GEN_CFG_XL, lsm9ds1_read_reg(), lsm9ds1_int_gen_cfg_xl_t::xhie_xl, lsm9ds1_xl_trshld_en_t::xhie_xl, lsm9ds1_int_gen_cfg_xl_t::xlie_xl, lsm9ds1_xl_trshld_en_t::xlie_xl, lsm9ds1_int_gen_cfg_xl_t::yhie_xl, lsm9ds1_xl_trshld_en_t::yhie_xl, lsm9ds1_int_gen_cfg_xl_t::ylie_xl, lsm9ds1_xl_trshld_en_t::ylie_xl, lsm9ds1_int_gen_cfg_xl_t::zhie_xl, lsm9ds1_xl_trshld_en_t::zhie_xl, lsm9ds1_int_gen_cfg_xl_t::zlie_xl, and lsm9ds1_xl_trshld_en_t::zlie_xl.

◆ lsm9ds1_xl_trshld_axis_set()

int32_t lsm9ds1_xl_trshld_axis_set ( const stmdev_ctx_t ctx,
lsm9ds1_xl_trshld_en_t  val 
)

Enable interrupt generation on threshold event.

[set]

Parameters
ctxRead / write interface definitions.(ptr)
valEnable interrupt generation on accelerometer’s X-axis low event.
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 3231 of file lsm9ds1_reg.c.

References LSM9DS1_INT_GEN_CFG_XL, lsm9ds1_read_reg(), lsm9ds1_write_reg(), lsm9ds1_int_gen_cfg_xl_t::xhie_xl, lsm9ds1_xl_trshld_en_t::xhie_xl, lsm9ds1_int_gen_cfg_xl_t::xlie_xl, lsm9ds1_xl_trshld_en_t::xlie_xl, lsm9ds1_int_gen_cfg_xl_t::yhie_xl, lsm9ds1_xl_trshld_en_t::yhie_xl, lsm9ds1_int_gen_cfg_xl_t::ylie_xl, lsm9ds1_xl_trshld_en_t::ylie_xl, lsm9ds1_int_gen_cfg_xl_t::zhie_xl, lsm9ds1_xl_trshld_en_t::zhie_xl, lsm9ds1_int_gen_cfg_xl_t::zlie_xl, and lsm9ds1_xl_trshld_en_t::zlie_xl.

◆ lsm9ds1_xl_trshld_get()

int32_t lsm9ds1_xl_trshld_get ( const stmdev_ctx_t ctx,
uint8_t *  buff 
)

Axis interrupt threshold.

[get]

Parameters
ctxRead / write interface definitions.(ptr)
buffBuffer that stores data read.(ptr)
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 3307 of file lsm9ds1_reg.c.

References LSM9DS1_INT_GEN_THS_X_XL, and lsm9ds1_read_reg().

◆ lsm9ds1_xl_trshld_min_sample_get()

int32_t lsm9ds1_xl_trshld_min_sample_get ( const stmdev_ctx_t ctx,
uint8_t *  val 
)

Enter/exit interrupt duration value.

[get]

Parameters
ctxRead / write interface definitions.(ptr)
valGet the values of dur_xl in reg INT_GEN_DUR_XL.(ptr)
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 3362 of file lsm9ds1_reg.c.

References lsm9ds1_int_gen_dur_xl_t::dur_xl, LSM9DS1_INT_GEN_DUR_XL, and lsm9ds1_read_reg().

◆ lsm9ds1_xl_trshld_min_sample_set()

int32_t lsm9ds1_xl_trshld_min_sample_set ( const stmdev_ctx_t ctx,
uint8_t  val 
)

Enter/exit interrupt duration value.

[set]

Parameters
ctxRead / write interface definitions.(ptr)
valChange the values of dur_xl in reg INT_GEN_DUR_XL.
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 3324 of file lsm9ds1_reg.c.

References lsm9ds1_int_gen_dur_xl_t::dur_xl, LSM9DS1_INT_GEN_DUR_XL, lsm9ds1_read_reg(), lsm9ds1_write_reg(), PROPERTY_DISABLE, PROPERTY_ENABLE, and lsm9ds1_int_gen_dur_xl_t::wait_xl.

◆ lsm9ds1_xl_trshld_set()

int32_t lsm9ds1_xl_trshld_set ( const stmdev_ctx_t ctx,
uint8_t *  buff 
)

Axis interrupt threshold.

[set]

Parameters
ctxRead / write interface definitions.(ptr)
buffBuffer that stores data to be write.(ptr)
Return values
Interfacestatus (MANDATORY: return 0 -> no Error).

Definition at line 3290 of file lsm9ds1_reg.c.

References LSM9DS1_INT_GEN_THS_X_XL, and lsm9ds1_write_reg().

◆ lsm9ds1_xl_trshld_src_get()

int32_t lsm9ds1_xl_trshld_src_get ( const stmdev_ctx_t ctx,
lsm9ds1_xl_trshld_src_t val 
)