3-axis MEMS ultra low power accelerometer

Dependencies:   X_NUCLEO_COMMON ST_INTERFACES

Dependents:   X_NUCLEO_IKS01A3 X_NUCLEO_IKS01A3

Embed: (wiki syntax)

« Back to documentation index

LIS2DW12_Common

LIS2DW12_Common
[LIS2DW12]

This section groups common useful functions. More...

Functions

int32_t lis2dw12_device_id_get (lis2dw12_ctx_t *ctx, uint8_t *buff)
 Device Who am I.
int32_t lis2dw12_auto_increment_set (lis2dw12_ctx_t *ctx, uint8_t val)
 Register address automatically incremented during multiple byte access with a serial interface.
int32_t lis2dw12_auto_increment_get (lis2dw12_ctx_t *ctx, uint8_t *val)
 Register address automatically incremented during multiple byte access with a serial interface.
int32_t lis2dw12_reset_set (lis2dw12_ctx_t *ctx, uint8_t val)
 Software reset.
int32_t lis2dw12_reset_get (lis2dw12_ctx_t *ctx, uint8_t *val)
 Software reset.
int32_t lis2dw12_boot_set (lis2dw12_ctx_t *ctx, uint8_t val)
 Reboot memory content.
int32_t lis2dw12_boot_get (lis2dw12_ctx_t *ctx, uint8_t *val)
 Reboot memory content.
int32_t lis2dw12_self_test_set (lis2dw12_ctx_t *ctx, lis2dw12_st_t val)
 Sensor self-test enable.
int32_t lis2dw12_self_test_get (lis2dw12_ctx_t *ctx, lis2dw12_st_t *val)
 Sensor self-test enable.
int32_t lis2dw12_data_ready_mode_set (lis2dw12_ctx_t *ctx, lis2dw12_drdy_pulsed_t val)
 Data-ready pulsed / letched mode.
int32_t lis2dw12_data_ready_mode_get (lis2dw12_ctx_t *ctx, lis2dw12_drdy_pulsed_t *val)
 Data-ready pulsed / letched mode.

Detailed Description

This section groups common useful functions.


Function Documentation

int32_t lis2dw12_auto_increment_get ( lis2dw12_ctx_t *  ctx,
uint8_t *  val 
)

Register address automatically incremented during multiple byte access with a serial interface.

[get]

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

Definition at line 773 of file lis2dw12_reg.c.

int32_t lis2dw12_auto_increment_set ( lis2dw12_ctx_t *  ctx,
uint8_t  val 
)

Register address automatically incremented during multiple byte access with a serial interface.

[set]

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

Definition at line 751 of file lis2dw12_reg.c.

int32_t lis2dw12_boot_get ( lis2dw12_ctx_t *  ctx,
uint8_t *  val 
)

Reboot memory content.

Reload the calibration parameters.[get]

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

Definition at line 854 of file lis2dw12_reg.c.

int32_t lis2dw12_boot_set ( lis2dw12_ctx_t *  ctx,
uint8_t  val 
)

Reboot memory content.

Reload the calibration parameters.[set]

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

Definition at line 833 of file lis2dw12_reg.c.

int32_t lis2dw12_data_ready_mode_get ( lis2dw12_ctx_t *  ctx,
lis2dw12_drdy_pulsed_t *  val 
)

Data-ready pulsed / letched mode.

[get]

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

Definition at line 950 of file lis2dw12_reg.c.

int32_t lis2dw12_data_ready_mode_set ( lis2dw12_ctx_t *  ctx,
lis2dw12_drdy_pulsed_t  val 
)

Data-ready pulsed / letched mode.

[set]

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

Definition at line 927 of file lis2dw12_reg.c.

int32_t lis2dw12_device_id_get ( lis2dw12_ctx_t *  ctx,
uint8_t *  buff 
)

Device Who am I.

[get]

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

Definition at line 735 of file lis2dw12_reg.c.

int32_t lis2dw12_reset_get ( lis2dw12_ctx_t *  ctx,
uint8_t *  val 
)

Software reset.

Restore the default values in user registers.[get]

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

Definition at line 814 of file lis2dw12_reg.c.

int32_t lis2dw12_reset_set ( lis2dw12_ctx_t *  ctx,
uint8_t  val 
)

Software reset.

Restore the default values in user registers.[set]

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

Definition at line 792 of file lis2dw12_reg.c.

int32_t lis2dw12_self_test_get ( lis2dw12_ctx_t *  ctx,
lis2dw12_st_t *  val 
)

Sensor self-test enable.

[get]

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

Definition at line 895 of file lis2dw12_reg.c.

int32_t lis2dw12_self_test_set ( lis2dw12_ctx_t *  ctx,
lis2dw12_st_t  val 
)

Sensor self-test enable.

[set]

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

Definition at line 873 of file lis2dw12_reg.c.