ST / IIS2DLPC

Dependencies:   X_NUCLEO_COMMON ST_INTERFACES

Embed: (wiki syntax)

« Back to documentation index

IIS2DLPC_Data_Generation

IIS2DLPC_Data_Generation
[IIS2DLPC]

This section groups all the functions concerning data generation. More...

Functions

int32_t iis2dlpc_power_mode_set (iis2dlpc_ctx_t *ctx, iis2dlpc_mode_t val)
 Select accelerometer operating modes.
int32_t iis2dlpc_power_mode_get (iis2dlpc_ctx_t *ctx, iis2dlpc_mode_t *val)
 Select accelerometer operating modes.
int32_t iis2dlpc_data_rate_set (iis2dlpc_ctx_t *ctx, iis2dlpc_odr_t val)
 Accelerometer data rate selection.
int32_t iis2dlpc_data_rate_get (iis2dlpc_ctx_t *ctx, iis2dlpc_odr_t *val)
 Accelerometer data rate selection.
int32_t iis2dlpc_block_data_update_set (iis2dlpc_ctx_t *ctx, uint8_t val)
 Block data update.
int32_t iis2dlpc_block_data_update_get (iis2dlpc_ctx_t *ctx, uint8_t *val)
 Block data update.
int32_t iis2dlpc_full_scale_set (iis2dlpc_ctx_t *ctx, iis2dlpc_fs_t val)
 Accelerometer full-scale selection.
int32_t iis2dlpc_full_scale_get (iis2dlpc_ctx_t *ctx, iis2dlpc_fs_t *val)
 Accelerometer full-scale selection.
int32_t iis2dlpc_status_reg_get (iis2dlpc_ctx_t *ctx, iis2dlpc_status_t *val)
 The STATUS_REG register of the device.
int32_t iis2dlpc_flag_data_ready_get (iis2dlpc_ctx_t *ctx, uint8_t *val)
 Accelerometer new data available.
int32_t iis2dlpc_all_sources_get (iis2dlpc_ctx_t *ctx, iis2dlpc_all_sources_t *val)
 Read all the interrupt/status flag of the device.
int32_t iis2dlpc_usr_offset_x_set (iis2dlpc_ctx_t *ctx, uint8_t *buff)
 Accelerometer X-axis user offset correction expressed in two’s complement, weight depends on bit USR_OFF_W.
int32_t iis2dlpc_usr_offset_x_get (iis2dlpc_ctx_t *ctx, uint8_t *buff)
 Accelerometer X-axis user offset correction expressed in two’s complement, weight depends on bit USR_OFF_W.
int32_t iis2dlpc_usr_offset_y_set (iis2dlpc_ctx_t *ctx, uint8_t *buff)
 Accelerometer Y-axis user offset correction expressed in two’s complement, weight depends on bit USR_OFF_W.
int32_t iis2dlpc_usr_offset_y_get (iis2dlpc_ctx_t *ctx, uint8_t *buff)
 Accelerometer Y-axis user offset correction expressed in two’s complement, weight depends on bit USR_OFF_W.
int32_t iis2dlpc_usr_offset_z_set (iis2dlpc_ctx_t *ctx, uint8_t *buff)
 Accelerometer Z-axis user offset correction expressed in two’s complement, weight depends on bit USR_OFF_W.
int32_t iis2dlpc_usr_offset_z_get (iis2dlpc_ctx_t *ctx, uint8_t *buff)
 Accelerometer Z-axis user offset correction expressed in two’s complement, weight depends on bit USR_OFF_W.
int32_t iis2dlpc_offset_weight_set (iis2dlpc_ctx_t *ctx, iis2dlpc_usr_off_w_t val)
 Weight of XL user offset bits of registers X_OFS_USR, Y_OFS_USR, Z_OFS_USR.
int32_t iis2dlpc_offset_weight_get (iis2dlpc_ctx_t *ctx, iis2dlpc_usr_off_w_t *val)
 Weight of XL user offset bits of registers X_OFS_USR, Y_OFS_USR, Z_OFS_USR.

Detailed Description

This section groups all the functions concerning data generation.


Function Documentation

int32_t iis2dlpc_all_sources_get ( iis2dlpc_ctx_t *  ctx,
iis2dlpc_all_sources_t *  val 
)

