|
ChibiOS
21.6.0
|

Macros | |
| #define | lsm6ds0I2CWriteRegister(i2cp, sad, txbuf, n) |
| Writes a value into a register using I2C. More... | |
| #define | lsm6ds0AccelerometerGetAxesNumber(devp) accelerometerGetAxesNumber(&((devp)->acc_if)) |
| Return the number of axes of the BaseAccelerometer. More... | |
| #define | lsm6ds0AccelerometerReadRaw(devp, axes) accelerometerReadRaw(&((devp)->acc_if), axes) |
| Retrieves raw data from the BaseAccelerometer. More... | |
| #define | lsm6ds0AccelerometerReadCooked(devp, axes) accelerometerReadCooked(&((devp)->acc_if), axes) |
| Retrieves cooked data from the BaseAccelerometer. More... | |
| #define | lsm6ds0AccelerometerSetBias(devp, bp) accelerometerSetBias(&((devp)->acc_if), bp) |
| Set bias values for the BaseAccelerometer. More... | |
| #define | lsm6ds0AccelerometerResetBias(devp) accelerometerResetBias(&((devp)->acc_if)) |
| Reset bias values for the BaseAccelerometer. More... | |
| #define | lsm6ds0AccelerometerSetSensitivity(devp, sp) accelerometerSetSensitivity(&((devp)->acc_if), sp) |
| Set sensitivity values for the BaseAccelerometer. More... | |
| #define | lsm6ds0AccelerometerResetSensitivity(devp) accelerometerResetSensitivity(&((devp)->acc_if)) |
| Reset sensitivity values for the BaseAccelerometer. More... | |
| #define | lsm6ds0AccelerometerSetFullScale(devp, fs) (devp)->vmt->acc_set_full_scale(devp, fs) |
| Changes the LSM6DS0Driver accelerometer fullscale value. More... | |
| #define | lsm6ds0GyroscopeGetAxesNumber(devp) gyroscopeGetAxesNumber(&((devp)->gyro_if)) |
| Return the number of axes of the BaseGyroscope. More... | |
| #define | lsm6ds0GyroscopeReadRaw(devp, axes) gyroscopeReadRaw(&((devp)->gyro_if), axes) |
| Retrieves raw data from the BaseGyroscope. More... | |
| #define | lsm6ds0GyroscopeReadCooked(devp, axes) gyroscopeReadCooked(&((devp)->gyro_if), axes) |
| Retrieves cooked data from the BaseGyroscope. More... | |
| #define | lsm6ds0GyroscopeSampleBias(devp) gyroscopeSampleBias(&((devp)->gyro_if)) |
| Samples bias values for the BaseGyroscope. More... | |
| #define | lsm6ds0GyroscopeSetBias(devp, bp) gyroscopeSetBias(&((devp)->gyro_if), bp) |
| Set bias values for the BaseGyroscope. More... | |
| #define | lsm6ds0GyroscopeResetBias(devp) gyroscopeResetBias(&((devp)->gyro_if)) |
| Reset bias values for the BaseGyroscope. More... | |
| #define | lsm6ds0GyroscopeSetSensitivity(devp, sp) gyroscopeSetSensitivity(&((devp)->gyro_if), sp) |
| Set sensitivity values for the BaseGyroscope. More... | |
| #define | lsm6ds0GyroscopeResetSensitivity(devp) gyroscopeResetSensitivity(&((devp)->gyro_if)) |
| Reset sensitivity values for the BaseGyroscope. More... | |
| #define | lsm6ds0GyroscopeSetFullScale(devp, fs) (devp)->vmt->acc_set_full_scale(devp, fs) |
| Changes the LSM6DS0Driver gyroscope fullscale value. More... | |
Version identification | |
| #define | EX_LSM6DS0_VERSION "1.1.2" |
| LSM6DS0 driver version string. More... | |
| #define | EX_LSM6DS0_MAJOR 1 |
| LSM6DS0 driver version major number. More... | |
| #define | EX_LSM6DS0_MINOR 1 |
| LSM6DS0 driver version minor number. More... | |
| #define | EX_LSM6DS0_PATCH 2 |
| LSM6DS0 driver version patch number. More... | |
| #define | LSM6DS0_ACC_NUMBER_OF_AXES 3U |
| LSM6DS0 accelerometer subsystem characteristics. More... | |
| #define | LSM6DS0_GYRO_NUMBER_OF_AXES 3U |
| L3GD20 gyroscope system characteristics. More... | |
LSM6DS0 communication interfaces related bit masks | |
| #define | LSM6DS0_DI_MASK 0xFF |
| #define | LSM6DS0_DI(n) (1 << n) |
| #define | LSM6DS0_AD_MASK 0x7F |
| #define | LSM6DS0_AD(n) (1 << n) |
| #define | LSM6DS0_MS (1 << 7) |
LSM6DS0_AD_CTRL_REG10 register bits definitions | |
| #define | LSM6DS0_CTRL_REG10 0x05 |
| #define | LSM6DS0_CTRL_REG10_ST_XL (1 << 0) |
| #define | LSM6DS0_CTRL_REG10_ST_G (1 << 2) |
Configuration options | |
| #define | LSM6DS0_USE_SPI FALSE |
| LSM6DS0 SPI interface switch. More... | |
| #define | LSM6DS0_SHARED_SPI FALSE |
| LSM6DS0 shared SPI switch. More... | |
| #define | LSM6DS0_USE_I2C TRUE |
| LSM6DS0 I2C interface switch. More... | |
| #define | LSM6DS0_SHARED_I2C FALSE |
| LSM6DS0 shared I2C switch. More... | |
| #define | LSM6DS0_USE_ADVANCED FALSE |
| LSM6DS0 advanced configurations switch. More... | |
| #define | LSM6DS0_GYRO_BIAS_ACQ_TIMES 50 |
| Number of acquisitions for gyroscope bias removal. More... | |
| #define | LSM6DS0_GYRO_BIAS_SETTLING_US 5000 |
| Settling time for gyroscope bias removal. More... | |
LSM6DS0 data structures and types. | |
| enum | lsm6ds0_sad_t { LSM6DS0_SAD_GND = 0x6A, LSM6DS0_SAD_VCC = 0x6B } |
| Accelerometer and Gyroscope Slave Address. More... | |
| enum | lsm6ds0_acc_fs_t { LSM6DS0_ACC_FS_2G = 0x00, LSM6DS0_ACC_FS_4G = 0x10, LSM6DS0_ACC_FS_8G = 0x18, LSM6DS0_ACC_FS_16G = 0x08 } |
| LSM6DS0 accelerometer subsystem full scale. More... | |
| enum | lsm6ds0_acc_odr_t { LSM6DS0_ACC_ODR_PD = 0x00, LSM6DS0_ACC_ODR_10Hz = 0x20, LSM6DS0_ACC_ODR_50Hz = 0x40, LSM6DS0_ACC_ODR_119Hz = 0x60, LSM6DS0_ACC_ODR_238Hz = 0x80, LSM6DS0_ACC_ODR_476Hz = 0xA0, LSM6DS0_ACC_ODR_952Hz = 0xC0 } |
| LSM6DS0 accelerometer subsystem output data rate. More... | |
| enum | lsm6ds0_acc_dec_t { LSM6DS0_ACC_DEC_DISABLED = 0x00, LSM6DS0_ACC_DEC_X2 = 0x40, LSM6DS0_ACC_DEC_X4 = 0x80, LSM6DS0_ACC_DEC_X8 = 0xC0 } |
| LSM6DS0 accelerometer subsystem decimation mode. More... | |
| enum | lsm6ds0_gyro_fs_t { LSM6DS0_GYRO_FS_245DPS = 0x00, LSM6DS0_GYRO_FS_500DPS = 0x08, LSM6DS0_GYRO_FS_2000DPS = 0x18 } |
| LSM6DS0 gyroscope subsystem full scale. More... | |
| enum | lsm6ds0_gyro_odr_t |
| LSM6DS0 gyroscope subsystem output data rate. More... | |
| enum | lsm6ds0_gyro_lp_t { LSM6DS0_GYRO_LP_DISABLED = 0x00, LSM6DS0_GYRO_LP_ENABLED = 0x80 } |
| LSM6DS0 gyroscope subsystem low mode configuration. More... | |
| enum | lsm6ds0_gyro_out_sel_t { LSM6DS0_GYRO_OUT_SEL_0 = 0x00, LSM6DS0_GYRO_OUT_SEL_1 = 0x01, LSM6DS0_GYRO_OUT_SEL_2 = 0x02 } |
| LSM6DS0 gyroscope subsystem output selection. More... | |
| enum | lsm6ds0_gyro_hp_t { LSM6DS0_GYRO_HP_DISABLED = 0x00, LSM6DS0_GYRO_HP_ENABLED = 0x40 } |
| LSM6DS0 gyroscope subsystem high pass filter. More... | |
| enum | lsm6ds0_gyro_hpcf_t { LSM6DS0_GYRO_HPCF_0 = 0x00 } |
| LSM6DS0 gyroscope subsystem high pass filter configuration. More... | |
| enum | lsm6ds0_bdu_t { LSM6DS0_BDU_CONTINUOUS = 0x00, LSM6DS0_BDU_BLOCKED = 0x40 } |
| LSM6DS0 block data update. More... | |
| enum | lsm6ds0_end_t { LSM6DS0_END_LITTLE = 0x00, LSM6DS0_END_BIG = 0x20 } |
| LSM6DS0 endianness. More... | |
| enum | lsm6ds0_state_t { LSM6DS0_UNINIT = 0, LSM6DS0_STOP = 1, LSM6DS0_READY = 2 } |
| Driver state machine possible states. More... | |
| typedef struct LSM6DS0Driver | LSM6DS0Driver |
| Structure representing a LSM6DS0 driver. More... | |
| #define | _lsm6ds0_methods_alone |
LSM6DS0 specific methods. More... | |
| #define | _lsm6ds0_methods |
LSM6DS0 specific methods with inherited ones. More... | |
| #define | _lsm6ds0_data |
LSM6DS0Driver specific data. More... | |
Data Structures | |
| struct | LSM6DS0Config |
| LSM6DS0 configuration structure. More... | |
| struct | LSM6DS0VMT |
LSM6DS0 virtual methods table. More... | |
| struct | LSM6DS0Driver |
| LSM6DS0 6-axis accelerometer/gyroscope class. More... | |
Functions | |
| msg_t | lsm6ds0I2CReadRegister (I2CDriver *i2cp, lsm6ds0_sad_t sad, uint8_t reg, uint8_t *rxbuf, size_t n) |
| Reads registers value using I2C. More... | |
| static size_t | acc_get_axes_number (void *ip) |
| Return the number of axes of the BaseAccelerometer. More... | |
| static msg_t | acc_read_raw (void *ip, int32_t axes[]) |
| Retrieves raw data from the BaseAccelerometer. More... | |
| static msg_t | acc_read_cooked (void *ip, float axes[]) |
| Retrieves cooked data from the BaseAccelerometer. More... | |
| static msg_t | acc_set_bias (void *ip, float *bp) |
| Set bias values for the BaseAccelerometer. More... | |
| static msg_t | acc_reset_bias (void *ip) |
| Reset bias values for the BaseAccelerometer. More... | |
| static msg_t | acc_set_sensivity (void *ip, float *sp) |
| Set sensitivity values for the BaseAccelerometer. More... | |
| static msg_t | acc_reset_sensivity (void *ip) |
| Reset sensitivity values for the BaseAccelerometer. More... | |
| static msg_t | acc_set_full_scale (LSM6DS0Driver *devp, lsm6ds0_acc_fs_t fs) |
| Changes the LSM6DS0Driver accelerometer fullscale value. More... | |
| static size_t | gyro_get_axes_number (void *ip) |
| Return the number of axes of the BaseGyroscope. More... | |
| static msg_t | gyro_read_raw (void *ip, int32_t axes[LSM6DS0_GYRO_NUMBER_OF_AXES]) |
| Retrieves raw data from the BaseGyroscope. More... | |
| static msg_t | gyro_read_cooked (void *ip, float axes[]) |
| Retrieves cooked data from the BaseGyroscope. More... | |
| static msg_t | gyro_sample_bias (void *ip) |
| Samples bias values for the BaseGyroscope. More... | |
| static msg_t | gyro_set_bias (void *ip, float *bp) |
| Set bias values for the BaseGyroscope. More... | |
| static msg_t | gyro_reset_bias (void *ip) |
| Reset bias values for the BaseGyroscope. More... | |
| static msg_t | gyro_set_sensivity (void *ip, float *sp) |
| Set sensitivity values for the BaseGyroscope. More... | |
| static msg_t | gyro_reset_sensivity (void *ip) |
| Reset sensitivity values for the BaseGyroscope. More... | |
| static msg_t | gyro_set_full_scale (LSM6DS0Driver *devp, lsm6ds0_gyro_fs_t fs) |
| Changes the LSM6DS0Driver gyroscope fullscale value. More... | |
| void | lsm6ds0ObjectInit (LSM6DS0Driver *devp) |
| Initializes an instance. More... | |
| void | lsm6ds0Start (LSM6DS0Driver *devp, const LSM6DS0Config *config) |
| Configures and activates LSM6DS0 Complex Driver peripheral. More... | |
| void | lsm6ds0Stop (LSM6DS0Driver *devp) |
| Deactivates the LSM6DS0 Complex Driver peripheral. More... | |
| #define lsm6ds0I2CWriteRegister | ( | i2cp, | |
| sad, | |||
| txbuf, | |||
| n | |||
| ) |
Writes a value into a register using I2C.
| [in] | i2cp | pointer to the I2C interface |
| [in] | sad | slave address without R bit |
| [in] | txbuf | buffer containing sub-address value in first position and values to write |
| [in] | n | size of txbuf less one (not considering the first element) |
| #define EX_LSM6DS0_VERSION "1.1.2" |
| #define EX_LSM6DS0_MAJOR 1 |
| #define EX_LSM6DS0_MINOR 1 |
| #define EX_LSM6DS0_PATCH 2 |
| #define LSM6DS0_ACC_NUMBER_OF_AXES 3U |
| #define LSM6DS0_GYRO_NUMBER_OF_AXES 3U |
| #define LSM6DS0_USE_SPI FALSE |
| #define LSM6DS0_SHARED_SPI FALSE |
| #define LSM6DS0_USE_I2C TRUE |
| #define LSM6DS0_SHARED_I2C FALSE |
| #define LSM6DS0_USE_ADVANCED FALSE |
| #define LSM6DS0_GYRO_BIAS_ACQ_TIMES 50 |
| #define LSM6DS0_GYRO_BIAS_SETTLING_US 5000 |
| #define _lsm6ds0_methods_alone |
LSM6DS0 specific methods.
| #define _lsm6ds0_methods |
| #define _lsm6ds0_data |
LSM6DS0Driver specific data.
| #define lsm6ds0AccelerometerGetAxesNumber | ( | devp | ) | accelerometerGetAxesNumber(&((devp)->acc_if)) |
Return the number of axes of the BaseAccelerometer.
| [in] | devp | pointer to LSM6DS0Driver. |
| #define lsm6ds0AccelerometerReadRaw | ( | devp, | |
| axes | |||
| ) | accelerometerReadRaw(&((devp)->acc_if), axes) |
Retrieves raw data from the BaseAccelerometer.
| [in] | devp | pointer to LSM6DS0Driver. |
| [out] | axes | a buffer which would be filled with raw data. |
| MSG_OK | if the function succeeded. |
| MSG_RESET | if one or more I2C errors occurred, the errors can be retrieved using i2cGetErrors(). |
| MSG_TIMEOUT | if a timeout occurred before operation end. |
| #define lsm6ds0AccelerometerReadCooked | ( | devp, | |
| axes | |||
| ) | accelerometerReadCooked(&((devp)->acc_if), axes) |
Retrieves cooked data from the BaseAccelerometer.
| [in] | devp | pointer to LSM6DS0Driver. |
| [out] | axes | a buffer which would be filled with cooked data. |
| MSG_OK | if the function succeeded. |
| MSG_RESET | if one or more I2C errors occurred, the errors can be retrieved using i2cGetErrors(). |
| MSG_TIMEOUT | if a timeout occurred before operation end. |
| #define lsm6ds0AccelerometerSetBias | ( | devp, | |
| bp | |||
| ) | accelerometerSetBias(&((devp)->acc_if), bp) |
Set bias values for the BaseAccelerometer.
| [in] | devp | pointer to LSM6DS0Driver. |
| [in] | bp | a buffer which contains biases. |
| MSG_OK | if the function succeeded. |
| #define lsm6ds0AccelerometerResetBias | ( | devp | ) | accelerometerResetBias(&((devp)->acc_if)) |
Reset bias values for the BaseAccelerometer.
| [in] | devp | pointer to LSM6DS0Driver. |
| MSG_OK | if the function succeeded. |
| #define lsm6ds0AccelerometerSetSensitivity | ( | devp, | |
| sp | |||
| ) | accelerometerSetSensitivity(&((devp)->acc_if), sp) |
Set sensitivity values for the BaseAccelerometer.
| [in] | devp | pointer to LSM6DS0Driver. |
| [in] | sp | a buffer which contains sensitivities. |
| MSG_OK | if the function succeeded. |
| #define lsm6ds0AccelerometerResetSensitivity | ( | devp | ) | accelerometerResetSensitivity(&((devp)->acc_if)) |
Reset sensitivity values for the BaseAccelerometer.
| [in] | devp | pointer to LSM6DS0Driver. |
| MSG_OK | if the function succeeded. |
| MSG_RESET | otherwise. |
| #define lsm6ds0AccelerometerSetFullScale | ( | devp, | |
| fs | |||
| ) | (devp)->vmt->acc_set_full_scale(devp, fs) |
Changes the LSM6DS0Driver accelerometer fullscale value.
| [in] | devp | pointer to LSM6DS0Driver. |
| [in] | fs | new fullscale value. |
| MSG_OK | if the function succeeded. |
| MSG_RESET | otherwise. |
| #define lsm6ds0GyroscopeGetAxesNumber | ( | devp | ) | gyroscopeGetAxesNumber(&((devp)->gyro_if)) |
Return the number of axes of the BaseGyroscope.
| [in] | devp | pointer to LSM6DS0Driver. |
| #define lsm6ds0GyroscopeReadRaw | ( | devp, | |
| axes | |||
| ) | gyroscopeReadRaw(&((devp)->gyro_if), axes) |
Retrieves raw data from the BaseGyroscope.
| [in] | devp | pointer to LSM6DS0Driver. |
| [out] | axes | a buffer which would be filled with raw data. |
| MSG_OK | if the function succeeded. |
| MSG_RESET | if one or more I2C errors occurred, the errors can be retrieved using i2cGetErrors(). |
| MSG_TIMEOUT | if a timeout occurred before operation end. |
| #define lsm6ds0GyroscopeReadCooked | ( | devp, | |
| axes | |||
| ) | gyroscopeReadCooked(&((devp)->gyro_if), axes) |
Retrieves cooked data from the BaseGyroscope.
| [in] | devp | pointer to LSM6DS0Driver. |
| [out] | axes | a buffer which would be filled with cooked data. |
| MSG_OK | if the function succeeded. |
| MSG_RESET | if one or more I2C errors occurred, the errors can be retrieved using i2cGetErrors(). |
| MSG_TIMEOUT | if a timeout occurred before operation end. |
| #define lsm6ds0GyroscopeSampleBias | ( | devp | ) | gyroscopeSampleBias(&((devp)->gyro_if)) |
Samples bias values for the BaseGyroscope.
LSM6DS0_BIAS_ACQ_TIMES and LSM6DS0_BIAS_SETTLING_US.| [in] | devp | pointer to LSM6DS0Driver. |
| MSG_OK | if the function succeeded. |
| MSG_RESET | if one or more I2C errors occurred, the errors can be retrieved using i2cGetErrors(). |
| MSG_TIMEOUT | if a timeout occurred before operation end. |
| #define lsm6ds0GyroscopeSetBias | ( | devp, | |
| bp | |||
| ) | gyroscopeSetBias(&((devp)->gyro_if), bp) |
Set bias values for the BaseGyroscope.
| [in] | devp | pointer to LSM6DS0Driver. |
| [in] | bp | a buffer which contains biases. |
| MSG_OK | if the function succeeded. |
| #define lsm6ds0GyroscopeResetBias | ( | devp | ) | gyroscopeResetBias(&((devp)->gyro_if)) |
Reset bias values for the BaseGyroscope.
| [in] | devp | pointer to LSM6DS0Driver. |
| MSG_OK | if the function succeeded. |
| #define lsm6ds0GyroscopeSetSensitivity | ( | devp, | |
| sp | |||
| ) | gyroscopeSetSensitivity(&((devp)->gyro_if), sp) |
Set sensitivity values for the BaseGyroscope.
| [in] | devp | pointer to LSM6DS0Driver. |
| [in] | sp | a buffer which contains sensitivities. |
| MSG_OK | if the function succeeded. |
| #define lsm6ds0GyroscopeResetSensitivity | ( | devp | ) | gyroscopeResetSensitivity(&((devp)->gyro_if)) |
Reset sensitivity values for the BaseGyroscope.
| [in] | devp | pointer to LSM6DS0Driver. |
| MSG_OK | if the function succeeded. |
| MSG_RESET | otherwise. |
| #define lsm6ds0GyroscopeSetFullScale | ( | devp, | |
| fs | |||
| ) | (devp)->vmt->acc_set_full_scale(devp, fs) |
Changes the LSM6DS0Driver gyroscope fullscale value.
| [in] | devp | pointer to LSM6DS0Driver. |
| [in] | fs | new fullscale value. |
| MSG_OK | if the function succeeded. |
| MSG_RESET | otherwise. |
| typedef struct LSM6DS0Driver LSM6DS0Driver |
| enum lsm6ds0_sad_t |
| enum lsm6ds0_acc_fs_t |
| enum lsm6ds0_acc_odr_t |
| enum lsm6ds0_acc_dec_t |
| enum lsm6ds0_gyro_fs_t |
| enum lsm6ds0_gyro_odr_t |
| enum lsm6ds0_gyro_lp_t |
| enum lsm6ds0_gyro_hp_t |
| enum lsm6ds0_gyro_hpcf_t |
| enum lsm6ds0_bdu_t |
| enum lsm6ds0_end_t |
| enum lsm6ds0_state_t |
| msg_t lsm6ds0I2CReadRegister | ( | I2CDriver * | i2cp, |
| lsm6ds0_sad_t | sad, | ||
| uint8_t | reg, | ||
| uint8_t * | rxbuf, | ||
| size_t | n | ||
| ) |
Reads registers value using I2C.
| [in] | i2cp | pointer to the I2C interface |
| [in] | sad | slave address without R bit |
| [in] | reg | first sub-register address |
| [out] | rxbuf | pointer to an output buffer |
| [in] | n | number of consecutive register to read |
Definition at line 63 of file lsm6ds0.c.
References i2cMasterTransmitTimeout(), and TIME_INFINITE.
Referenced by acc_read_raw(), and gyro_read_raw().

