ST / LSM6DSOX

Dependencies:   X_NUCLEO_COMMON ST_INTERFACES

Embed: (wiki syntax)

« Back to documentation index

configuration

configuration

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

Functions

int32_t lsm6dsox_id_get (lsm6dsox_ctx_t *ctx, lsm6dsox_ctx_t *aux_ctx, lsm6dsox_id_t *val)
 Device "Who am I".
int32_t lsm6dsox_init_set (lsm6dsox_ctx_t *ctx, lsm6dsox_init_t val)
 Re-initialize the device.
int32_t lsm6dsox_bus_mode_set (lsm6dsox_ctx_t *ctx, lsm6dsox_ctx_t *aux_ctx, lsm6dsox_bus_mode_t val)
 Configures the bus operating mode.
int32_t lsm6dsox_bus_mode_get (lsm6dsox_ctx_t *ctx, lsm6dsox_ctx_t *aux_ctx, lsm6dsox_bus_mode_t *val)
 Get the bus operating mode.
int32_t lsm6dsox_status_get (lsm6dsox_ctx_t *ctx, lsm6dsox_ctx_t *aux_ctx, lsm6dsox_status_t *val)
 Get the status of the device.
int32_t lsm6dsox_pin_conf_set (lsm6dsox_ctx_t *ctx, lsm6dsox_pin_conf_t val)
 Electrical pin configuration.
int32_t lsm6dsox_pin_conf_get (lsm6dsox_ctx_t *ctx, lsm6dsox_pin_conf_t *val)
 Electrical pin configuration.
int32_t lsm6dsox_interrupt_mode_set (lsm6dsox_ctx_t *ctx, lsm6dsox_int_mode_t val)
 Interrupt pins hardware signal configuration.
int32_t lsm6dsox_interrupt_mode_get (lsm6dsox_ctx_t *ctx, lsm6dsox_int_mode_t *val)
 Interrupt pins hardware signal configuration.
int32_t lsm6dsox_pin_int1_route_set (lsm6dsox_ctx_t *ctx, lsm6dsox_pin_int1_route_t val)
 Route interrupt signals on int1 pin.
int32_t lsm6dsox_pin_int1_route_get (lsm6dsox_ctx_t *ctx, lsm6dsox_pin_int1_route_t *val)
 Route interrupt signals on int1 pin.
int32_t lsm6dsox_pin_int2_route_set (lsm6dsox_ctx_t *ctx, lsm6dsox_ctx_t *aux_ctx, lsm6dsox_pin_int2_route_t val)
 Route interrupt signals on int2 pin.
int32_t lsm6dsox_pin_int2_route_get (lsm6dsox_ctx_t *ctx, lsm6dsox_ctx_t *aux_ctx, lsm6dsox_pin_int2_route_t *val)
 Route interrupt signals on int2 pin.
int32_t lsm6dsox_all_sources_get (lsm6dsox_ctx_t *ctx, lsm6dsox_all_sources_t *val)
 Get the status of all the interrupt sources.
int32_t lsm6dsox_mode_set (lsm6dsox_ctx_t *ctx, lsm6dsox_ctx_t *aux_ctx, lsm6dsox_md_t *val)
 Sensor conversion parameters selection.
int32_t lsm6dsox_mode_get (lsm6dsox_ctx_t *ctx, lsm6dsox_ctx_t *aux_ctx, lsm6dsox_md_t *val)
 Sensor conversion parameters selection.
int32_t lsm6dsox_data_get (lsm6dsox_ctx_t *ctx, lsm6dsox_ctx_t *aux_ctx, lsm6dsox_md_t *md, lsm6dsox_data_t *data)
 Read data in engineering unit.
int32_t lsm6dsox_embedded_sens_set (lsm6dsox_ctx_t *ctx, lsm6dsox_emb_sens_t *val)
 Embedded functions.
int32_t lsm6dsox_embedded_sens_get (lsm6dsox_ctx_t *ctx, lsm6dsox_emb_sens_t *emb_sens)
 Embedded functions.
int32_t lsm6dsox_embedded_sens_off (lsm6dsox_ctx_t *ctx)
 turn off all embedded functions.

Detailed Description

This section groups all the functions concerning device basic configuration.


Function Documentation

