iNEMO inertial module: 3D accelerometer and 3D gyroscope.

Dependencies:   X_NUCLEO_COMMON ST_INTERFACES

Dependents:   X_NUCLEO_IKS01A3 X_NUCLEO_IKS01A3

Embed: (wiki syntax)

« Back to documentation index

LSM6DSO_Sensor_hub

LSM6DSO_Sensor_hub
[LSM6DSO]

This section groups all the functions that manage the sensor hub. More...

Functions

int32_t lsm6dso_sh_read_data_raw_get (lsm6dso_ctx_t *ctx, uint8_t *val, uint8_t len)
 Sensor hub output registers.
int32_t lsm6dso_sh_slave_connected_set (lsm6dso_ctx_t *ctx, lsm6dso_aux_sens_on_t val)
 Number of external sensors to be read by the sensor hub.
int32_t lsm6dso_sh_slave_connected_get (lsm6dso_ctx_t *ctx, lsm6dso_aux_sens_on_t *val)
 Number of external sensors to be read by the sensor hub.
int32_t lsm6dso_sh_master_set (lsm6dso_ctx_t *ctx, uint8_t val)
 Sensor hub I2C master enable.
int32_t lsm6dso_sh_master_get (lsm6dso_ctx_t *ctx, uint8_t *val)
 Sensor hub I2C master enable.
int32_t lsm6dso_sh_pin_mode_set (lsm6dso_ctx_t *ctx, lsm6dso_shub_pu_en_t val)
 Master I2C pull-up enable.
int32_t lsm6dso_sh_pin_mode_get (lsm6dso_ctx_t *ctx, lsm6dso_shub_pu_en_t *val)
 Master I2C pull-up enable.
int32_t lsm6dso_sh_pass_through_set (lsm6dso_ctx_t *ctx, uint8_t val)
 I2C interface pass-through.
int32_t lsm6dso_sh_pass_through_get (lsm6dso_ctx_t *ctx, uint8_t *val)
 I2C interface pass-through.
int32_t lsm6dso_sh_syncro_mode_set (lsm6dso_ctx_t *ctx, lsm6dso_start_config_t val)
 Sensor hub trigger signal selection.
int32_t lsm6dso_sh_syncro_mode_get (lsm6dso_ctx_t *ctx, lsm6dso_start_config_t *val)
 Sensor hub trigger signal selection.
int32_t lsm6dso_sh_write_mode_set (lsm6dso_ctx_t *ctx, lsm6dso_write_once_t val)
 Slave 0 write operation is performed only at the first sensor hub cycle.
int32_t lsm6dso_sh_write_mode_get (lsm6dso_ctx_t *ctx, lsm6dso_write_once_t *val)
 Slave 0 write operation is performed only at the first sensor hub cycle.
int32_t lsm6dso_sh_reset_set (lsm6dso_ctx_t *ctx)
 Reset Master logic and output registers.
int32_t lsm6dso_sh_reset_get (lsm6dso_ctx_t *ctx, uint8_t *val)
 Reset Master logic and output registers.
int32_t lsm6dso_sh_data_rate_set (lsm6dso_ctx_t *ctx, lsm6dso_shub_odr_t val)
 Rate at which the master communicates.
int32_t lsm6dso_sh_data_rate_get (lsm6dso_ctx_t *ctx, lsm6dso_shub_odr_t *val)
 Rate at which the master communicates.
int32_t lsm6dso_sh_cfg_write (lsm6dso_ctx_t *ctx, lsm6dso_sh_cfg_write_t *val)
 Configure slave 0 for perform a write.
int32_t lsm6dso_sh_slv0_cfg_read (lsm6dso_ctx_t *ctx, lsm6dso_sh_cfg_read_t *val)
 Configure slave 0 for perform a read.
int32_t lsm6dso_sh_slv1_cfg_read (lsm6dso_ctx_t *ctx, lsm6dso_sh_cfg_read_t *val)
 Configure slave 0 for perform a write/read.
int32_t lsm6dso_sh_slv2_cfg_read (lsm6dso_ctx_t *ctx, lsm6dso_sh_cfg_read_t *val)
 Configure slave 0 for perform a write/read.
int32_t lsm6dso_sh_slv3_cfg_read (lsm6dso_ctx_t *ctx, lsm6dso_sh_cfg_read_t *val)
 Configure slave 0 for perform a write/read.
int32_t lsm6dso_sh_status_get (lsm6dso_ctx_t *ctx, lsm6dso_status_master_t *val)
 Sensor hub source register.

Detailed Description

