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

configuration

configuration
[LSM6DSO]

This section groups all the functions concerning device basic configuration. More...

Functions

int32_t lsm6dso_id_get (lsm6dso_ctx_t *ctx, lsm6dso_ctx_t *aux_ctx, lsm6dso_id_t *val)
 Device "Who am I".
int32_t lsm6dso_init_set (lsm6dso_ctx_t *ctx, lsm6dso_init_t val)
 Re-initialize the device.
int32_t lsm6dso_bus_mode_set (lsm6dso_ctx_t *ctx, lsm6dso_ctx_t *aux_ctx, lsm6dso_bus_mode_t val)
 Configures the bus operating mode.
int32_t lsm6dso_bus_mode_get (lsm6dso_ctx_t *ctx, lsm6dso_ctx_t *aux_ctx, lsm6dso_bus_mode_t *val)
 Get the bus operating mode.
int32_t lsm6dso_status_get (lsm6dso_ctx_t *ctx, lsm6dso_ctx_t *aux_ctx, lsm6dso_status_t *val)
 Get the status of the device.
int32_t lsm6dso_pin_conf_set (lsm6dso_ctx_t *ctx, lsm6dso_pin_conf_t val)
 Electrical pin configuration.
int32_t lsm6dso_pin_conf_get (lsm6dso_ctx_t *ctx, lsm6dso_pin_conf_t *val)
 Electrical pin configuration.
int32_t lsm6dso_interrupt_mode_set (lsm6dso_ctx_t *ctx, lsm6dso_int_mode_t val)
 Interrupt pins hardware signal configuration.
int32_t lsm6dso_interrupt_mode_get (lsm6dso_ctx_t *ctx, lsm6dso_int_mode_t *val)
 Interrupt pins hardware signal configuration.
int32_t lsm6dso_pin_int1_route_set (lsm6dso_ctx_t *ctx, lsm6dso_pin_int1_route_t val)
 Route interrupt signals on int1 pin.
int32_t lsm6dso_pin_int1_route_get (lsm6dso_ctx_t *ctx, lsm6dso_pin_int1_route_t *val)
 Route interrupt signals on int1 pin.
int32_t lsm6dso_pin_int2_route_set (lsm6dso_ctx_t *ctx, lsm6dso_ctx_t *aux_ctx, lsm6dso_pin_int2_route_t val)
 Route interrupt signals on int2 pin.
int32_t lsm6dso_pin_int2_route_get (lsm6dso_ctx_t *ctx, lsm6dso_ctx_t *aux_ctx, lsm6dso_pin_int2_route_t *val)
 Route interrupt signals on int2 pin.
int32_t lsm6dso_all_sources_get (lsm6dso_ctx_t *ctx, lsm6dso_all_sources_t *val)
 Get the status of all the interrupt sources.
int32_t lsm6dso_mode_set (lsm6dso_ctx_t *ctx, lsm6dso_ctx_t *aux_ctx, lsm6dso_md_t *val)
 Sensor conversion parameters selection.
int32_t lsm6dso_mode_get (lsm6dso_ctx_t *ctx, lsm6dso_ctx_t *aux_ctx, lsm6dso_md_t *val)
 Sensor conversion parameters selection.
int32_t lsm6dso_data_get (lsm6dso_ctx_t *ctx, lsm6dso_ctx_t *aux_ctx, lsm6dso_md_t *md, lsm6dso_data_t *data)
 Read data in engineering unit.
int32_t lsm6dso_embedded_sens_set (lsm6dso_ctx_t *ctx, lsm6dso_emb_sens_t *val)
 Embedded functions.
int32_t lsm6dso_embedded_sens_get (lsm6dso_ctx_t *ctx, lsm6dso_emb_sens_t *emb_sens)
 Embedded functions.
int32_t lsm6dso_embedded_sens_off (lsm6dso_ctx_t *ctx)
 turn off all embedded functions.

Detailed Description

This section groups all the functions concerning device basic configuration.


Function Documentation

int32_t lsm6dso_all_sources_get ( lsm6dso_ctx_t *  ctx,
lsm6dso_all_sources_t *  val 
)

Get the status of all the interrupt sources.

[get]

Parameters:
ctxcommunication interface handler.(ptr)
valthe status of all the interrupt sources.(ptr)

