Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: X_NUCLEO_COMMON ST_INTERFACES
LSM6DSOX_common
This section groups common usefull functions. More...
Functions | |
int32_t | lsm6dsox_odr_cal_reg_set (lsm6dsox_ctx_t *ctx, uint8_t val) |
Difference in percentage of the effective ODR(and timestamp rate) with respect to the typical. | |
int32_t | lsm6dsox_odr_cal_reg_get (lsm6dsox_ctx_t *ctx, uint8_t *val) |
Difference in percentage of the effective ODR(and timestamp rate) with respect to the typical. | |
int32_t | lsm6dsox_mem_bank_set (lsm6dsox_ctx_t *ctx, lsm6dsox_reg_access_t val) |
Enable access to the embedded functions/sensor hub configuration registers. | |
int32_t | lsm6dsox_mem_bank_get (lsm6dsox_ctx_t *ctx, lsm6dsox_reg_access_t *val) |
Enable access to the embedded functions/sensor hub configuration registers. | |
int32_t | lsm6dsox_ln_pg_write_byte (lsm6dsox_ctx_t *ctx, uint16_t address, uint8_t *val) |
Write a line(byte) in a page. | |
int32_t | lsm6dsox_ln_pg_write (lsm6dsox_ctx_t *ctx, uint16_t address, uint8_t *buf, uint8_t len) |
Write buffer in a page. | |
int32_t | lsm6dsox_ln_pg_read_byte (lsm6dsox_ctx_t *ctx, uint16_t address, uint8_t *val) |
Read a line(byte) in a page. | |
int32_t | lsm6dsox_data_ready_mode_set (lsm6dsox_ctx_t *ctx, lsm6dsox_dataready_pulsed_t val) |
Data-ready pulsed / letched mode. | |
int32_t | lsm6dsox_data_ready_mode_get (lsm6dsox_ctx_t *ctx, lsm6dsox_dataready_pulsed_t *val) |
Data-ready pulsed / letched mode. | |
int32_t | lsm6dsox_device_id_get (lsm6dsox_ctx_t *ctx, uint8_t *buff) |
Device "Who am I". | |
int32_t | lsm6dsox_reset_set (lsm6dsox_ctx_t *ctx, uint8_t val) |
Software reset. | |
int32_t | lsm6dsox_reset_get (lsm6dsox_ctx_t *ctx, uint8_t *val) |
Software reset. | |
int32_t | lsm6dsox_auto_increment_set (lsm6dsox_ctx_t *ctx, uint8_t val) |
Register address automatically incremented during a multiple byte access with a serial interface. | |
int32_t | lsm6dsox_auto_increment_get (lsm6dsox_ctx_t *ctx, uint8_t *val) |
Register address automatically incremented during a multiple byte access with a serial interface. | |
int32_t | lsm6dsox_boot_set (lsm6dsox_ctx_t *ctx, uint8_t val) |
Reboot memory content. | |
int32_t | lsm6dsox_boot_get (lsm6dsox_ctx_t *ctx, uint8_t *val) |
Reboot memory content. | |
int32_t | lsm6dsox_xl_self_test_set (lsm6dsox_ctx_t *ctx, lsm6dsox_st_xl_t val) |
Linear acceleration sensor self-test enable. | |
int32_t | lsm6dsox_xl_self_test_get (lsm6dsox_ctx_t *ctx, lsm6dsox_st_xl_t *val) |
Linear acceleration sensor self-test enable. | |
int32_t | lsm6dsox_gy_self_test_set (lsm6dsox_ctx_t *ctx, lsm6dsox_st_g_t val) |
Angular rate sensor self-test enable. | |
int32_t | lsm6dsox_gy_self_test_get (lsm6dsox_ctx_t *ctx, lsm6dsox_st_g_t *val) |
Angular rate sensor self-test enable. |
Detailed Description
This section groups common usefull functions.
Function Documentation
int32_t lsm6dsox_auto_increment_get | ( | lsm6dsox_ctx_t * | ctx, |
uint8_t * | val | ||
) |
Register address automatically incremented during a multiple byte access with a serial interface.
[get]
- Parameters:
-
ctx read / write interface definitions val change the values of if_inc in reg CTRL3_C
Definition at line 2027 of file lsm6dsox_reg.c.
int32_t lsm6dsox_auto_increment_set | ( | lsm6dsox_ctx_t * | ctx, |
uint8_t | val | ||
) |
Register address automatically incremented during a multiple byte access with a serial interface.
[set]
- Parameters:
-
ctx read / write interface definitions val change the values of if_inc in reg CTRL3_C
Definition at line 2006 of file lsm6dsox_reg.c.
int32_t lsm6dsox_boot_get | ( | lsm6dsox_ctx_t * | ctx, |
uint8_t * | val | ||
) |
Reboot memory content.
Reload the calibration parameters.[get]
- Parameters:
-
ctx read / write interface definitions val change the values of boot in reg CTRL3_C
Definition at line 2065 of file lsm6dsox_reg.c.
int32_t lsm6dsox_boot_set | ( | lsm6dsox_ctx_t * | ctx, |
uint8_t | val | ||
) |
Reboot memory content.
Reload the calibration parameters.[set]
- Parameters:
-
ctx read / write interface definitions val change the values of boot in reg CTRL3_C
Definition at line 2045 of file lsm6dsox_reg.c.
int32_t lsm6dsox_data_ready_mode_get | ( | lsm6dsox_ctx_t * | ctx, |
lsm6dsox_dataready_pulsed_t * | val | ||
) |
Data-ready pulsed / letched mode.
[get]
- Parameters:
-
ctx read / write interface definitions val Get the values of dataready_pulsed in reg COUNTER_BDR_REG1
Definition at line 1923 of file lsm6dsox_reg.c.
int32_t lsm6dsox_data_ready_mode_set | ( | lsm6dsox_ctx_t * | ctx, |
lsm6dsox_dataready_pulsed_t | val | ||
) |
Data-ready pulsed / letched mode.
[set]
- Parameters:
-
ctx read / write interface definitions val change the values of dataready_pulsed in reg COUNTER_BDR_REG1
Definition at line 1900 of file lsm6dsox_reg.c.
int32_t lsm6dsox_device_id_get | ( | lsm6dsox_ctx_t * | ctx, |
uint8_t * | buff | ||
) |
Device "Who am I".
[get]
- Parameters:
-
ctx read / write interface definitions buff buffer that stores data read
Definition at line 1951 of file lsm6dsox_reg.c.
int32_t lsm6dsox_gy_self_test_get | ( | lsm6dsox_ctx_t * | ctx, |
lsm6dsox_st_g_t * | val | ||
) |
Angular rate sensor self-test enable.
[get]
- Parameters:
-
ctx read / write interface definitions val Get the values of st_g in reg CTRL5_C
Definition at line 2153 of file lsm6dsox_reg.c.
int32_t lsm6dsox_gy_self_test_set | ( | lsm6dsox_ctx_t * | ctx, |
lsm6dsox_st_g_t | val | ||
) |
Angular rate sensor self-test enable.
[set]
- Parameters:
-
ctx read / write interface definitions val change the values of st_g in reg CTRL5_C
Definition at line 2133 of file lsm6dsox_reg.c.
int32_t lsm6dsox_ln_pg_read_byte | ( | lsm6dsox_ctx_t * | ctx, |
uint16_t | address, | ||
uint8_t * | val | ||
) |
Read a line(byte) in a page.
[get]
- Parameters:
-
ctx read / write interface definitions uint8_t address: page line address val read value
Definition at line 1842 of file lsm6dsox_reg.c.
int32_t lsm6dsox_ln_pg_write | ( | lsm6dsox_ctx_t * | ctx, |
uint16_t | address, | ||
uint8_t * | buf, | ||
uint8_t | len | ||
) |
Write buffer in a page.
[set]
- Parameters:
-
ctx read / write interface definitions uint8_t address: page line address uint8_t *buf: buffer to write uint8_t len: buffer len
Definition at line 1760 of file lsm6dsox_reg.c.
int32_t lsm6dsox_ln_pg_write_byte | ( | lsm6dsox_ctx_t * | ctx, |
uint16_t | address, | ||
uint8_t * | val | ||
) |
Write a line(byte) in a page.
[set]
- Parameters:
-
ctx read / write interface definitions uint8_t address: page line address val value to write
Definition at line 1703 of file lsm6dsox_reg.c.
int32_t lsm6dsox_mem_bank_get | ( | lsm6dsox_ctx_t * | ctx, |
lsm6dsox_reg_access_t * | val | ||
) |
Enable access to the embedded functions/sensor hub configuration registers.
[get]
- Parameters:
-
ctx read / write interface definitions val Get the values of reg_access in reg FUNC_CFG_ACCESS
Definition at line 1672 of file lsm6dsox_reg.c.
int32_t lsm6dsox_mem_bank_set | ( | lsm6dsox_ctx_t * | ctx, |
lsm6dsox_reg_access_t | val | ||
) |
Enable access to the embedded functions/sensor hub configuration registers.
[set]
- Parameters:
-
ctx read / write interface definitions val change the values of reg_access in reg FUNC_CFG_ACCESS
Definition at line 1650 of file lsm6dsox_reg.c.
int32_t lsm6dsox_odr_cal_reg_get | ( | lsm6dsox_ctx_t * | ctx, |
uint8_t * | val | ||
) |
Difference in percentage of the effective ODR(and timestamp rate) with respect to the typical.
Step: 0.15%. 8-bit format, 2's complement.[get]
- Parameters:
-
ctx read / write interface definitions val change the values of freq_fine in reg INTERNAL_FREQ_FINE
Definition at line 1629 of file lsm6dsox_reg.c.
int32_t lsm6dsox_odr_cal_reg_set | ( | lsm6dsox_ctx_t * | ctx, |
uint8_t | val | ||
) |
Difference in percentage of the effective ODR(and timestamp rate) with respect to the typical.
Step: 0.15%. 8-bit format, 2's complement.[set]
- Parameters:
-
ctx read / write interface definitions val change the values of freq_fine in reg INTERNAL_FREQ_FINE
Definition at line 1606 of file lsm6dsox_reg.c.
int32_t lsm6dsox_reset_get | ( | lsm6dsox_ctx_t * | ctx, |
uint8_t * | val | ||
) |
Software reset.
Restore the default values in user registers.[get]
- Parameters:
-
ctx read / write interface definitions val change the values of sw_reset in reg CTRL3_C
Definition at line 1987 of file lsm6dsox_reg.c.
int32_t lsm6dsox_reset_set | ( | lsm6dsox_ctx_t * | ctx, |
uint8_t | val | ||
) |
Software reset.
Restore the default values in user registers[set]
- Parameters:
-
ctx read / write interface definitions val change the values of sw_reset in reg CTRL3_C
Definition at line 1966 of file lsm6dsox_reg.c.
int32_t lsm6dsox_xl_self_test_get | ( | lsm6dsox_ctx_t * | ctx, |
lsm6dsox_st_xl_t * | val | ||
) |
Linear acceleration sensor self-test enable.
[get]
- Parameters:
-
ctx read / write interface definitions val Get the values of st_xl in reg CTRL5_C
Definition at line 2103 of file lsm6dsox_reg.c.
int32_t lsm6dsox_xl_self_test_set | ( | lsm6dsox_ctx_t * | ctx, |
lsm6dsox_st_xl_t | val | ||
) |
Linear acceleration sensor self-test enable.
[set]
- Parameters:
-
ctx read / write interface definitions val change the values of st_xl in reg CTRL5_C
Definition at line 2083 of file lsm6dsox_reg.c.
Generated on Tue Jul 12 2022 20:15:23 by