|
static |
Return the number of axes of the BaseAccelerometer.
| [in] | ip | pointer to BaseAccelerometer interface. |
Definition at line 95 of file lsm6ds0.c.
References LSM6DS0_ACC_NUMBER_OF_AXES.
|
static |
Retrieves raw data from the BaseAccelerometer.
| [in] | ip | pointer to BaseAccelerometer interface. |
| [out] | axes | a buffer which would be filled with raw data. |
| MSG_OK | if the function succeeded. |
| MSG_RESET | if one or more I2C errors occurred, the errors can be retrieved using i2cGetErrors(). |
| MSG_TIMEOUT | if a timeout occurred before operation end. |
Definition at line 117 of file lsm6ds0.c.
References I2C_READY, i2cAcquireBus(), i2cStart(), LSM6DS0_ACC_NUMBER_OF_AXES, LSM6DS0_READY, lsm6ds0I2CReadRegister(), objGetInstance, osalDbgAssert, and osalDbgCheck.
Referenced by acc_read_cooked().

|
static |
Retrieves cooked data from the BaseAccelerometer.
| [in] | ip | pointer to BaseAccelerometer interface. |
| [out] | axes | a buffer which would be filled with cooked data. |
| MSG_OK | if the function succeeded. |
| MSG_RESET | if one or more I2C errors occurred, the errors can be retrieved using i2cGetErrors(). |
| MSG_TIMEOUT | if a timeout occurred before operation end. |
Definition at line 173 of file lsm6ds0.c.
References acc_read_raw(), LSM6DS0_ACC_NUMBER_OF_AXES, LSM6DS0_READY, objGetInstance, osalDbgAssert, and osalDbgCheck.