int32_t lsm6dsox_all_sources_get ( lsm6dsox_ctx_t *  ctx,
lsm6dsox_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 10340 of file lsm6dsox_reg.c.

int32_t lsm6dsox_bus_mode_get ( lsm6dsox_ctx_t *  ctx,
lsm6dsox_ctx_t *  aux_ctx,
lsm6dsox_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 9373 of file lsm6dsox_reg.c.

int32_t lsm6dsox_bus_mode_set ( lsm6dsox_ctx_t *  ctx,
lsm6dsox_ctx_t *  aux_ctx,
lsm6dsox_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 9287 of file lsm6dsox_reg.c.

int32_t lsm6dsox_data_get ( lsm6dsox_ctx_t *  ctx,
lsm6dsox_ctx_t *  aux_ctx,
lsm6dsox_md_t *  md,
lsm6dsox_data_t *  data 
)

Read data in engineering unit.

[get]

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

Definition at line 11431 of file lsm6dsox_reg.c.

int32_t lsm6dsox_embedded_sens_get ( lsm6dsox_ctx_t *  ctx,
lsm6dsox_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 11628 of file lsm6dsox_reg.c.

int32_t lsm6dsox_embedded_sens_off ( lsm6dsox_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 11667 of file lsm6dsox_reg.c.

int32_t lsm6dsox_embedded_sens_set ( lsm6dsox_ctx_t *  ctx,
lsm6dsox_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 11581 of file lsm6dsox_reg.c.

int32_t lsm6dsox_id_get ( lsm6dsox_ctx_t *  ctx,
lsm6dsox_ctx_t *  aux_ctx,
lsm6dsox_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 9189 of file lsm6dsox_reg.c.

int32_t lsm6dsox_init_set ( lsm6dsox_ctx_t *  ctx,
lsm6dsox_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 9217 of file lsm6dsox_reg.c.

int32_t lsm6dsox_interrupt_mode_get ( lsm6dsox_ctx_t *  ctx,
lsm6dsox_int_mode_t *  val 
)

Interrupt pins hardware signal configuration.

[get]

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

Definition at line 9631 of file lsm6dsox_reg.c.

int32_t lsm6dsox_interrupt_mode_set ( lsm6dsox_ctx_t *  ctx,
lsm6dsox_int_mode_t  val 
)

Interrupt pins hardware signal configuration.

[set]

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

Definition at line 9587 of file lsm6dsox_reg.c.

int32_t lsm6dsox_mode_get ( lsm6dsox_ctx_t *  ctx,
lsm6dsox_ctx_t *  aux_ctx,
lsm6dsox_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 10901 of file lsm6dsox_reg.c.

int32_t lsm6dsox_mode_set ( lsm6dsox_ctx_t *  ctx,
lsm6dsox_ctx_t *  aux_ctx,
lsm6dsox_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 10478 of file lsm6dsox_reg.c.

int32_t lsm6dsox_pin_conf_get ( lsm6dsox_ctx_t *  ctx,
lsm6dsox_pin_conf_t *  val 
)

Electrical pin configuration.

[get]

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

Definition at line 9556 of file lsm6dsox_reg.c.

int32_t lsm6dsox_pin_conf_set ( lsm6dsox_ctx_t *  ctx,
lsm6dsox_pin_conf_t  val 
)

Electrical pin configuration.

[set]

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

Definition at line 9516 of file lsm6dsox_reg.c.

int32_t lsm6dsox_pin_int1_route_get ( lsm6dsox_ctx_t *  ctx,
lsm6dsox_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 9878 of file lsm6dsox_reg.c.

int32_t lsm6dsox_pin_int1_route_set ( lsm6dsox_ctx_t *  ctx,
lsm6dsox_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 9669 of file lsm6dsox_reg.c.

int32_t lsm6dsox_pin_int2_route_get ( lsm6dsox_ctx_t *  ctx,
lsm6dsox_ctx_t *  aux_ctx,
lsm6dsox_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 10209 of file lsm6dsox_reg.c.

int32_t lsm6dsox_pin_int2_route_set ( lsm6dsox_ctx_t *  ctx,
lsm6dsox_ctx_t *  aux_ctx,
lsm6dsox_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 9999 of file lsm6dsox_reg.c.

int32_t lsm6dsox_status_get ( lsm6dsox_ctx_t *  ctx,
lsm6dsox_ctx_t *  aux_ctx,
lsm6dsox_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 9463 of file lsm6dsox_reg.c.