Definition at line 9595 of file lsm6dso_reg.c.

int32_t lsm6dso_bus_mode_get ( lsm6dso_ctx_t *  ctx,
lsm6dso_ctx_t *  aux_ctx,
lsm6dso_bus_mode_t *  val 
)

Get the bus operating mode.

[get]

Parameters:
ctxcommunication interface handler. Use NULL to ingnore this interface.(ptr)
aux_ctxauxiliary communication interface handler. Use NULL to ingnore this interface.(ptr)
valretrieves the bus operating mode for both the main and the auxiliary interface.(ptr)

Definition at line 8709 of file lsm6dso_reg.c.

int32_t lsm6dso_bus_mode_set ( lsm6dso_ctx_t *  ctx,
lsm6dso_ctx_t *  aux_ctx,
lsm6dso_bus_mode_t  val 
)

Configures the bus operating mode.

[set]

Parameters:
ctxcommunication interface handler. Use NULL to ingnore this interface.(ptr)
aux_ctxauxiliary communication interface handler. Use NULL to ingnore this interface.(ptr)
valconfigures the bus operating mode for both the main and the auxiliary interface.

Definition at line 8623 of file lsm6dso_reg.c.

int32_t lsm6dso_data_get ( lsm6dso_ctx_t *  ctx,
lsm6dso_ctx_t *  aux_ctx,
lsm6dso_md_t *  md,
lsm6dso_data_t *  data 
)

Read data in engineering unit.

[get]

Parameters:
ctxcommunication interface handler.(ptr)
mdthe sensor conversion parameters.(ptr)

Definition at line 10510 of file lsm6dso_reg.c.

int32_t lsm6dso_embedded_sens_get ( lsm6dso_ctx_t *  ctx,
lsm6dso_emb_sens_t *  emb_sens 
)

Embedded functions.

[get]

Parameters:
ctxread / write interface definitions
valget the values of registers EMB_FUNC_EN_A e EMB_FUNC_EN_B.

Definition at line 10701 of file lsm6dso_reg.c.

int32_t lsm6dso_embedded_sens_off ( lsm6dso_ctx_t *  ctx )

turn off all embedded functions.

[get]

Parameters:
ctxread / write interface definitions
valget the values of registers EMB_FUNC_EN_A e EMB_FUNC_EN_B.

Definition at line 10740 of file lsm6dso_reg.c.

int32_t lsm6dso_embedded_sens_set ( lsm6dso_ctx_t *  ctx,
lsm6dso_emb_sens_t *  val 
)

Embedded functions.

[set]

Parameters:
ctxread / write interface definitions
valchange the values of registers EMB_FUNC_EN_A e EMB_FUNC_EN_B.

Definition at line 10654 of file lsm6dso_reg.c.

int32_t lsm6dso_id_get ( lsm6dso_ctx_t *  ctx,
lsm6dso_ctx_t *  aux_ctx,
lsm6dso_id_t *  val 
)

Device "Who am I".

[get]

Parameters:
ctxcommunication interface handler. Use NULL to ingnore this interface.(ptr)
aux_ctxauxiliary communication interface handler. Use NULL to ingnore this interface.(ptr)
valID values read from the two interfaces. ID values will be the same.(ptr)

Definition at line 8527 of file lsm6dso_reg.c.

int32_t lsm6dso_init_set ( lsm6dso_ctx_t *  ctx,
lsm6dso_init_t  val 
)

Re-initialize the device.

[set]

Parameters:
ctxcommunication interface handler.(ptr)
valre-initialization mode. Refer to datasheet and application note for more information about differencies beetween boot and sw_reset procedure.

Definition at line 8555 of file lsm6dso_reg.c.

int32_t lsm6dso_interrupt_mode_get ( lsm6dso_ctx_t *  ctx,
lsm6dso_int_mode_t *  val 
)

Interrupt pins hardware signal configuration.

[get]

Parameters:
ctxcommunication interface handler.(ptr)
valthe pins hardware signal settings.(ptr)

Definition at line 8957 of file lsm6dso_reg.c.

int32_t lsm6dso_interrupt_mode_set ( lsm6dso_ctx_t *  ctx,
lsm6dso_int_mode_t  val 
)

Interrupt pins hardware signal configuration.

[set]

Parameters:
ctxcommunication interface handler.(ptr)
valthe pins hardware signal settings.