|
static |
Set bias values for the BaseAccelerometer.
| [in] | ip | pointer to BaseAccelerometer interface. |
| [in] | bp | a buffer which contains biases. |
| MSG_OK | if the function succeeded. |
Definition at line 206 of file lsm6ds0.c.
References LSM6DS0_ACC_NUMBER_OF_AXES, LSM6DS0_READY, MSG_OK, objGetInstance, osalDbgAssert, and osalDbgCheck.
|
static |
Reset bias values for the BaseAccelerometer.
| [in] | ip | pointer to BaseAccelerometer interface. |
| MSG_OK | if the function succeeded. |
Definition at line 235 of file lsm6ds0.c.
References LSM6DS0_ACC_NUMBER_OF_AXES, LSM6DS0_READY, MSG_OK, objGetInstance, osalDbgAssert, and osalDbgCheck.
|
static |
Set sensitivity values for the BaseAccelerometer.
| [in] | ip | pointer to BaseAccelerometer interface. |
| [in] | sp | a buffer which contains sensitivities. |
| MSG_OK | if the function succeeded. |
Definition at line 265 of file lsm6ds0.c.
References LSM6DS0_ACC_NUMBER_OF_AXES, LSM6DS0_READY, MSG_OK, objGetInstance, osalDbgAssert, and osalDbgCheck.
|
static |
Reset sensitivity values for the BaseAccelerometer.
| [in] | ip | pointer to BaseAccelerometer interface. |
| MSG_OK | if the function succeeded. |
| MSG_RESET | otherwise. |
Definition at line 294 of file lsm6ds0.c.
References LSM6DS0_ACC_FS_2G, LSM6DS0_ACC_NUMBER_OF_AXES, LSM6DS0_READY, MSG_OK, objGetInstance, osalDbgAssert, and osalDbgCheck.
|
static |
Changes the LSM6DS0Driver accelerometer fullscale value.
| [in] | devp | pointer to LSM6DS0Driver interface. |
| [in] | fs | new fullscale value. |
| MSG_OK | if the function succeeded. |
| MSG_RESET | otherwise. |
Definition at line 339 of file lsm6ds0.c.
References I2C_READY, LSM6DS0_ACC_FS_2G, LSM6DS0_READY, osalDbgAssert, and osalDbgCheck.
|
static |
Return the number of axes of the BaseGyroscope.
| [in] | ip | pointer to BaseGyroscope interface. |
Definition at line 427 of file lsm6ds0.c.
References LSM6DS0_GYRO_NUMBER_OF_AXES.
|
static |
Retrieves raw data from the BaseGyroscope.
| [in] | ip | pointer to BaseGyroscope interface. |
| [out] | axes | a buffer which would be filled with raw data. |
| MSG_OK | if the function succeeded. |
| MSG_RESET | if one or more I2C errors occurred, the errors can be retrieved using i2cGetErrors(). |
| MSG_TIMEOUT | if a timeout occurred before operation end. |
Definition at line 449 of file lsm6ds0.c.
References I2C_READY, i2cAcquireBus(), i2cStart(), LSM6DS0_GYRO_NUMBER_OF_AXES, LSM6DS0_READY, lsm6ds0I2CReadRegister(), MSG_OK, objGetInstance, osalDbgAssert, and osalDbgCheck.
Referenced by gyro_read_cooked(), and gyro_sample_bias().

