|
ChibiOS
0.0.0
|
|
Macros | |
| #define | lsm6dslI2CWriteRegister(i2cp, sad, txbuf, n) |
| Writes a value into a register using I2C. More... | |
| #define | lsm6dslAccelerometerGetAxesNumber(devp) accelerometerGetAxesNumber(&((devp)->acc_if)) |
| Return the number of axes of the BaseAccelerometer. More... | |
| #define | lsm6dslAccelerometerReadRaw(devp, axes) accelerometerReadRaw(&((devp)->acc_if), axes) |
| Retrieves raw data from the BaseAccelerometer. More... | |
| #define | lsm6dslAccelerometerReadCooked(devp, axes) accelerometerReadCooked(&((devp)->acc_if), axes) |
| Retrieves cooked data from the BaseAccelerometer. More... | |
| #define | lsm6dslAccelerometerSetBias(devp, bp) accelerometerSetBias(&((devp)->acc_if), bp) |
| Set bias values for the BaseAccelerometer. More... | |
| #define | lsm6dslAccelerometerResetBias(devp) accelerometerResetBias(&((devp)->acc_if)) |
| Reset bias values for the BaseAccelerometer. More... | |
| #define | lsm6dslAccelerometerSetSensitivity(devp, sp) accelerometerSetSensitivity(&((devp)->acc_if), sp) |
| Set sensitivity values for the BaseAccelerometer. More... | |
| #define | lsm6dslAccelerometerResetSensitivity(devp) accelerometerResetSensitivity(&((devp)->acc_if)) |
| Reset sensitivity values for the BaseAccelerometer. More... | |
| #define | lsm6dslAccelerometerSetFullScale(devp, fs) (devp)->vmt->acc_set_full_scale(devp, fs) |
| Changes the LSM6DSLDriver accelerometer fullscale value. More... | |
| #define | lsm6dslGyroscopeGetAxesNumber(devp) gyroscopeGetAxesNumber(&((devp)->gyro_if)) |
| Return the number of axes of the BaseGyroscope. More... | |
| #define | lsm6dslGyroscopeReadRaw(devp, axes) gyroscopeReadRaw(&((devp)->gyro_if), axes) |
| Retrieves raw data from the BaseGyroscope. More... | |
| #define | lsm6dslGyroscopeReadCooked(devp, axes) gyroscopeReadCooked(&((devp)->gyro_if), axes) |
| Retrieves cooked data from the BaseGyroscope. More... | |
| #define | lsm6dslGyroscopeSampleBias(devp) gyroscopeSampleBias(&((devp)->gyro_if)) |
| Samples bias values for the BaseGyroscope. More... | |
| #define | lsm6dslGyroscopeSetBias(devp, bp) gyroscopeSetBias(&((devp)->gyro_if), bp) |
| Set bias values for the BaseGyroscope. More... | |
| #define | lsm6dslGyroscopeResetBias(devp) gyroscopeResetBias(&((devp)->gyro_if)) |
| Reset bias values for the BaseGyroscope. More... | |
| #define | lsm6dslGyroscopeSetSensitivity(devp, sp) gyroscopeSetSensitivity(&((devp)->gyro_if), sp) |
| Set sensitivity values for the BaseGyroscope. More... | |
| #define | lsm6dslGyroscopeResetSensitivity(devp) gyroscopeResetSensitivity(&((devp)->gyro_if)) |
| Reset sensitivity values for the BaseGyroscope. More... | |
| #define | lsm6dslGyroscopeSetFullScale(devp, fs) (devp)->vmt->acc_set_full_scale(devp, fs) |
| Changes the LSM6DSLDriver gyroscope fullscale value. More... | |
Version identification | |
| #define | EX_LSM6DSL_VERSION "1.0.0" |
| LSM6DSL driver version string. More... | |
| #define | EX_LSM6DSL_MAJOR 1 |
| LSM6DSL driver version major number. More... | |
| #define | EX_LSM6DSL_MINOR 0 |
| LSM6DSL driver version minor number. More... | |
| #define | EX_LSM6DSL_PATCH 0 |
| LSM6DSL driver version patch number. More... | |
| #define | LSM6DSL_ACC_NUMBER_OF_AXES 3U |
| LSM6DSL accelerometer subsystem characteristics. More... | |
| #define | LSM6DSL_GYRO_NUMBER_OF_AXES 3U |
| L3GD20 gyroscope system characteristics. More... | |
LSM6DSL communication interfaces related bit masks | |
| #define | LSM6DSL_DI_MASK 0xFF |
| #define | LSM6DSL_DI(n) (1 << n) |
| #define | LSM6DSL_AD_MASK 0x7F |
| #define | LSM6DSL_AD(n) (1 << n) |
| #define | LSM6DSL_MS (1 << 7) |
Configuration options | |
| #define | LSM6DSL_USE_SPI FALSE |
| LSM6DSL SPI interface switch. More... | |
| #define | LSM6DSL_SHARED_SPI FALSE |
| LSM6DSL shared SPI switch. More... | |
| #define | LSM6DSL_USE_I2C TRUE |
| LSM6DSL I2C interface switch. More... | |
| #define | LSM6DSL_SHARED_I2C FALSE |
| LSM6DSL shared I2C switch. More... | |
| #define | LSM6DSL_USE_ADVANCED FALSE |
| LSM6DSL advanced configurations switch. More... | |
| #define | LSM6DSL_ACC_USE_ADVANCED FALSE |
| LSM6DSL accelerometer subsystem advanced configurations switch. More... | |
| #define | LSM6DSL_GYRO_USE_ADVANCED FALSE |
| LSM6DSL gyroscope subsystem advanced configurations switch. More... | |
| #define | LSM6DSL_GYRO_BIAS_ACQ_TIMES 50 |
| Number of acquisitions for gyroscope bias removal. More... | |
| #define | LSM6DSL_GYRO_BIAS_SETTLING_US 5000 |
| Settling time for gyroscope bias removal. More... | |
LSM6DSL data structures and types. | |
| |
| typedef struct LSM6DSLDriver | LSM6DSLDriver |
| Structure representing a LSM6DSL driver. More... | |
| #define | _lsm6dsl_methods_alone |
LSM6DSL specific methods. More... | |
| #define | _lsm6dsl_methods |
LSM6DSL specific methods with inherited ones. More... | |
| #define | _lsm6dsl_data |
LSM6DSLDriver specific data. More... | |
Data Structures | |
| struct | LSM6DSLConfig |
| LSM6DSL configuration structure. More... | |
| struct | LSM6DSLVMT |
LSM6DSL virtual methods table. More... | |
| struct | LSM6DSLDriver |
| LSM6DSL 6-axis accelerometer/gyroscope class. More... | |
Functions | |
| msg_t | lsm6dslI2CReadRegister (I2CDriver *i2cp, lsm6dsl_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 (LSM6DSLDriver *devp, lsm6dsl_acc_fs_t fs) |
| Changes the LSM6DSLDriver 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[LSM6DSL_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 (LSM6DSLDriver *devp, lsm6dsl_gyro_fs_t fs) |
| Changes the LSM6DSLDriver gyroscope fullscale value. More... | |
| void | lsm6dslObjectInit (LSM6DSLDriver *devp) |
| Initializes an instance. More... | |
| void | lsm6dslStart (LSM6DSLDriver *devp, const LSM6DSLConfig *config) |
| Configures and activates LSM6DSL Complex Driver peripheral. More... | |
| void | lsm6dslStop (LSM6DSLDriver *devp) |
| Deactivates the LSM6DSL Complex Driver peripheral. More... | |
| #define lsm6dslI2CWriteRegister | ( | 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) |
Definition at line 83 of file lsm6dsl.c.
Referenced by acc_set_full_scale(), gyro_set_full_scale(), lsm6dslStart(), and lsm6dslStop().
| #define EX_LSM6DSL_VERSION "1.0.0" |
| #define EX_LSM6DSL_MAJOR 1 |
| #define EX_LSM6DSL_MINOR 0 |
| #define EX_LSM6DSL_PATCH 0 |
| #define LSM6DSL_ACC_NUMBER_OF_AXES 3U |
LSM6DSL accelerometer subsystem characteristics.
Definition at line 72 of file lsm6dsl.h.
Referenced by acc_get_axes_number(), acc_read_cooked(), acc_read_raw(), acc_reset_bias(), acc_reset_sensivity(), acc_set_bias(), acc_set_full_scale(), acc_set_sensivity(), lsm6dslObjectInit(), and lsm6dslStart().
| #define LSM6DSL_GYRO_NUMBER_OF_AXES 3U |
L3GD20 gyroscope system characteristics.
Definition at line 95 of file lsm6dsl.h.
Referenced by gyro_get_axes_number(), gyro_read_cooked(), gyro_read_raw(), gyro_reset_bias(), gyro_reset_sensivity(), gyro_sample_bias(), gyro_set_bias(), gyro_set_full_scale(), gyro_set_sensivity(), lsm6dslObjectInit(), and lsm6dslStart().
| #define LSM6DSL_USE_SPI FALSE |
| #define LSM6DSL_SHARED_SPI FALSE |
| #define LSM6DSL_USE_I2C TRUE |
| #define LSM6DSL_SHARED_I2C FALSE |
| #define LSM6DSL_USE_ADVANCED FALSE |
| #define LSM6DSL_ACC_USE_ADVANCED FALSE |
| #define LSM6DSL_GYRO_USE_ADVANCED FALSE |
| #define LSM6DSL_GYRO_BIAS_ACQ_TIMES 50 |
Number of acquisitions for gyroscope bias removal.
This is the number of acquisitions performed to compute the bias. A repetition is required in order to remove noise.
Definition at line 436 of file lsm6dsl.h.
Referenced by gyro_sample_bias().
| #define LSM6DSL_GYRO_BIAS_SETTLING_US 5000 |
Settling time for gyroscope bias removal.
This is the time between each bias acquisition.
Definition at line 444 of file lsm6dsl.h.
Referenced by gyro_sample_bias().
| #define _lsm6dsl_methods_alone |
LSM6DSL specific methods.
| #define _lsm6dsl_methods |
LSM6DSL specific methods with inherited ones.
| #define _lsm6dsl_data |
LSM6DSLDriver specific data.
| #define lsm6dslAccelerometerGetAxesNumber | ( | devp | ) | accelerometerGetAxesNumber(&((devp)->acc_if)) |
Return the number of axes of the BaseAccelerometer.
| [in] | devp | pointer to LSM6DSLDriver. |
| #define lsm6dslAccelerometerReadRaw | ( | devp, | |
| axes | |||
| ) | accelerometerReadRaw(&((devp)->acc_if), axes) |
Retrieves raw data from the BaseAccelerometer.
| [in] | devp | pointer to LSM6DSLDriver. |
| [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 lsm6dslAccelerometerReadCooked | ( | devp, | |
| axes | |||
| ) | accelerometerReadCooked(&((devp)->acc_if), axes) |
Retrieves cooked data from the BaseAccelerometer.
| [in] | devp | pointer to LSM6DSLDriver. |
| [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 lsm6dslAccelerometerSetBias | ( | devp, | |
| bp | |||
| ) | accelerometerSetBias(&((devp)->acc_if), bp) |
Set bias values for the BaseAccelerometer.
| [in] | devp | pointer to LSM6DSLDriver. |
| [in] | bp | a buffer which contains biases. |
| MSG_OK | if the function succeeded. |
| #define lsm6dslAccelerometerResetBias | ( | devp | ) | accelerometerResetBias(&((devp)->acc_if)) |
Reset bias values for the BaseAccelerometer.
| [in] | devp | pointer to LSM6DSLDriver. |
| MSG_OK | if the function succeeded. |
| #define lsm6dslAccelerometerSetSensitivity | ( | devp, | |
| sp | |||
| ) | accelerometerSetSensitivity(&((devp)->acc_if), sp) |
Set sensitivity values for the BaseAccelerometer.
| [in] | devp | pointer to LSM6DSLDriver. |
| [in] | sp | a buffer which contains sensitivities. |
| MSG_OK | if the function succeeded. |
| #define lsm6dslAccelerometerResetSensitivity | ( | devp | ) | accelerometerResetSensitivity(&((devp)->acc_if)) |
Reset sensitivity values for the BaseAccelerometer.
| [in] | devp | pointer to LSM6DSLDriver. |
| MSG_OK | if the function succeeded. |
| MSG_RESET | otherwise. |
| #define lsm6dslAccelerometerSetFullScale | ( | devp, | |
| fs | |||
| ) | (devp)->vmt->acc_set_full_scale(devp, fs) |
Changes the LSM6DSLDriver accelerometer fullscale value.
| [in] | devp | pointer to LSM6DSLDriver. |
| [in] | fs | new fullscale value. |
| MSG_OK | if the function succeeded. |
| MSG_RESET | otherwise. |
| #define lsm6dslGyroscopeGetAxesNumber | ( | devp | ) | gyroscopeGetAxesNumber(&((devp)->gyro_if)) |
Return the number of axes of the BaseGyroscope.
| [in] | devp | pointer to LSM6DSLDriver. |
| #define lsm6dslGyroscopeReadRaw | ( | devp, | |
| axes | |||
| ) | gyroscopeReadRaw(&((devp)->gyro_if), axes) |
Retrieves raw data from the BaseGyroscope.
| [in] | devp | pointer to LSM6DSLDriver. |
| [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 lsm6dslGyroscopeReadCooked | ( | devp, | |
| axes | |||
| ) | gyroscopeReadCooked(&((devp)->gyro_if), axes) |
Retrieves cooked data from the BaseGyroscope.
| [in] | devp | pointer to LSM6DSLDriver. |
| [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 lsm6dslGyroscopeSampleBias | ( | devp | ) | gyroscopeSampleBias(&((devp)->gyro_if)) |
Samples bias values for the BaseGyroscope.
LSM6DSL_BIAS_ACQ_TIMES and LSM6DSL_BIAS_SETTLING_US.| [in] | devp | pointer to LSM6DSLDriver. |
| 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 lsm6dslGyroscopeSetBias | ( | devp, | |
| bp | |||
| ) | gyroscopeSetBias(&((devp)->gyro_if), bp) |
Set bias values for the BaseGyroscope.
| [in] | devp | pointer to LSM6DSLDriver. |
| [in] | bp | a buffer which contains biases. |
| MSG_OK | if the function succeeded. |
| #define lsm6dslGyroscopeResetBias | ( | devp | ) | gyroscopeResetBias(&((devp)->gyro_if)) |
Reset bias values for the BaseGyroscope.
| [in] | devp | pointer to LSM6DSLDriver. |
| MSG_OK | if the function succeeded. |
| #define lsm6dslGyroscopeSetSensitivity | ( | devp, | |
| sp | |||
| ) | gyroscopeSetSensitivity(&((devp)->gyro_if), sp) |
Set sensitivity values for the BaseGyroscope.
| [in] | devp | pointer to LSM6DSLDriver. |
| [in] | sp | a buffer which contains sensitivities. |
| MSG_OK | if the function succeeded. |
| #define lsm6dslGyroscopeResetSensitivity | ( | devp | ) | gyroscopeResetSensitivity(&((devp)->gyro_if)) |
Reset sensitivity values for the BaseGyroscope.
| [in] | devp | pointer to LSM6DSLDriver. |
| MSG_OK | if the function succeeded. |
| MSG_RESET | otherwise. |
| #define lsm6dslGyroscopeSetFullScale | ( | devp, | |
| fs | |||
| ) | (devp)->vmt->acc_set_full_scale(devp, fs) |
Changes the LSM6DSLDriver gyroscope fullscale value.
| [in] | devp | pointer to LSM6DSLDriver. |
| [in] | fs | new fullscale value. |
| MSG_OK | if the function succeeded. |
| MSG_RESET | otherwise. |
| typedef struct LSM6DSLDriver LSM6DSLDriver |
| enum lsm6dsl_sad_t |
| enum lsm6dsl_acc_fs_t |
| enum lsm6dsl_acc_odr_t |
LSM6DSL accelerometer subsystem output data rate.
| enum lsm6dsl_acc_lp_t |
| enum lsm6dsl_gyro_fs_t |
LSM6DSL gyroscope subsystem full scale.
| enum lsm6dsl_gyro_odr_t |
LSM6DSL gyroscope subsystem output data rate.
| enum lsm6dsl_gyro_lp_t |
| enum lsm6dsl_gyro_lpf_t |
LSM6DSL gyroscope subsystem output selection.
| enum lsm6dsl_bdu_t |
| enum lsm6dsl_end_t |
| enum lsm6dsl_state_t |
| msg_t lsm6dslI2CReadRegister | ( | I2CDriver * | i2cp, |
| lsm6dsl_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 lsm6dsl.c.
References i2cMasterTransmitTimeout(), and TIME_INFINITE.
Referenced by acc_read_raw(), acc_set_full_scale(), gyro_read_raw(), and gyro_set_full_scale().

|
static |
Return the number of axes of the BaseAccelerometer.
| [in] | ip | pointer to BaseAccelerometer interface. |
Definition at line 95 of file lsm6dsl.c.
References LSM6DSL_ACC_NUMBER_OF_AXES.
Referenced by gyro_set_full_scale().
|
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 lsm6dsl.c.
References I2C_READY, i2cAcquireBus(), i2cReleaseBus(), i2cStart(), LSM6DSL_ACC_NUMBER_OF_AXES, LSM6DSL_READY, lsm6dslI2CReadRegister(), MSG_OK, objGetInstance, osalDbgAssert, and osalDbgCheck.
Referenced by acc_read_cooked(), and gyro_set_full_scale().

|
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 lsm6dsl.c.
References acc_read_raw(), LSM6DSL_ACC_NUMBER_OF_AXES, LSM6DSL_READY, objGetInstance, osalDbgAssert, and osalDbgCheck.
Referenced by gyro_set_full_scale().

|
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 lsm6dsl.c.
References LSM6DSL_ACC_NUMBER_OF_AXES, LSM6DSL_READY, MSG_OK, objGetInstance, osalDbgAssert, and osalDbgCheck.
Referenced by gyro_set_full_scale().
|
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 lsm6dsl.c.
References LSM6DSL_ACC_NUMBER_OF_AXES, LSM6DSL_READY, MSG_OK, objGetInstance, osalDbgAssert, and osalDbgCheck.
Referenced by gyro_set_full_scale().
|
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 lsm6dsl.c.
References LSM6DSL_ACC_NUMBER_OF_AXES, LSM6DSL_READY, MSG_OK, objGetInstance, osalDbgAssert, and osalDbgCheck.
Referenced by gyro_set_full_scale().
|
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 lsm6dsl.c.
References FALSE, LSM6DSL_ACC_FS_16G, LSM6DSL_ACC_FS_2G, LSM6DSL_ACC_FS_4G, LSM6DSL_ACC_FS_8G, LSM6DSL_ACC_NUMBER_OF_AXES, LSM6DSL_READY, MSG_OK, MSG_RESET, objGetInstance, osalDbgAssert, and osalDbgCheck.
Referenced by gyro_set_full_scale().
|
static |
Changes the LSM6DSLDriver accelerometer fullscale value.
| [in] | devp | pointer to LSM6DSLDriver interface. |
| [in] | fs | new fullscale value. |
| MSG_OK | if the function succeeded. |
| MSG_RESET | otherwise. |
Definition at line 339 of file lsm6dsl.c.
References I2C_READY, i2cAcquireBus(), i2cReleaseBus(), i2cStart(), LSM6DSL_ACC_FS_16G, LSM6DSL_ACC_FS_2G, LSM6DSL_ACC_FS_4G, LSM6DSL_ACC_FS_8G, LSM6DSL_ACC_NUMBER_OF_AXES, LSM6DSL_READY, lsm6dslI2CReadRegister(), lsm6dslI2CWriteRegister, MSG_OK, MSG_RESET, osalDbgAssert, and osalDbgCheck.
Referenced by gyro_set_full_scale().

|
static |
Return the number of axes of the BaseGyroscope.
| [in] | ip | pointer to BaseGyroscope interface. |
Definition at line 427 of file lsm6dsl.c.
References LSM6DSL_GYRO_NUMBER_OF_AXES.
Referenced by gyro_set_full_scale().
|
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 lsm6dsl.c.
References I2C_READY, i2cAcquireBus(), i2cReleaseBus(), i2cStart(), LSM6DSL_GYRO_NUMBER_OF_AXES, LSM6DSL_READY, lsm6dslI2CReadRegister(), MSG_OK, objGetInstance, osalDbgAssert, and osalDbgCheck.
Referenced by gyro_read_cooked(), gyro_sample_bias(), and gyro_set_full_scale().

|
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 lsm6dsl.c.
References gyro_read_raw(), LSM6DSL_GYRO_NUMBER_OF_AXES, LSM6DSL_READY, objGetInstance, osalDbgAssert, and osalDbgCheck.
Referenced by gyro_set_full_scale().

|
static |
Samples bias values for the BaseGyroscope.
LSM6DSL_BIAS_ACQ_TIMES and LSM6DSL_BIAS_SETTLING_US.| [in] | ip | pointer to BaseGyroscope interface. |
| MSG_OK | if the function succeeded. |
Definition at line 538 of file lsm6dsl.c.
References gyro_read_raw(), I2C_READY, LSM6DSL_GYRO_BIAS_ACQ_TIMES, LSM6DSL_GYRO_BIAS_SETTLING_US, LSM6DSL_GYRO_NUMBER_OF_AXES, LSM6DSL_READY, MSG_OK, objGetInstance, osalDbgAssert, osalDbgCheck, and osalThreadSleepMicroseconds.
Referenced by gyro_set_full_scale().

|
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 lsm6dsl.c.
References LSM6DSL_GYRO_NUMBER_OF_AXES, LSM6DSL_READY, MSG_OK, objGetInstance, osalDbgAssert, and osalDbgCheck.
Referenced by gyro_set_full_scale().
|
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 lsm6dsl.c.
References LSM6DSL_GYRO_NUMBER_OF_AXES, LSM6DSL_READY, MSG_OK, objGetInstance, osalDbgAssert, and osalDbgCheck.
Referenced by gyro_set_full_scale().
|
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 lsm6dsl.c.
References LSM6DSL_GYRO_NUMBER_OF_AXES, LSM6DSL_READY, MSG_OK, objGetInstance, osalDbgAssert, and osalDbgCheck.
Referenced by gyro_set_full_scale().
|
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 lsm6dsl.c.
References FALSE, LSM6DSL_GYRO_FS_1000DPS, LSM6DSL_GYRO_FS_125DPS, LSM6DSL_GYRO_FS_2000DPS, LSM6DSL_GYRO_FS_250DPS, LSM6DSL_GYRO_FS_500DPS, LSM6DSL_GYRO_NUMBER_OF_AXES, LSM6DSL_READY, MSG_OK, MSG_RESET, objGetInstance, osalDbgAssert, and osalDbgCheck.
Referenced by gyro_set_full_scale().
|
static |
Changes the LSM6DSLDriver 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 721 of file lsm6dsl.c.
References acc_get_axes_number(), acc_read_cooked(), acc_read_raw(), acc_reset_bias(), acc_reset_sensivity(), acc_set_bias(), acc_set_full_scale(), acc_set_sensivity(), gyro_get_axes_number(), gyro_read_cooked(), gyro_read_raw(), gyro_reset_bias(), gyro_reset_sensivity(), gyro_sample_bias(), gyro_set_bias(), gyro_set_sensivity(), I2C_READY, i2cAcquireBus(), i2cReleaseBus(), i2cStart(), LSM6DSL_GYRO_FS_1000DPS, LSM6DSL_GYRO_FS_125DPS, LSM6DSL_GYRO_FS_2000DPS, LSM6DSL_GYRO_FS_250DPS, LSM6DSL_GYRO_FS_500DPS, LSM6DSL_GYRO_NUMBER_OF_AXES, LSM6DSL_READY, lsm6dslI2CReadRegister(), lsm6dslI2CWriteRegister, MSG_OK, MSG_RESET, osalDbgAssert, and osalDbgCheck.

| void lsm6dslObjectInit | ( | LSM6DSLDriver * | devp | ) |
Initializes an instance.
| [out] | devp | pointer to the LSM6DSLDriver object |
Definition at line 832 of file lsm6dsl.c.
References LSM6DSLDriver::acc_if, LSM6DSLDriver::gyro_if, LSM6DSL_ACC_NUMBER_OF_AXES, LSM6DSL_GYRO_NUMBER_OF_AXES, LSM6DSL_STOP, BaseAccelerometer::vmt, BaseGyroscope::vmt, and LSM6DSLDriver::vmt.
| void lsm6dslStart | ( | LSM6DSLDriver * | devp, |
| const LSM6DSLConfig * | config | ||
| ) |
Configures and activates LSM6DSL Complex Driver peripheral.
| [in] | devp | pointer to the LSM6DSLDriver object |
| [in] | config | pointer to the LSM6DSLConfig object |
Definition at line 853 of file lsm6dsl.c.
References FALSE, i2cAcquireBus(), i2cReleaseBus(), i2cStart(), LSM6DSL_ACC_FS_16G, LSM6DSL_ACC_FS_2G, LSM6DSL_ACC_FS_4G, LSM6DSL_ACC_FS_8G, LSM6DSL_ACC_NUMBER_OF_AXES, LSM6DSL_GYRO_FS_1000DPS, LSM6DSL_GYRO_FS_125DPS, LSM6DSL_GYRO_FS_2000DPS, LSM6DSL_GYRO_FS_250DPS, LSM6DSL_GYRO_FS_500DPS, LSM6DSL_GYRO_LPF_DISABLED, LSM6DSL_GYRO_NUMBER_OF_AXES, LSM6DSL_READY, LSM6DSL_STOP, lsm6dslI2CWriteRegister, osalDbgAssert, osalDbgCheck, and osalThreadSleepMilliseconds.

| void lsm6dslStop | ( | LSM6DSLDriver * | devp | ) |
Deactivates the LSM6DSL Complex Driver peripheral.
| [in] | devp | pointer to the LSM6DSLDriver object |
Definition at line 1087 of file lsm6dsl.c.
References i2cAcquireBus(), i2cReleaseBus(), i2cStart(), i2cStop(), LSM6DSL_ACC_ODR_PD, LSM6DSL_GYRO_ODR_PD, LSM6DSL_READY, LSM6DSL_STOP, lsm6dslI2CWriteRegister, osalDbgAssert, and osalDbgCheck.