Read all the interrupt/status flag of the device.

[get]

Parameters:
ctxread / write interface definitions
valregisters STATUS_DUP, WAKE_UP_SRC, TAP_SRC, SIXD_SRC, ALL_INT_SRC
Return values:
interfacestatus (MANDATORY: return 0 -> no Error)

Definition at line 511 of file iis2dlpc_reg.c.

int32_t iis2dlpc_block_data_update_get ( iis2dlpc_ctx_t *  ctx,
uint8_t *  val 
)

Block data update.

[get]

Parameters:
ctxread / write interface definitions
valchange the values of bdu in reg CTRL2
Return values:
interfacestatus (MANDATORY: return 0 -> no Error)

Definition at line 402 of file iis2dlpc_reg.c.

int32_t iis2dlpc_block_data_update_set ( iis2dlpc_ctx_t *  ctx,
uint8_t  val 
)

Block data update.

[set]

Parameters:
ctxread / write interface definitions
valchange the values of bdu in reg CTRL2
Return values:
interfacestatus (MANDATORY: return 0 -> no Error)

Definition at line 381 of file iis2dlpc_reg.c.

int32_t iis2dlpc_data_rate_get ( iis2dlpc_ctx_t *  ctx,
iis2dlpc_odr_t *  val 
)

Accelerometer data rate selection.

[get]

Parameters:
ctxread / write interface definitions
valGet the values of odr in reg CTRL1
Return values:
interfacestatus (MANDATORY: return 0 -> no Error)

Definition at line 318 of file iis2dlpc_reg.c.

int32_t iis2dlpc_data_rate_set ( iis2dlpc_ctx_t *  ctx,
iis2dlpc_odr_t  val 
)

Accelerometer data rate selection.

[set]

Parameters:
ctxread / write interface definitions
valchange the values of odr in reg CTRL1
Return values:
interfacestatus (MANDATORY: return 0 -> no Error)

Definition at line 287 of file iis2dlpc_reg.c.

int32_t iis2dlpc_flag_data_ready_get ( iis2dlpc_ctx_t *  ctx,
uint8_t *  val 
)

Accelerometer new data available.

[get]

Parameters:
ctxread / write interface definitions
valchange the values of drdy in reg STATUS
Return values:
interfacestatus (MANDATORY: return 0 -> no Error)

Definition at line 492 of file iis2dlpc_reg.c.

int32_t iis2dlpc_full_scale_get ( iis2dlpc_ctx_t *  ctx,
iis2dlpc_fs_t *  val 
)

Accelerometer full-scale selection.

[get]

Parameters:
ctxread / write interface definitions
valGet the values of fs in reg CTRL6
Return values:
interfacestatus (MANDATORY: return 0 -> no Error)

Definition at line 442 of file iis2dlpc_reg.c.

int32_t iis2dlpc_full_scale_set ( iis2dlpc_ctx_t *  ctx,
iis2dlpc_fs_t  val 
)

Accelerometer full-scale selection.

[set]

Parameters:
ctxread / write interface definitions
valchange the values of fs in reg CTRL6
Return values:
interfacestatus (MANDATORY: return 0 -> no Error)

Definition at line 421 of file iis2dlpc_reg.c.

int32_t iis2dlpc_offset_weight_get ( iis2dlpc_ctx_t *  ctx,
iis2dlpc_usr_off_w_t *  val 
)

Weight of XL user offset bits of registers X_OFS_USR, Y_OFS_USR, Z_OFS_USR.

[get]

Parameters:
ctxread / write interface definitions
valGet the values of usr_off_w in reg CTRL_REG7
Return values:
interfacestatus (MANDATORY: return 0 -> no Error)

Definition at line 654 of file iis2dlpc_reg.c.

int32_t iis2dlpc_offset_weight_set ( iis2dlpc_ctx_t *  ctx,
iis2dlpc_usr_off_w_t  val 
)

Weight of XL user offset bits of registers X_OFS_USR, Y_OFS_USR, Z_OFS_USR.

[set]

Parameters:
ctxread / write interface definitions
valchange the values of usr_off_w in reg CTRL_REG7
Return values:
interfacestatus (MANDATORY: return 0 -> no Error)

Definition at line 631 of file iis2dlpc_reg.c.