This section groups all the functions that manage the sensor hub.


Function Documentation

int32_t lsm6dso_sh_cfg_write ( lsm6dso_ctx_t *  ctx,
lsm6dso_sh_cfg_write_t *  val 
)

Configure slave 0 for perform a write.

[set]

Parameters:
ctxread / write interface definitions
vala structure that contain

  • uint8_t slv1_add; 8 bit i2c device address
  • uint8_t slv1_subadd; 8 bit register device address
  • uint8_t slv1_data; 8 bit data to write

Definition at line 8285 of file lsm6dso_reg.c.

int32_t lsm6dso_sh_data_rate_get ( lsm6dso_ctx_t *  ctx,
lsm6dso_shub_odr_t *  val 
)

Rate at which the master communicates.

[get]

Parameters:
ctxread / write interface definitions
valGet the values of shub_odr in reg slv1_CONFIG

Definition at line 8241 of file lsm6dso_reg.c.

int32_t lsm6dso_sh_data_rate_set ( lsm6dso_ctx_t *  ctx,
lsm6dso_shub_odr_t  val 
)

Rate at which the master communicates.

[set]

Parameters:
ctxread / write interface definitions
valchange the values of shub_odr in reg slv1_CONFIG

Definition at line 8214 of file lsm6dso_reg.c.

int32_t lsm6dso_sh_master_get ( lsm6dso_ctx_t *  ctx,
uint8_t *  val 
)

Sensor hub I2C master enable.

[get]

Parameters:
ctxread / write interface definitions
valchange the values of master_on in reg MASTER_CONFIG

Definition at line 7895 of file lsm6dso_reg.c.

int32_t lsm6dso_sh_master_set ( lsm6dso_ctx_t *  ctx,
uint8_t  val 
)

Sensor hub I2C master enable.

[set]

Parameters:
ctxread / write interface definitions
valchange the values of master_on in reg MASTER_CONFIG

Definition at line 7869 of file lsm6dso_reg.c.

int32_t lsm6dso_sh_pass_through_get ( lsm6dso_ctx_t *  ctx,
uint8_t *  val 
)

I2C interface pass-through.

[get]

Parameters:
ctxread / write interface definitions
valchange the values of pass_through_mode in reg MASTER_CONFIG

Definition at line 8010 of file lsm6dso_reg.c.

int32_t lsm6dso_sh_pass_through_set ( lsm6dso_ctx_t *  ctx,
uint8_t  val 
)

I2C interface pass-through.

[set]

Parameters:
ctxread / write interface definitions
valchange the values of pass_through_mode in reg MASTER_CONFIG

Definition at line 7982 of file lsm6dso_reg.c.

int32_t lsm6dso_sh_pin_mode_get ( lsm6dso_ctx_t *  ctx,
lsm6dso_shub_pu_en_t *  val 
)

Master I2C pull-up enable.

[get]

Parameters:
ctxread / write interface definitions
valGet the values of shub_pu_en in reg MASTER_CONFIG

Definition at line 7946 of file lsm6dso_reg.c.

int32_t lsm6dso_sh_pin_mode_set ( lsm6dso_ctx_t *  ctx,
lsm6dso_shub_pu_en_t  val 
)

Master I2C pull-up enable.

[set]

Parameters:
ctxread / write interface definitions
valchange the values of shub_pu_en in reg MASTER_CONFIG

Definition at line 7919 of file lsm6dso_reg.c.

int32_t lsm6dso_sh_read_data_raw_get ( lsm6dso_ctx_t *  ctx,
uint8_t *  val,
uint8_t  len 
)

Sensor hub output registers.

[get]

Parameters:
ctxread / write interface definitions
valvalues read from registers SENSOR_HUB_1 to SENSOR_HUB_18
lennumber of consecutive register to read (max 18)

Definition at line 7778 of file lsm6dso_reg.c.

int32_t lsm6dso_sh_reset_get ( lsm6dso_ctx_t *  ctx,
uint8_t *  val 
)

Reset Master logic and output registers.

[get]

Parameters:
ctxread / write interface definitions
valchange the values of rst_master_regs in reg MASTER_CONFIG

Definition at line 8191 of file lsm6dso_reg.c.

int32_t lsm6dso_sh_reset_set ( lsm6dso_ctx_t *  ctx )

Reset Master logic and output registers.

[set]

Parameters:
ctxread / write interface definitions

Definition at line 8160 of file lsm6dso_reg.c.

int32_t lsm6dso_sh_slave_connected_get ( lsm6dso_ctx_t *  ctx,
lsm6dso_aux_sens_on_t *  val 
)