Definition at line 8913 of file lsm6dso_reg.c.

int32_t lsm6dso_mode_get ( lsm6dso_ctx_t *  ctx,
lsm6dso_ctx_t *  aux_ctx,
lsm6dso_md_t *  val 
)

Sensor conversion parameters selection.

[get]

Parameters:
ctxcommunication interface handler. Use NULL to ingnore this interface.(ptr)
aux_ctxauxiliary communication interface handler. Use NULL to ingnore this interface.(ptr)
valget the sensor conversion parameters.(ptr)

Definition at line 10079 of file lsm6dso_reg.c.

int32_t lsm6dso_mode_set ( lsm6dso_ctx_t *  ctx,
lsm6dso_ctx_t *  aux_ctx,
lsm6dso_md_t *  val 
)

Sensor conversion parameters selection.

[set]

Parameters:
ctxcommunication interface handler. Use NULL to ingnore this interface.(ptr)
aux_ctxauxiliary communication interface handler. Use NULL to ingnore this interface.(ptr)
valset the sensor conversion parameters by checking the constraints of the device.(ptr)

Definition at line 9722 of file lsm6dso_reg.c.

int32_t lsm6dso_pin_conf_get ( lsm6dso_ctx_t *  ctx,
lsm6dso_pin_conf_t *  val 
)

Electrical pin configuration.

[get]

Parameters:
ctxcommunication interface handler.(ptr)
valthe electrical settings for the configurable pins.(ptr)

Definition at line 8882 of file lsm6dso_reg.c.

int32_t lsm6dso_pin_conf_set ( lsm6dso_ctx_t *  ctx,
lsm6dso_pin_conf_t  val 
)

Electrical pin configuration.

[set]

Parameters:
ctxcommunication interface handler.(ptr)
valthe electrical settings for the configurable pins.

Definition at line 8842 of file lsm6dso_reg.c.

int32_t lsm6dso_pin_int1_route_get ( lsm6dso_ctx_t *  ctx,
lsm6dso_pin_int1_route_t *  val 
)

Route interrupt signals on int1 pin.

[get]

Parameters:
ctxcommunication interface handler.(ptr)
valthe signals that are routed on int1 pin.(ptr)

Definition at line 9182 of file lsm6dso_reg.c.

int32_t lsm6dso_pin_int1_route_set ( lsm6dso_ctx_t *  ctx,
lsm6dso_pin_int1_route_t  val 
)

Route interrupt signals on int1 pin.

[set]

Parameters:
ctxcommunication interface handler.(ptr)
valthe signals to route on int1 pin.

Definition at line 8995 of file lsm6dso_reg.c.

int32_t lsm6dso_pin_int2_route_get ( lsm6dso_ctx_t *  ctx,
lsm6dso_ctx_t *  aux_ctx,
lsm6dso_pin_int2_route_t *  val 
)

Route interrupt signals on int2 pin.

[get]

Parameters:
ctxcommunication interface handler. Use NULL to ingnore this interface.(ptr)
aux_ctxauxiliary communication interface handler. Use NULL to ingnore this interface.(ptr)
valthe signals that are routed on int2 pin.(ptr)

Definition at line 9477 of file lsm6dso_reg.c.

int32_t lsm6dso_pin_int2_route_set ( lsm6dso_ctx_t *  ctx,
lsm6dso_ctx_t *  aux_ctx,
lsm6dso_pin_int2_route_t  val 
)

Route interrupt signals on int2 pin.

[set]

Parameters:
ctxcommunication interface handler. Use NULL to ingnore this interface.(ptr)
aux_ctxauxiliary communication interface handler. Use NULL to ingnore this interface.(ptr)
valthe signals to route on int2 pin.

Definition at line 9289 of file lsm6dso_reg.c.

int32_t lsm6dso_status_get ( lsm6dso_ctx_t *  ctx,
lsm6dso_ctx_t *  aux_ctx,
lsm6dso_status_t *  val 
)

Get the status of the device.

[get]

Parameters:
ctxcommunication interface handler. Use NULL to ingnore this interface.(ptr)
aux_ctxauxiliary communication interface handler. Use NULL to ingnore this interface.(ptr)
valthe status of the device.(ptr)

Definition at line 8799 of file lsm6dso_reg.c.