|
static |
Retrieves cooked data from the BaseGyroscope.
| [in] | ip | pointer to BaseGyroscope interface. |
| [out] | axes | a buffer which would be filled with cooked data. |
| MSG_OK | if the function succeeded. |
| MSG_RESET | if one or more I2C errors occurred, the errors can be retrieved using i2cGetErrors(). |
| MSG_TIMEOUT | if a timeout occurred before operation end. |
Definition at line 505 of file lsm6ds0.c.
References gyro_read_raw(), LSM6DS0_GYRO_NUMBER_OF_AXES, LSM6DS0_READY, objGetInstance, osalDbgAssert, and osalDbgCheck.

|
static |
Samples bias values for the BaseGyroscope.
LSM6DS0_BIAS_ACQ_TIMES and LSM6DS0_BIAS_SETTLING_US.| [in] | ip | pointer to BaseGyroscope interface. |
| MSG_OK | if the function succeeded. |
Definition at line 538 of file lsm6ds0.c.
References gyro_read_raw(), I2C_READY, LSM6DS0_GYRO_BIAS_ACQ_TIMES, LSM6DS0_GYRO_BIAS_SETTLING_US, LSM6DS0_GYRO_NUMBER_OF_AXES, LSM6DS0_READY, MSG_OK, objGetInstance, osalDbgAssert, osalDbgCheck, and osalThreadSleepMicroseconds.

