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
LSM6DSOSensor Class Reference
Abstract class of an LSM6DSO Inertial Measurement Unit (IMU) 6 axes sensor. More...
#include <LSM6DSOSensor.h>
Public Member Functions | |
| LSM6DSOSensor (SPI *spi, PinName cs_pin, PinName int1_pin=NC, PinName int2_pin=NC, SPI_type_t spi_type=SPI4W) | |
| Constructor. | |
| LSM6DSOSensor (DevI2C *i2c, uint8_t address=LSM6DSO_I2C_ADD_H, PinName int1_pin=NC, PinName int2_pin=NC) | |
| Constructor. | |
| virtual int | init (void *init) |
| Initializing the component. | |
| virtual int | read_id (uint8_t *id) |
| Read component ID. | |
| virtual int | get_x_axes (int32_t *acceleration) |
| Get the LSM6DSO accelerometer sensor axes. | |
| virtual int | get_g_axes (int32_t *angular_rate) |
| Get the LSM6DSO gyroscope sensor axes. | |
| virtual int | get_x_sensitivity (float *sensitivity) |
| Get the LSM6DSO accelerometer sensor sensitivity. | |
| virtual int | get_g_sensitivity (float *sensitivity) |
| Get the LSM6DSO gyroscope sensor sensitivity. | |
| virtual int | get_x_axes_raw (int16_t *value) |
| Get the LSM6DSO accelerometer sensor raw axes. | |
| virtual int | get_g_axes_raw (int16_t *value) |
| Get the LSM6DSO gyroscope sensor raw axes. | |
| virtual int | get_x_odr (float *odr) |
| Get the LSM6DSO accelerometer sensor output data rate. | |
| virtual int | get_g_odr (float *odr) |
| Get the LSM6DSO gyroscope sensor output data rate. | |
| virtual int | set_x_odr (float odr) |
| Set the LSM6DSO accelerometer sensor output data rate. | |
| virtual int | set_g_odr (float odr) |
| Set the LSM6DSO gyroscope sensor output data rate. | |
| virtual int | get_x_fs (float *full_scale) |
| Get the LSM6DSO accelerometer sensor full scale. | |
| virtual int | get_g_fs (float *full_scale) |
| Get the LSM6DSO gyroscope sensor full scale. | |
| virtual int | set_x_fs (float full_scale) |
| Set the LSM6DSO accelerometer sensor full scale. | |
| virtual int | set_g_fs (float full_scale) |
| Set the LSM6DSO gyroscope sensor full scale. | |
| virtual int | get_x_power_mode (uint8_t *xl_hm_mode, uint8_t *xl_ulp_en) |
| Get the LSM6DSO accelerometer sensor power mode. | |
| virtual int | set_x_power_mode (uint8_t xl_hm_mode, uint8_t xl_ulp_en) |
| Set the LSM6DSO accelerometer sensor power mode. | |
| virtual int | get_x_lpf2_en (uint8_t *lpf2_en) |
| Get the LSM6DSO accelerometer sensor high-resolution selection. | |
| virtual int | set_x_lpf2_en (uint8_t lpf2_en) |
| Set the LSM6DSO accelerometer sensor high-resolution selection. | |
| virtual int | get_x_filter_config (uint8_t *hp_slope_xl_en, uint8_t *hpcf_xl) |
| Get the LSM6DSO accelerometer sensor filter configuration. | |
| virtual int | set_x_filter_config (uint8_t hp_slope_xl_en, uint8_t hpcf_xl) |
| Set the LSM6DSO accelerometer sensor filter configuration. | |
| virtual int | get_g_power_mode (uint8_t *g_hm_mode) |
| Get the LSM6DSO gyroscope sensor power mode. | |
| virtual int | set_g_power_mode (uint8_t g_hm_mode) |
| Set the LSM6DSO gyroscope sensor power mode. | |
| virtual int | get_g_lpf_config (uint8_t *lpf1_sel_g, uint8_t *ftype) |
| Get the LSM6DSO gyroscope sensor low-pass filter configuration. | |
| virtual int | set_g_lpf_config (uint8_t lpf1_sel_g, uint8_t ftype) |
| Set the LSM6DSO gyroscope sensor low-pass filter configuration. | |
| virtual int | get_g_hpf_config (uint8_t *hp_en_g, uint8_t *hpm_g) |
| Get the LSM6DSO gyroscope sensor high-pass filter configuration. | |
| virtual int | set_g_hpf_config (uint8_t hp_en_g, uint8_t hpm_g) |
| Set the LSM6DSO gyroscope sensor high-pass filter configuration. | |
| int | enable_x (void) |
| Enable the LSM6DSO accelerometer sensor. | |
| int | enable_g (void) |
| Enable the LSM6DSO gyroscope sensor. | |
| int | disable_x (void) |
| Disable the LSM6DSO accelerometer sensor. | |
| int | disable_g (void) |
| Disable the LSM6DSO gyroscope sensor. | |
| int | enable_free_fall_detection (LSM6DSO_Interrupt_Pin_t pin=LSM6DSO_INT1_PIN) |
| Enable free fall detection. | |
| int | disable_free_fall_detection (void) |
| Disable free fall detection. | |
| int | set_free_fall_threshold (uint8_t thr) |
| Set free fall threshold. | |
| int | set_free_fall_duration (uint8_t dur) |
| Set free fall duration. | |
| int | enable_pedometer (void) |
| Enable pedometer. | |
| int | disable_pedometer (void) |
| Disable pedometer. | |
| int | get_step_counter (uint16_t *step_count) |
| Get step count. | |
| int | reset_step_counter (void) |
| Enable step counter reset. | |
| int | enable_tilt_detection (LSM6DSO_Interrupt_Pin_t pin=LSM6DSO_INT1_PIN) |
| Enable tilt detection. | |
| int | disable_tilt_detection (void) |
| Disable tilt detection. | |
| int | enable_wake_up_detection (LSM6DSO_Interrupt_Pin_t pin=LSM6DSO_INT1_PIN) |
| Enable wake up detection. | |
| int | disable_wake_up_detection (void) |
| Disable wake up detection. | |
| int | set_wake_up_threshold (uint8_t thr) |
| Set wake up threshold. | |
| int | set_wake_up_duration (uint8_t dur) |
| Set wake up duration. | |
| int | enable_single_tap_detection (LSM6DSO_Interrupt_Pin_t pin=LSM6DSO_INT1_PIN) |
| Enable single tap detection. | |
| int | disable_single_tap_detection (void) |
| Disable single tap detection. | |
| int | enable_double_tap_detection (LSM6DSO_Interrupt_Pin_t pin=LSM6DSO_INT1_PIN) |
| Enable double tap detection. | |
| int | disable_double_tap_detection (void) |
| Disable double tap detection. | |
| int | set_tap_threshold (uint8_t thr) |
| Set tap threshold. | |
| int | set_tap_shock_time (uint8_t time) |
| Set tap shock time. | |
| int | set_tap_quiet_time (uint8_t time) |
| Set tap quiet time. | |
| int | set_tap_duration_time (uint8_t time) |
| Set tap duration time. | |
| int | enable_6d_orientation (LSM6DSO_Interrupt_Pin_t pin=LSM6DSO_INT1_PIN) |
| Enable 6D orientation detection. | |
| int | disable_6d_orientation (void) |
| Disable 6D orientation detection. | |
| int | set_6d_orientation_threshold (uint8_t thr) |
| Set 6D orientation threshold. | |
| int | get_6d_orientation_xl (uint8_t *xl) |
| Get the status of XLow orientation. | |
| int | get_6d_orientation_xh (uint8_t *xh) |
| Get the status of XHigh orientation. | |
| int | get_6d_orientation_yl (uint8_t *yl) |
| Get the status of YLow orientation. | |
| int | get_6d_orientation_yh (uint8_t *yh) |
| Get the status of YHigh orientation. | |
| int | get_6d_orientation_zl (uint8_t *zl) |
| Get the status of ZLow orientation. | |
| int | get_6d_orientation_zh (uint8_t *zh) |
| Get the status of ZHigh orientation. | |
| int | get_event_status (LSM6DSO_Event_Status_t *status) |
| Get the status of all hardware events. | |
| int | read_reg (uint8_t reg, uint8_t *data) |
| Get the LSM6DSO register value. | |
| int | write_reg (uint8_t reg, uint8_t data) |
| Set the LSM6DSO register value. | |
| int | set_interrupt_latch (uint8_t status) |
| Set the interrupt latch. | |
| int | get_x_drdy_status (uint8_t *status) |
| Get the LSM6DSO ACC data ready bit value. | |
| int | set_x_self_test (uint8_t status) |
| Set self test. | |
| int | get_g_drdy_status (uint8_t *status) |
| Get the LSM6DSO GYRO data ready bit value. | |
| int | set_g_self_test (uint8_t status) |
| Set self test. | |
| int | get_fifo_num_samples (uint16_t *num_samples) |
| Get the LSM6DSO FIFO number of samples. | |
| int | get_fifo_full_status (uint8_t *status) |
| Get the LSM6DSO FIFO full status. | |
| int | set_fifo_int1_fifo_full (uint8_t status) |
| Set the LSM6DSO FIFO full interrupt on INT1 pin. | |
| int | set_fifo_watermark_level (uint16_t watermark) |
| Set the LSM6DSO FIFO watermark level. | |
| int | set_fifo_stop_on_fth (uint8_t status) |
| Set the LSM6DSO FIFO stop on watermark. | |
| int | set_fifo_mode (uint8_t mode) |
| Set the LSM6DSO FIFO mode. | |
| int | get_fifo_tag (uint8_t *tag) |
| Get the LSM6DSO FIFO tag. | |
| int | get_fifo_data (uint8_t *data) |
| Get the LSM6DSO FIFO raw data. | |
| int | get_fifo_x_axes (int32_t *acceleration) |
| Get the LSM6DSO FIFO accelero single sample (16-bit data per 3 axes) and calculate acceleration [mg]. | |
| int | set_fifo_x_bdr (float bdr) |
| Set the LSM6DSO FIFO accelero BDR value. | |
| int | get_fifo_g_axes (int32_t *angular_velocity) |
| Get the LSM6DSO FIFO gyro single sample (16-bit data per 3 axes) and calculate angular velocity [mDPS]. | |
| int | set_fifo_g_bdr (float bdr) |
| Set the LSM6DSO FIFO gyro BDR value. | |
| void | attach_int1_irq (void(*fptr)(void)) |
| Attaching an interrupt handler to the INT1 interrupt. | |
| void | enable_int1_irq (void) |
| Enabling the INT1 interrupt handling. | |
| void | disable_int1_irq (void) |
| Disabling the INT1 interrupt handling. | |
| void | attach_int2_irq (void(*fptr)(void)) |
| Attaching an interrupt handler to the INT2 interrupt. | |
| void | enable_int2_irq (void) |
| Enabling the INT2 interrupt handling. | |
| void | disable_int2_irq (void) |
| Disabling the INT2 interrupt handling. | |
| uint8_t | io_read (uint8_t *pBuffer, uint8_t RegisterAddr, uint16_t NumByteToRead) |
| Utility function to read data. | |
| uint8_t | io_write (uint8_t *pBuffer, uint8_t RegisterAddr, uint16_t NumByteToWrite) |
| Utility function to write data. | |
Detailed Description
Abstract class of an LSM6DSO Inertial Measurement Unit (IMU) 6 axes sensor.
Definition at line 92 of file LSM6DSOSensor.h.
Constructor & Destructor Documentation
| LSM6DSOSensor | ( | SPI * | spi, |
| PinName | cs_pin, | ||
| PinName | int1_pin = NC, |
||
| PinName | int2_pin = NC, |
||
| SPI_type_t | spi_type = SPI4W |
||
| ) |
Constructor.
- Parameters:
-
spi object of an helper class which handles the SPI peripheral cs_pin the chip select pin int1_pin the interrupt 1 pin int2_pin the interrupt 2 pin spi_type the SPI type
Definition at line 54 of file LSM6DSOSensor.cpp.
| LSM6DSOSensor | ( | DevI2C * | i2c, |
| uint8_t | address = LSM6DSO_I2C_ADD_H, |
||
| PinName | int1_pin = NC, |
||
| PinName | int2_pin = NC |
||
| ) |
Constructor.
- Parameters:
-
i2c object of an helper class which handles the I2C peripheral address the address of the component's instance int1_pin the interrupt 1 pin int2_pin the interrupt 2 pin
Definition at line 85 of file LSM6DSOSensor.cpp.
Member Function Documentation
| void attach_int1_irq | ( | void(*)(void) | fptr ) |
Attaching an interrupt handler to the INT1 interrupt.
- Parameters:
-
fptr An interrupt handler.
- Return values:
-
None.
Definition at line 186 of file LSM6DSOSensor.h.
| void attach_int2_irq | ( | void(*)(void) | fptr ) |
Attaching an interrupt handler to the INT2 interrupt.
- Parameters:
-
fptr An interrupt handler.
- Return values:
-
None.
Definition at line 216 of file LSM6DSOSensor.h.
| int disable_6d_orientation | ( | void | ) |
Disable 6D orientation detection.
- Return values:
-
0 in case of success, an error code otherwise
Definition at line 2264 of file LSM6DSOSensor.cpp.
| int disable_double_tap_detection | ( | void | ) |
Disable double tap detection.
- Return values:
-
0 in case of success, an error code otherwise
Definition at line 2071 of file LSM6DSOSensor.cpp.
| int disable_free_fall_detection | ( | void | ) |
Disable free fall detection.
- Return values:
-
0 in case of success, an error code otherwise
Definition at line 1423 of file LSM6DSOSensor.cpp.
| int disable_g | ( | void | ) |
Disable the LSM6DSO gyroscope sensor.
- Return values:
-
0 in case of success, an error code otherwise
Definition at line 977 of file LSM6DSOSensor.cpp.
| void disable_int1_irq | ( | void | ) |
Disabling the INT1 interrupt handling.
- Parameters:
-
None.
- Return values:
-
None.
Definition at line 206 of file LSM6DSOSensor.h.
| void disable_int2_irq | ( | void | ) |
Disabling the INT2 interrupt handling.
- Parameters:
-
None.
- Return values:
-
None.
Definition at line 236 of file LSM6DSOSensor.h.
| int disable_pedometer | ( | void | ) |
Disable pedometer.
- Return values:
-
0 in case of success, an error code otherwise
Definition at line 1533 of file LSM6DSOSensor.cpp.
| int disable_single_tap_detection | ( | void | ) |
Disable single tap detection.
- Return values:
-
0 in case of success, an error code otherwise
Definition at line 1913 of file LSM6DSOSensor.cpp.
| int disable_tilt_detection | ( | void | ) |
Disable tilt detection.
- Return values:
-
0 in case of success, an error code otherwise
Definition at line 1647 of file LSM6DSOSensor.cpp.
| int disable_wake_up_detection | ( | void | ) |
Disable wake up detection.
- Return values:
-
0 in case of success, an error code otherwise
Definition at line 1751 of file LSM6DSOSensor.cpp.
| int disable_x | ( | void | ) |
Disable the LSM6DSO accelerometer sensor.
- Return values:
-
0 in case of success, an error code otherwise
Definition at line 194 of file LSM6DSOSensor.cpp.
| int enable_6d_orientation | ( | LSM6DSO_Interrupt_Pin_t | int_pin = LSM6DSO_INT1_PIN ) |
Enable 6D orientation detection.
- Parameters:
-
int_pin interrupt pin line to be used
- Return values:
-
0 in case of success, an error code otherwise
Definition at line 2205 of file LSM6DSOSensor.cpp.
| int enable_double_tap_detection | ( | LSM6DSO_Interrupt_Pin_t | int_pin = LSM6DSO_INT1_PIN ) |
Enable double tap detection.
- Parameters:
-
int_pin interrupt pin line to be used
- Return values:
-
0 in case of success, an error code otherwise
Definition at line 1977 of file LSM6DSOSensor.cpp.
| int enable_free_fall_detection | ( | LSM6DSO_Interrupt_Pin_t | int_pin = LSM6DSO_INT1_PIN ) |
Enable free fall detection.
- Parameters:
-
int_pin interrupt pin line to be used
- Return values:
-
0 in case of success, an error code otherwise
Definition at line 1349 of file LSM6DSOSensor.cpp.
| int enable_g | ( | void | ) |
Enable the LSM6DSO gyroscope sensor.
- Return values:
-
0 in case of success, an error code otherwise
Definition at line 955 of file LSM6DSOSensor.cpp.
| void enable_int1_irq | ( | void | ) |
Enabling the INT1 interrupt handling.
- Parameters:
-
None.
- Return values:
-
None.
Definition at line 196 of file LSM6DSOSensor.h.
| void enable_int2_irq | ( | void | ) |
Enabling the INT2 interrupt handling.
- Parameters:
-
None.
- Return values:
-
None.
Definition at line 226 of file LSM6DSOSensor.h.
| int enable_pedometer | ( | void | ) |
Enable pedometer.
- Return values:
-
0 in case of success, an error code otherwise
Definition at line 1496 of file LSM6DSOSensor.cpp.
| int enable_single_tap_detection | ( | LSM6DSO_Interrupt_Pin_t | int_pin = LSM6DSO_INT1_PIN ) |
Enable single tap detection.
- Parameters:
-
int_pin interrupt pin line to be used
- Return values:
-
0 in case of success, an error code otherwise
Definition at line 1825 of file LSM6DSOSensor.cpp.
| int enable_tilt_detection | ( | LSM6DSO_Interrupt_Pin_t | int_pin = LSM6DSO_INT1_PIN ) |
Enable tilt detection.
- Parameters:
-
int_pin interrupt pin line to be used
- Return values:
-
0 in case of success, an error code otherwise
Definition at line 1588 of file LSM6DSOSensor.cpp.
| int enable_wake_up_detection | ( | LSM6DSO_Interrupt_Pin_t | int_pin = LSM6DSO_INT1_PIN ) |
Enable wake up detection.
- Parameters:
-
int_pin interrupt pin line to be used
- Return values:
-
0 in case of success, an error code otherwise
Definition at line 1686 of file LSM6DSOSensor.cpp.
| int enable_x | ( | void | ) |
Enable the LSM6DSO accelerometer sensor.
- Return values:
-
0 in case of success, an error code otherwise
Definition at line 173 of file LSM6DSOSensor.cpp.
| int get_6d_orientation_xh | ( | uint8_t * | xh ) |
Get the status of XHigh orientation.
- Parameters:
-
xh the status of XHigh orientation
- Return values:
-
0 in case of success, an error code otherwise
Definition at line 2335 of file LSM6DSOSensor.cpp.
| int get_6d_orientation_xl | ( | uint8_t * | xl ) |
Get the status of XLow orientation.
- Parameters:
-
xl the status of XLow orientation
- Return values:
-
0 in case of success, an error code otherwise
Definition at line 2317 of file LSM6DSOSensor.cpp.
| int get_6d_orientation_yh | ( | uint8_t * | yh ) |
Get the status of YHigh orientation.
- Parameters:
-
yh the status of YHigh orientation
- Return values:
-
0 in case of success, an error code otherwise
Definition at line 2371 of file LSM6DSOSensor.cpp.
| int get_6d_orientation_yl | ( | uint8_t * | yl ) |
Get the status of YLow orientation.
- Parameters:
-
yl the status of YLow orientation
- Return values:
-
0 in case of success, an error code otherwise
Definition at line 2353 of file LSM6DSOSensor.cpp.
| int get_6d_orientation_zh | ( | uint8_t * | zh ) |
Get the status of ZHigh orientation.
- Parameters:
-
zh the status of ZHigh orientation
- Return values:
-
0 in case of success, an error code otherwise
Definition at line 2407 of file LSM6DSOSensor.cpp.
| int get_6d_orientation_zl | ( | uint8_t * | zl ) |
Get the status of ZLow orientation.
- Parameters:
-
zl the status of ZLow orientation
- Return values:
-
0 in case of success, an error code otherwise
Definition at line 2389 of file LSM6DSOSensor.cpp.
| int get_event_status | ( | LSM6DSO_Event_Status_t * | status ) |
Get the status of all hardware events.
- Parameters:
-
status the status of all hardware events
- Return values:
-
0 in case of success, an error code otherwise
Definition at line 2439 of file LSM6DSOSensor.cpp.
| int get_fifo_data | ( | uint8_t * | data ) |
Get the LSM6DSO FIFO raw data.
- Parameters:
-
data FIFO raw data array [6]
- Return values:
-
0 in case of success, an error code otherwise
Definition at line 2738 of file LSM6DSOSensor.cpp.
| int get_fifo_full_status | ( | uint8_t * | status ) |
Get the LSM6DSO FIFO full status.
- Parameters:
-
status FIFO full status
- Return values:
-
0 in case of success, an error code otherwise
Definition at line 2618 of file LSM6DSOSensor.cpp.
| int get_fifo_g_axes | ( | int32_t * | angular_velocity ) |
Get the LSM6DSO FIFO gyro single sample (16-bit data per 3 axes) and calculate angular velocity [mDPS].
- Parameters:
-
angular_velocity FIFO gyro axes [mDPS]
- Return values:
-
0 in case of success, an error code otherwise
Definition at line 2815 of file LSM6DSOSensor.cpp.
| int get_fifo_num_samples | ( | uint16_t * | num_samples ) |
Get the LSM6DSO FIFO number of samples.
- Parameters:
-
num_samples number of samples
- Return values:
-
0 in case of success, an error code otherwise
Definition at line 2604 of file LSM6DSOSensor.cpp.
| int get_fifo_tag | ( | uint8_t * | tag ) |
Get the LSM6DSO FIFO tag.
- Parameters:
-
tag FIFO tag
- Return values:
-
0 in case of success, an error code otherwise
Definition at line 2720 of file LSM6DSOSensor.cpp.
| int get_fifo_x_axes | ( | int32_t * | acceleration ) |
Get the LSM6DSO FIFO accelero single sample (16-bit data per 3 axes) and calculate acceleration [mg].
- Parameters:
-
acceleration FIFO accelero axes [mg]
- Return values:
-
0 in case of success, an error code otherwise
Definition at line 2752 of file LSM6DSOSensor.cpp.
| int get_g_axes | ( | int32_t * | angular_rate ) | [virtual] |
Get the LSM6DSO gyroscope sensor axes.
- Parameters:
-
angular_rate pointer where the values of the axes are written
- Return values:
-
0 in case of success, an error code otherwise
Definition at line 1271 of file LSM6DSOSensor.cpp.
| int get_g_axes_raw | ( | int16_t * | value ) | [virtual] |
Get the LSM6DSO gyroscope sensor raw axes.
- Parameters:
-
value pointer where the raw values of the axes are written
- Return values:
-
0 in case of success, an error code otherwise
Definition at line 1248 of file LSM6DSOSensor.cpp.
| int get_g_drdy_status | ( | uint8_t * | status ) |
Get the LSM6DSO GYRO data ready bit value.
- Parameters:
-
status the status of data ready bit
- Return values:
-
0 in case of success, an error code otherwise
Definition at line 2568 of file LSM6DSOSensor.cpp.
| int get_g_fs | ( | float * | full_scale ) | [virtual] |
Get the LSM6DSO gyroscope sensor full scale.
- Parameters:
-
full_scale pointer where the full scale is written
- Return values:
-
0 in case of success, an error code otherwise
Definition at line 1182 of file LSM6DSOSensor.cpp.
| int get_g_hpf_config | ( | uint8_t * | hp_en_g, |
| uint8_t * | hpm_g | ||
| ) | [virtual] |
Get the LSM6DSO gyroscope sensor high-pass filter configuration.
- Parameters:
-
hp_en_g the pointer where the hpf enable is written, hpm_g the pointer where the cutoff selection is written
- Return values:
-
0 in case of success, an error code otherwise
Definition at line 831 of file LSM6DSOSensor.cpp.
| int get_g_lpf_config | ( | uint8_t * | lpf1_sel_g, |
| uint8_t * | ftype | ||
| ) | [virtual] |
Get the LSM6DSO gyroscope sensor low-pass filter configuration.
- Parameters:
-
lpf1_sel_g the pointer where the lpf enable is written, ftype the pointer where the filter configuration is written
- Return values:
-
0 in case of success, an error code otherwise
Definition at line 741 of file LSM6DSOSensor.cpp.
| int get_g_odr | ( | float * | odr ) | [virtual] |
Get the LSM6DSO gyroscope sensor output data rate.
- Parameters:
-
odr pointer where the output data rate is written
- Return values:
-
0 in case of success, an error code otherwise
Definition at line 1049 of file LSM6DSOSensor.cpp.
| int get_g_power_mode | ( | uint8_t * | g_hm_mode ) | [virtual] |
Get the LSM6DSO gyroscope sensor power mode.
- Parameters:
-
g_hm_mode the pointer where the high-performance mode is written
- Return values:
-
0 in case of success, an error code otherwise
Definition at line 690 of file LSM6DSOSensor.cpp.
| int get_g_sensitivity | ( | float * | sensitivity ) | [virtual] |
Get the LSM6DSO gyroscope sensor sensitivity.
- Parameters:
-
sensitivity pointer where the sensitivity is written
- Return values:
-
0 in case of success, an error code otherwise
Definition at line 1004 of file LSM6DSOSensor.cpp.
| int get_step_counter | ( | uint16_t * | step_count ) |
Get step count.
- Parameters:
-
step_count step counter
- Return values:
-
0 in case of success, an error code otherwise
Definition at line 1561 of file LSM6DSOSensor.cpp.
| int get_x_axes | ( | int32_t * | acceleration ) | [virtual] |
Get the LSM6DSO accelerometer sensor axes.
- Parameters:
-
acceleration pointer where the values of the axes are written
- Return values:
-
0 in case of success, an error code otherwise
Definition at line 927 of file LSM6DSOSensor.cpp.
| int get_x_axes_raw | ( | int16_t * | value ) | [virtual] |
Get the LSM6DSO accelerometer sensor raw axes.
- Parameters:
-
value pointer where the raw values of the axes are written
- Return values:
-
0 in case of success, an error code otherwise
Definition at line 904 of file LSM6DSOSensor.cpp.
| int get_x_drdy_status | ( | uint8_t * | status ) |
Get the LSM6DSO ACC data ready bit value.
- Parameters:
-
status the status of data ready bit
- Return values:
-
0 in case of success, an error code otherwise
Definition at line 2425 of file LSM6DSOSensor.cpp.
| int get_x_filter_config | ( | uint8_t * | hp_slope_xl_en, |
| uint8_t * | hpcf_xl | ||
| ) | [virtual] |
Get the LSM6DSO accelerometer sensor filter configuration.
- Parameters:
-
hp_slope_xl_en the pointer where the filter selection is written, hpcf_xl the pointer where the filter configuration is written
- Return values:
-
0 in case of success, an error code otherwise
Definition at line 551 of file LSM6DSOSensor.cpp.
| int get_x_fs | ( | float * | full_scale ) | [virtual] |
Get the LSM6DSO accelerometer sensor full scale.
- Parameters:
-
full_scale pointer where the full scale is written
- Return values:
-
0 in case of success, an error code otherwise
Definition at line 398 of file LSM6DSOSensor.cpp.
| int get_x_lpf2_en | ( | uint8_t * | lpf2_en ) | [virtual] |
Get the LSM6DSO accelerometer sensor high-resolution selection.
- Parameters:
-
lpf2_en the pointer where the high-resolution selection is written
- Return values:
-
0 in case of success, an error code otherwise
Definition at line 521 of file LSM6DSOSensor.cpp.
| int get_x_odr | ( | float * | odr ) | [virtual] |
Get the LSM6DSO accelerometer sensor output data rate.
- Parameters:
-
odr pointer where the output data rate is written
- Return values:
-
0 in case of success, an error code otherwise
Definition at line 262 of file LSM6DSOSensor.cpp.
| int get_x_power_mode | ( | uint8_t * | xl_hm_mode, |
| uint8_t * | xl_ulp_en | ||
| ) | [virtual] |
Get the LSM6DSO accelerometer sensor power mode.
- Parameters:
-
xl_hm_mode the pointer where the high-performance mode is written, xl_ulp_en the pointer where the ultra-low-power enable is written
- Return values:
-
0 in case of success, an error code otherwise
Definition at line 461 of file LSM6DSOSensor.cpp.
| int get_x_sensitivity | ( | float * | sensitivity ) | [virtual] |
Get the LSM6DSO accelerometer sensor sensitivity.
- Parameters:
-
sensitivity pointer where the sensitivity is written
- Return values:
-
0 in case of success, an error code otherwise
Definition at line 221 of file LSM6DSOSensor.cpp.
| int init | ( | void * | init ) | [virtual] |
Initializing the component.
- Parameters:
-
init pointer to device specific initalization structure
- Return values:
-
0 in case of success, an error code otherwise
Definition at line 99 of file LSM6DSOSensor.cpp.
| uint8_t io_read | ( | uint8_t * | pBuffer, |
| uint8_t | RegisterAddr, | ||
| uint16_t | NumByteToRead | ||
| ) |
Utility function to read data.
- Parameters:
-
pBuffer,: pointer to data to be read. RegisterAddr,: specifies internal address register to be read. NumByteToRead,: number of bytes to be read.
- Return values:
-
0 if ok, an error code otherwise.
Definition at line 248 of file LSM6DSOSensor.h.
| uint8_t io_write | ( | uint8_t * | pBuffer, |
| uint8_t | RegisterAddr, | ||
| uint16_t | NumByteToWrite | ||
| ) |
Utility function to write data.
- Parameters:
-
pBuffer,: pointer to data to be written. RegisterAddr,: specifies internal address register to be written. NumByteToWrite,: number of bytes to write.
- Return values:
-
0 if ok, an error code otherwise.
Definition at line 281 of file LSM6DSOSensor.h.
| int read_id | ( | uint8_t * | id ) | [virtual] |
Read component ID.
- Parameters:
-
id the WHO_AM_I value
- Return values:
-
0 in case of success, an error code otherwise
Definition at line 160 of file LSM6DSOSensor.cpp.
| int read_reg | ( | uint8_t | reg, |
| uint8_t * | data | ||
| ) |
Get the LSM6DSO register value.
- Parameters:
-
reg address to be read data pointer where the value is written
- Return values:
-
0 in case of success, an error code otherwise
Definition at line 1301 of file LSM6DSOSensor.cpp.
| int reset_step_counter | ( | void | ) |
Enable step counter reset.
- Return values:
-
0 in case of success, an error code otherwise
Definition at line 1574 of file LSM6DSOSensor.cpp.
| int set_6d_orientation_threshold | ( | uint8_t | thr ) |
Set 6D orientation threshold.
- Parameters:
-
thr 6D Orientation detection threshold
- Return values:
-
0 in case of success, an error code otherwise
Definition at line 2303 of file LSM6DSOSensor.cpp.
| int set_fifo_g_bdr | ( | float | bdr ) |
Set the LSM6DSO FIFO gyro BDR value.
- Parameters:
-
bdr FIFO gyro BDR value
- Return values:
-
0 in case of success, an error code otherwise
Definition at line 2850 of file LSM6DSOSensor.cpp.
| int set_fifo_int1_fifo_full | ( | uint8_t | status ) |
Set the LSM6DSO FIFO full interrupt on INT1 pin.
- Parameters:
-
status FIFO full interrupt on INT1 pin status
- Return values:
-
0 in case of success, an error code otherwise
Definition at line 2636 of file LSM6DSOSensor.cpp.
| int set_fifo_mode | ( | uint8_t | mode ) |
Set the LSM6DSO FIFO mode.
- Parameters:
-
mode FIFO mode
- Return values:
-
0 in case of success, an error code otherwise
Definition at line 2686 of file LSM6DSOSensor.cpp.
| int set_fifo_stop_on_fth | ( | uint8_t | status ) |
Set the LSM6DSO FIFO stop on watermark.
- Parameters:
-
status FIFO stop on watermark status
- Return values:
-
0 in case of success, an error code otherwise
Definition at line 2672 of file LSM6DSOSensor.cpp.
| int set_fifo_watermark_level | ( | uint16_t | watermark ) |
Set the LSM6DSO FIFO watermark level.
- Parameters:
-
watermark FIFO watermark level
- Return values:
-
0 in case of success, an error code otherwise
Definition at line 2658 of file LSM6DSOSensor.cpp.
| int set_fifo_x_bdr | ( | float | bdr ) |
Set the LSM6DSO FIFO accelero BDR value.
- Parameters:
-
bdr FIFO accelero BDR value
- Return values:
-
0 in case of success, an error code otherwise
Definition at line 2787 of file LSM6DSOSensor.cpp.
| int set_free_fall_duration | ( | uint8_t | dur ) |
Set free fall duration.
- Parameters:
-
dur free fall detection duration
- Return values:
-
0 in case of success, an error code otherwise
Definition at line 1482 of file LSM6DSOSensor.cpp.
| int set_free_fall_threshold | ( | uint8_t | thr ) |
Set free fall threshold.
- Parameters:
-
thr free fall detection threshold
- Return values:
-
0 in case of success, an error code otherwise
Definition at line 1467 of file LSM6DSOSensor.cpp.
| int set_g_fs | ( | float | full_scale ) | [virtual] |
Set the LSM6DSO gyroscope sensor full scale.
- Parameters:
-
full_scale the functional full scale to be set
- Return values:
-
0 in case of success, an error code otherwise
Definition at line 1226 of file LSM6DSOSensor.cpp.
| int set_g_hpf_config | ( | uint8_t | hp_en_g, |
| uint8_t | hpm_g | ||
| ) | [virtual] |
Set the LSM6DSO gyroscope sensor high-pass filter configuration.
- Parameters:
-
hp_en_g the hpf enable to be set, hpm_g the cutoff selection to be set
- Return values:
-
0 in case of success, an error code otherwise
Definition at line 880 of file LSM6DSOSensor.cpp.
| int set_g_lpf_config | ( | uint8_t | lpf1_sel_g, |
| uint8_t | ftype | ||
| ) | [virtual] |
Set the LSM6DSO gyroscope sensor low-pass filter configuration.
- Parameters:
-
lpf1_sel_g the lpf enable to be set, ftype the filter configuration to be set
- Return values:
-
0 in case of success, an error code otherwise
Definition at line 802 of file LSM6DSOSensor.cpp.
| int set_g_odr | ( | float | odr ) | [virtual] |
Set the LSM6DSO gyroscope sensor output data rate.
- Parameters:
-
odr the output data rate value to be set
- Return values:
-
0 in case of success, an error code otherwise
Definition at line 1117 of file LSM6DSOSensor.cpp.
| int set_g_power_mode | ( | uint8_t | g_hm_mode ) | [virtual] |
Set the LSM6DSO gyroscope sensor power mode.
- Parameters:
-
g_hm_mode the high-performance mode to be set
- Return values:
-
0 in case of success, an error code otherwise
Definition at line 722 of file LSM6DSOSensor.cpp.
| int set_g_self_test | ( | uint8_t | val ) |
Set self test.
- Parameters:
-
val the value of st_xl in reg CTRL5_C
- Return values:
-
0 in case of success, an error code otherwise
Definition at line 2582 of file LSM6DSOSensor.cpp.
| int set_interrupt_latch | ( | uint8_t | status ) |
Set the interrupt latch.
- Parameters:
-
status value to be written
- Return values:
-
0 in case of success, an error code otherwise
Definition at line 1331 of file LSM6DSOSensor.cpp.
| int set_tap_duration_time | ( | uint8_t | time ) |
Set tap duration time.
- Parameters:
-
time tap duration time
- Return values:
-
0 in case of success, an error code otherwise
Definition at line 2190 of file LSM6DSOSensor.cpp.
| int set_tap_quiet_time | ( | uint8_t | time ) |
Set tap quiet time.
- Parameters:
-
time tap quiet time
- Return values:
-
0 in case of success, an error code otherwise
Definition at line 2175 of file LSM6DSOSensor.cpp.
| int set_tap_shock_time | ( | uint8_t | time ) |
Set tap shock time.
- Parameters:
-
time tap shock time
- Return values:
-
0 in case of success, an error code otherwise
Definition at line 2160 of file LSM6DSOSensor.cpp.
| int set_tap_threshold | ( | uint8_t | thr ) |
Set tap threshold.
- Parameters:
-
thr tap threshold
- Return values:
-
0 in case of success, an error code otherwise
Definition at line 2145 of file LSM6DSOSensor.cpp.
| int set_wake_up_duration | ( | uint8_t | dur ) |
Set wake up duration.
- Parameters:
-
dur wake up detection duration
- Return values:
-
0 in case of success, an error code otherwise
Definition at line 1810 of file LSM6DSOSensor.cpp.
| int set_wake_up_threshold | ( | uint8_t | thr ) |
Set wake up threshold.
- Parameters:
-
thr wake up detection threshold
- Return values:
-
0 in case of success, an error code otherwise
Definition at line 1795 of file LSM6DSOSensor.cpp.
| int set_x_filter_config | ( | uint8_t | hp_slope_xl_en, |
| uint8_t | hpcf_xl | ||
| ) | [virtual] |
Set the LSM6DSO accelerometer sensor filter configuration.
- Parameters:
-
hp_slope_xl_en the filter selection to be set, hpcf_xl the filter configuration to be set
- Return values:
-
0 in case of success, an error code otherwise
Definition at line 655 of file LSM6DSOSensor.cpp.
| int set_x_fs | ( | float | full_scale ) | [virtual] |
Set the LSM6DSO accelerometer sensor full scale.
- Parameters:
-
full_scale the functional full scale to be set
- Return values:
-
0 in case of success, an error code otherwise
Definition at line 438 of file LSM6DSOSensor.cpp.
| int set_x_lpf2_en | ( | uint8_t | lpf2_en ) | [virtual] |
Set the LSM6DSO accelerometer sensor high-resolution selection.
- Parameters:
-
lpf2_en the high-resolution selection to be set
- Return values:
-
0 in case of success, an error code otherwise
Definition at line 537 of file LSM6DSOSensor.cpp.
| int set_x_odr | ( | float | odr ) | [virtual] |
Set the LSM6DSO accelerometer sensor output data rate.
- Parameters:
-
odr the output data rate value to be set
- Return values:
-
0 in case of success, an error code otherwise
Definition at line 334 of file LSM6DSOSensor.cpp.
| int set_x_power_mode | ( | uint8_t | xl_hm_mode, |
| uint8_t | xl_ulp_en | ||
| ) | [virtual] |
Set the LSM6DSO accelerometer sensor power mode.
- Parameters:
-
xl_hm_mode the high-performance mode to be set, xl_ulp_en the ultra-low-power enable to be set
- Return values:
-
0 in case of success, an error code otherwise
Definition at line 500 of file LSM6DSOSensor.cpp.
| int set_x_self_test | ( | uint8_t | val ) |
Set self test.
- Parameters:
-
val the value of st_xl in reg CTRL5_C
- Return values:
-
0 in case of success, an error code otherwise
Definition at line 2547 of file LSM6DSOSensor.cpp.
| int write_reg | ( | uint8_t | reg, |
| uint8_t | data | ||
| ) |
Set the LSM6DSO register value.
- Parameters:
-
reg address to be written data value to be written
- Return values:
-
0 in case of success, an error code otherwise
Definition at line 1317 of file LSM6DSOSensor.cpp.
Generated on Sat Jul 16 2022 04:44:07 by
1.7.2