3-axis MEMS ultra low power accelerometer
Dependencies: X_NUCLEO_COMMON ST_INTERFACES
Dependents: X_NUCLEO_IKS01A3 X_NUCLEO_IKS01A3
This section groups all the functions concerning data generation. More...
Functions | |
int32_t | lis2dw12_power_mode_set (lis2dw12_ctx_t *ctx, lis2dw12_mode_t val) |
Select accelerometer operating modes. | |
int32_t | lis2dw12_power_mode_get (lis2dw12_ctx_t *ctx, lis2dw12_mode_t *val) |
Select accelerometer operating modes. | |
int32_t | lis2dw12_data_rate_set (lis2dw12_ctx_t *ctx, lis2dw12_odr_t val) |
Accelerometer data rate selection. | |
int32_t | lis2dw12_data_rate_get (lis2dw12_ctx_t *ctx, lis2dw12_odr_t *val) |
Accelerometer data rate selection. | |
int32_t | lis2dw12_block_data_update_set (lis2dw12_ctx_t *ctx, uint8_t val) |
Block data update. | |
int32_t | lis2dw12_block_data_update_get (lis2dw12_ctx_t *ctx, uint8_t *val) |
Block data update. | |
int32_t | lis2dw12_full_scale_set (lis2dw12_ctx_t *ctx, lis2dw12_fs_t val) |
Accelerometer full-scale selection. | |
int32_t | lis2dw12_full_scale_get (lis2dw12_ctx_t *ctx, lis2dw12_fs_t *val) |
Accelerometer full-scale selection. | |
int32_t | lis2dw12_status_reg_get (lis2dw12_ctx_t *ctx, lis2dw12_status_t *val) |
The STATUS_REG register of the device. | |
int32_t | lis2dw12_flag_data_ready_get (lis2dw12_ctx_t *ctx, uint8_t *val) |
Accelerometer new data available. | |
int32_t | lis2dw12_all_sources_get (lis2dw12_ctx_t *ctx, lis2dw12_all_sources_t *val) |
Read all the interrupt/status flag of the device. | |
int32_t | lis2dw12_usr_offset_x_set (lis2dw12_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 | lis2dw12_usr_offset_x_get (lis2dw12_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 | lis2dw12_usr_offset_y_set (lis2dw12_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 | lis2dw12_usr_offset_y_get (lis2dw12_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 | lis2dw12_usr_offset_z_set (lis2dw12_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 | lis2dw12_usr_offset_z_get (lis2dw12_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 | lis2dw12_offset_weight_set (lis2dw12_ctx_t *ctx, lis2dw12_usr_off_w_t val) |
Weight of XL user offset bits of registers X_OFS_USR, Y_OFS_USR, Z_OFS_USR. | |
int32_t | lis2dw12_offset_weight_get (lis2dw12_ctx_t *ctx, lis2dw12_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 lis2dw12_all_sources_get | ( | lis2dw12_ctx_t * | ctx, |
lis2dw12_all_sources_t * | val | ||
) |
Read all the interrupt/status flag of the device.
[get]
- Parameters:
-
ctx read / write interface definitions val registers STATUS_DUP, WAKE_UP_SRC, TAP_SRC, SIXD_SRC, ALL_INT_SRC
- Return values:
-
interface status (MANDATORY: return 0 -> no Error)
Definition at line 507 of file lis2dw12_reg.c.
int32_t lis2dw12_block_data_update_get | ( | lis2dw12_ctx_t * | ctx, |
uint8_t * | val | ||
) |
Block data update.
[get]
- Parameters:
-
ctx read / write interface definitions val change the values of bdu in reg CTRL2
- Return values:
-
interface status (MANDATORY: return 0 -> no Error)
Definition at line 398 of file lis2dw12_reg.c.
int32_t lis2dw12_block_data_update_set | ( | lis2dw12_ctx_t * | ctx, |
uint8_t | val | ||
) |
Block data update.
[set]
- Parameters:
-
ctx read / write interface definitions val change the values of bdu in reg CTRL2
- Return values:
-
interface status (MANDATORY: return 0 -> no Error)
Definition at line 377 of file lis2dw12_reg.c.
int32_t lis2dw12_data_rate_get | ( | lis2dw12_ctx_t * | ctx, |
lis2dw12_odr_t * | val | ||
) |
Accelerometer data rate selection.
[get]
- Parameters:
-
ctx read / write interface definitions val Get the values of odr in reg CTRL1
- Return values:
-
interface status (MANDATORY: return 0 -> no Error)
Definition at line 314 of file lis2dw12_reg.c.
int32_t lis2dw12_data_rate_set | ( | lis2dw12_ctx_t * | ctx, |
lis2dw12_odr_t | val | ||
) |
Accelerometer data rate selection.
[set]
- Parameters:
-
ctx read / write interface definitions val change the values of odr in reg CTRL1
- Return values:
-
interface status (MANDATORY: return 0 -> no Error)
Definition at line 285 of file lis2dw12_reg.c.
int32_t lis2dw12_flag_data_ready_get | ( | lis2dw12_ctx_t * | ctx, |
uint8_t * | val | ||
) |
Accelerometer new data available.
[get]
- Parameters:
-
ctx read / write interface definitions val change the values of drdy in reg STATUS
- Return values:
-
interface status (MANDATORY: return 0 -> no Error)
Definition at line 488 of file lis2dw12_reg.c.
int32_t lis2dw12_full_scale_get | ( | lis2dw12_ctx_t * | ctx, |
lis2dw12_fs_t * | val | ||
) |
Accelerometer full-scale selection.
[get]
- Parameters:
-
ctx read / write interface definitions val Get the values of fs in reg CTRL6
- Return values:
-
interface status (MANDATORY: return 0 -> no Error)
Definition at line 438 of file lis2dw12_reg.c.
int32_t lis2dw12_full_scale_set | ( | lis2dw12_ctx_t * | ctx, |
lis2dw12_fs_t | val | ||
) |
Accelerometer full-scale selection.
[set]
- Parameters:
-
ctx read / write interface definitions val change the values of fs in reg CTRL6
- Return values:
-
interface status (MANDATORY: return 0 -> no Error)
Definition at line 417 of file lis2dw12_reg.c.
int32_t lis2dw12_offset_weight_get | ( | lis2dw12_ctx_t * | ctx, |
lis2dw12_usr_off_w_t * | val | ||
) |
Weight of XL user offset bits of registers X_OFS_USR, Y_OFS_USR, Z_OFS_USR.
[get]
- Parameters:
-
ctx read / write interface definitions val Get the values of usr_off_w in reg CTRL_REG7
- Return values:
-
interface status (MANDATORY: return 0 -> no Error)
Definition at line 650 of file lis2dw12_reg.c.
int32_t lis2dw12_offset_weight_set | ( | lis2dw12_ctx_t * | ctx, |
lis2dw12_usr_off_w_t | val | ||
) |
Weight of XL user offset bits of registers X_OFS_USR, Y_OFS_USR, Z_OFS_USR.
[set]
- Parameters:
-
ctx read / write interface definitions val change the values of usr_off_w in reg CTRL_REG7
- Return values:
-
interface status (MANDATORY: return 0 -> no Error)
Definition at line 627 of file lis2dw12_reg.c.
int32_t lis2dw12_power_mode_get | ( | lis2dw12_ctx_t * | ctx, |
lis2dw12_mode_t * | val | ||
) |
Select accelerometer operating modes.
[get]
- Parameters:
-
ctx read / write interface definitions val change the values of mode / lp_mode in reg CTRL1 and low_noise in reg CTRL6
- Return values:
-
interface status (MANDATORY: return 0 -> no Error)
Definition at line 203 of file lis2dw12_reg.c.
int32_t lis2dw12_power_mode_set | ( | lis2dw12_ctx_t * | ctx, |
lis2dw12_mode_t | val | ||
) |
Select accelerometer operating modes.
[set]
- Parameters:
-
ctx read / write interface definitions val change the values of mode / lp_mode in reg CTRL1 and low_noise in reg CTRL6
- Return values:
-
interface status (MANDATORY: return 0 -> no Error)
Definition at line 172 of file lis2dw12_reg.c.
int32_t lis2dw12_status_reg_get | ( | lis2dw12_ctx_t * | ctx, |
lis2dw12_status_t * | val | ||
) |
The STATUS_REG register of the device.
[get]
- Parameters:
-
ctx read / write interface definitions val union of registers from STATUS to
- Return values:
-
interface status (MANDATORY: return 0 -> no Error)
Definition at line 473 of file lis2dw12_reg.c.
int32_t lis2dw12_usr_offset_x_get | ( | lis2dw12_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:
-
ctx read / write interface definitions buff buffer that stores data read
- Return values:
-
interface status (MANDATORY: return 0 -> no Error)
Definition at line 542 of file lis2dw12_reg.c.
int32_t lis2dw12_usr_offset_x_set | ( | lis2dw12_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:
-
ctx read / write interface definitions buff buffer that contains data to write
- Return values:
-
interface status (MANDATORY: return 0 -> no Error)
Definition at line 525 of file lis2dw12_reg.c.
int32_t lis2dw12_usr_offset_y_get | ( | lis2dw12_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:
-
ctx read / write interface definitions buff buffer that stores data read
- Return values:
-
interface status (MANDATORY: return 0 -> no Error)
Definition at line 576 of file lis2dw12_reg.c.
int32_t lis2dw12_usr_offset_y_set | ( | lis2dw12_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:
-
ctx read / write interface definitions buff buffer that contains data to write
- Return values:
-
interface status (MANDATORY: return 0 -> no Error)
Definition at line 559 of file lis2dw12_reg.c.
int32_t lis2dw12_usr_offset_z_get | ( | lis2dw12_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:
-
ctx read / write interface definitions buff buffer that stores data read
- Return values:
-
interface status (MANDATORY: return 0 -> no Error)
Definition at line 610 of file lis2dw12_reg.c.
int32_t lis2dw12_usr_offset_z_set | ( | lis2dw12_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:
-
ctx read / write interface definitions buff buffer that contains data to write
- Return values:
-
interface status (MANDATORY: return 0 -> no Error)
Definition at line 593 of file lis2dw12_reg.c.
Generated on Thu Jul 14 2022 10:48:26 by 1.7.2