|
static |
Set bias values for the BaseGyroscope.
| [in] | ip | pointer to BaseGyroscope interface. |
| [in] | bp | a buffer which contains biases. |
| MSG_OK | if the function succeeded. |
Definition at line 586 of file lsm6ds0.c.
References LSM6DS0_GYRO_NUMBER_OF_AXES, LSM6DS0_READY, MSG_OK, objGetInstance, osalDbgAssert, and osalDbgCheck.
|
static |
Reset bias values for the BaseGyroscope.
| [in] | ip | pointer to BaseGyroscope interface. |
| MSG_OK | if the function succeeded. |
Definition at line 615 of file lsm6ds0.c.
References LSM6DS0_GYRO_NUMBER_OF_AXES, LSM6DS0_READY, MSG_OK, objGetInstance, osalDbgAssert, and osalDbgCheck.
|
static |
Set sensitivity values for the BaseGyroscope.
| [in] | ip | pointer to BaseGyroscope interface. |
| [in] | sp | a buffer which contains sensitivities. |
| MSG_OK | if the function succeeded. |
Definition at line 645 of file lsm6ds0.c.
References LSM6DS0_GYRO_NUMBER_OF_AXES, LSM6DS0_READY, MSG_OK, objGetInstance, osalDbgAssert, and osalDbgCheck.
|
static |
Reset sensitivity values for the BaseGyroscope.
| [in] | ip | pointer to BaseGyroscope interface. |
| MSG_OK | if the function succeeded. |
| MSG_RESET | otherwise. |
Definition at line 674 of file lsm6ds0.c.
References LSM6DS0_GYRO_FS_245DPS, LSM6DS0_GYRO_NUMBER_OF_AXES, LSM6DS0_READY, MSG_OK, objGetInstance, osalDbgAssert, and osalDbgCheck.
|
static |
Changes the LSM6DS0Driver gyroscope fullscale value.
| [in] | devp | pointer to BaseGyroscope interface. |
| [in] | fs | new fullscale value. |
| MSG_OK | if the function succeeded. |
| MSG_RESET | otherwise. |
Definition at line 716 of file lsm6ds0.c.
References I2C_READY, LSM6DS0_GYRO_FS_245DPS, LSM6DS0_READY, MSG_OK, osalDbgAssert, and osalDbgCheck.
| void lsm6ds0ObjectInit | ( | LSM6DS0Driver * | devp | ) |
Initializes an instance.
| [out] | devp | pointer to the LSM6DS0Driver object |
Definition at line 821 of file lsm6ds0.c.
References LSM6DS0Driver::vmt.
| void lsm6ds0Start | ( | LSM6DS0Driver * | devp, |
| const LSM6DS0Config * | config | ||
| ) |
Configures and activates LSM6DS0 Complex Driver peripheral.
| [in] | devp | pointer to the LSM6DS0Driver object |
| [in] | config | pointer to the LSM6DS0Config object |
Definition at line 842 of file lsm6ds0.c.
References LSM6DS0_READY, LSM6DS0_STOP, osalDbgAssert, and osalDbgCheck.
| void lsm6ds0Stop | ( | LSM6DS0Driver * | devp | ) |
Deactivates the LSM6DS0 Complex Driver peripheral.
| [in] | devp | pointer to the LSM6DS0Driver object |
Definition at line 1074 of file lsm6ds0.c.
References i2cAcquireBus(), i2cStart(), LSM6DS0_READY, LSM6DS0_STOP, osalDbgAssert, and osalDbgCheck.