Number of external sensors to be read by the sensor hub.

[get]

Parameters:
ctxread / write interface definitions
valGet the values of aux_sens_on in reg MASTER_CONFIG

Definition at line 7828 of file lsm6dso_reg.c.

int32_t lsm6dso_sh_slave_connected_set ( lsm6dso_ctx_t *  ctx,
lsm6dso_aux_sens_on_t  val 
)

Number of external sensors to be read by the sensor hub.

[set]

Parameters:
ctxread / write interface definitions
valchange the values of aux_sens_on in reg MASTER_CONFIG

Definition at line 7801 of file lsm6dso_reg.c.

int32_t lsm6dso_sh_slv0_cfg_read ( lsm6dso_ctx_t *  ctx,
lsm6dso_sh_cfg_read_t *  val 
)

Configure slave 0 for perform a read.

[set]

Parameters:
ctxread / write interface definitions
valStructure that contain

  • uint8_t slv1_add; 8 bit i2c device address
  • uint8_t slv1_subadd; 8 bit register device address
  • uint8_t slv1_len; num of bit to read

Definition at line 8320 of file lsm6dso_reg.c.

int32_t lsm6dso_sh_slv1_cfg_read ( lsm6dso_ctx_t *  ctx,
lsm6dso_sh_cfg_read_t *  val 
)

Configure slave 0 for perform a write/read.

[set]

Parameters:
ctxread / write interface definitions
valStructure that contain

  • uint8_t slv1_add; 8 bit i2c device address
  • uint8_t slv1_subadd; 8 bit register device address
  • uint8_t slv1_len; num of bit to read

Definition at line 8363 of file lsm6dso_reg.c.

int32_t lsm6dso_sh_slv2_cfg_read ( lsm6dso_ctx_t *  ctx,
lsm6dso_sh_cfg_read_t *  val 
)

Configure slave 0 for perform a write/read.

[set]

Parameters:
ctxread / write interface definitions
valStructure that contain

  • uint8_t slv2_add; 8 bit i2c device address
  • uint8_t slv2_subadd; 8 bit register device address
  • uint8_t slv2_len; num of bit to read

Definition at line 8406 of file lsm6dso_reg.c.

int32_t lsm6dso_sh_slv3_cfg_read ( lsm6dso_ctx_t *  ctx,
lsm6dso_sh_cfg_read_t *  val 
)

Configure slave 0 for perform a write/read.

[set]

Parameters:
ctxread / write interface definitions
valStructure that contain

  • uint8_t slv3_add; 8 bit i2c device address
  • uint8_t slv3_subadd; 8 bit register device address
  • uint8_t slv3_len; num of bit to read

Definition at line 8448 of file lsm6dso_reg.c.

int32_t lsm6dso_sh_status_get ( lsm6dso_ctx_t *  ctx,
lsm6dso_status_master_t *  val 
)

Sensor hub source register.

[get]

Parameters:
ctxread / write interface definitions
valunion of registers from STATUS_MASTER to

Definition at line 8487 of file lsm6dso_reg.c.

int32_t lsm6dso_sh_syncro_mode_get ( lsm6dso_ctx_t *  ctx,
lsm6dso_start_config_t *  val 
)

Sensor hub trigger signal selection.

[get]

Parameters:
ctxread / write interface definitions
valGet the values of start_config in reg MASTER_CONFIG

Definition at line 8062 of file lsm6dso_reg.c.

int32_t lsm6dso_sh_syncro_mode_set ( lsm6dso_ctx_t *  ctx,
lsm6dso_start_config_t  val 
)

Sensor hub trigger signal selection.

[set]

Parameters:
ctxread / write interface definitions
valchange the values of start_config in reg MASTER_CONFIG

Definition at line 8034 of file lsm6dso_reg.c.

int32_t lsm6dso_sh_write_mode_get ( lsm6dso_ctx_t *  ctx,
lsm6dso_write_once_t *  val 
)

Slave 0 write operation is performed only at the first sensor hub cycle.

[get]

Parameters:
ctxread / write interface definitions
valGet the values of write_once in reg MASTER_CONFIG

Definition at line 8126 of file lsm6dso_reg.c.

int32_t lsm6dso_sh_write_mode_set ( lsm6dso_ctx_t *  ctx,
lsm6dso_write_once_t  val 
)

Slave 0 write operation is performed only at the first sensor hub cycle.

[set]

Parameters:
ctxread / write interface definitions
valchange the values of write_once in reg MASTER_CONFIG

Definition at line 8097 of file lsm6dso_reg.c.