int32_t iis2dlpc_power_mode_get ( iis2dlpc_ctx_t *  ctx,
iis2dlpc_mode_t *  val 
)

Select accelerometer operating modes.

[get]

Parameters:
ctxread / write interface definitions
valchange the values of mode / lp_mode in reg CTRL1 and low_noise in reg CTRL6
Return values:
interfacestatus (MANDATORY: return 0 -> no Error)

Definition at line 205 of file iis2dlpc_reg.c.

int32_t iis2dlpc_power_mode_set ( iis2dlpc_ctx_t *  ctx,
iis2dlpc_mode_t  val 
)

Select accelerometer operating modes.

[set]

Parameters:
ctxread / write interface definitions
valchange the values of mode / lp_mode in reg CTRL1 and low_noise in reg CTRL6
Return values:
interfacestatus (MANDATORY: return 0 -> no Error)

Definition at line 172 of file iis2dlpc_reg.c.

int32_t iis2dlpc_status_reg_get ( iis2dlpc_ctx_t *  ctx,
iis2dlpc_status_t *  val 
)

The STATUS_REG register of the device.

[get]

Parameters:
ctxread / write interface definitions
valunion of registers from STATUS to
Return values:
interfacestatus (MANDATORY: return 0 -> no Error)

Definition at line 477 of file iis2dlpc_reg.c.

int32_t iis2dlpc_usr_offset_x_get ( iis2dlpc_ctx_t *  ctx,
uint8_t *  buff 
)

Accelerometer X-axis user offset correction expressed in two’s complement, weight depends on bit USR_OFF_W.

The value must be in the range [-127 127].[get]

Parameters:
ctxread / write interface definitions
buffbuffer that stores data read
Return values:
interfacestatus (MANDATORY: return 0 -> no Error)

Definition at line 546 of file iis2dlpc_reg.c.

int32_t iis2dlpc_usr_offset_x_set ( iis2dlpc_ctx_t *  ctx,
uint8_t *  buff 
)

Accelerometer X-axis user offset correction expressed in two’s complement, weight depends on bit USR_OFF_W.

The value must be in the range [-127 127].[set]

Parameters:
ctxread / write interface definitions
buffbuffer that contains data to write
Return values:
interfacestatus (MANDATORY: return 0 -> no Error)

Definition at line 529 of file iis2dlpc_reg.c.

int32_t iis2dlpc_usr_offset_y_get ( iis2dlpc_ctx_t *  ctx,
uint8_t *  buff 
)

Accelerometer Y-axis user offset correction expressed in two’s complement, weight depends on bit USR_OFF_W.

The value must be in the range [-127 127].[get]

Parameters:
ctxread / write interface definitions
buffbuffer that stores data read
Return values:
interfacestatus (MANDATORY: return 0 -> no Error)

Definition at line 580 of file iis2dlpc_reg.c.

int32_t iis2dlpc_usr_offset_y_set ( iis2dlpc_ctx_t *  ctx,
uint8_t *  buff 
)

Accelerometer Y-axis user offset correction expressed in two’s complement, weight depends on bit USR_OFF_W.

The value must be in the range [-127 127].[set]

Parameters:
ctxread / write interface definitions
buffbuffer that contains data to write
Return values:
interfacestatus (MANDATORY: return 0 -> no Error)

Definition at line 563 of file iis2dlpc_reg.c.

int32_t iis2dlpc_usr_offset_z_get ( iis2dlpc_ctx_t *  ctx,
uint8_t *  buff 
)

Accelerometer Z-axis user offset correction expressed in two’s complement, weight depends on bit USR_OFF_W.

The value must be in the range [-127 127].[get]

Parameters:
ctxread / write interface definitions
buffbuffer that stores data read
Return values:
interfacestatus (MANDATORY: return 0 -> no Error)

Definition at line 614 of file iis2dlpc_reg.c.

int32_t iis2dlpc_usr_offset_z_set ( iis2dlpc_ctx_t *  ctx,
uint8_t *  buff 
)

Accelerometer Z-axis user offset correction expressed in two’s complement, weight depends on bit USR_OFF_W.

The value must be in the range [-127 127].[set]

Parameters:
ctxread / write interface definitions
buffbuffer that contains data to write
Return values:
interfacestatus (MANDATORY: return 0 -> no Error)

Definition at line 597 of file iis2dlpc_reg.c.