diff options
author | Rocco Marco Guglielmi <roccomarco.guglielmi@gmail.com> | 2018-02-05 11:24:40 +0000 |
---|---|---|
committer | Rocco Marco Guglielmi <roccomarco.guglielmi@gmail.com> | 2018-02-05 11:24:40 +0000 |
commit | 6b491d1edabf6148873e5a1ccd70b161b854c734 (patch) | |
tree | 726892a54fa4b5b224d0ce24c4a8674bbcd9fc03 /os/ex/ST/lsm6ds0.c | |
parent | 8c23b103dd0c50f98dec7509b0452bae2043dcae (diff) | |
download | ChibiOS-6b491d1edabf6148873e5a1ccd70b161b854c734.tar.gz ChibiOS-6b491d1edabf6148873e5a1ccd70b161b854c734.tar.bz2 ChibiOS-6b491d1edabf6148873e5a1ccd70b161b854c734.zip |
Updated LSM6DS0 driver to v 1.0.4 (Fixing Bug #915).
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@11447 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/ex/ST/lsm6ds0.c')
-rw-r--r-- | os/ex/ST/lsm6ds0.c | 25 |
1 files changed, 6 insertions, 19 deletions
diff --git a/os/ex/ST/lsm6ds0.c b/os/ex/ST/lsm6ds0.c index 392926ce4..81b35d559 100644 --- a/os/ex/ST/lsm6ds0.c +++ b/os/ex/ST/lsm6ds0.c @@ -554,28 +554,17 @@ static msg_t gyro_set_full_scale(void *ip, lsm6ds0_gyro_fs_t fs) { return msg;
}
-static const struct BaseSensorVMT vmt_basesensor = {
+static const struct BaseSensorVMT vmt_sensor = {
sens_get_axes_number, sens_read_raw, sens_read_cooked
};
-static const struct BaseGyroscopeVMT vmt_basegyroscope = {
- gyro_get_axes_number, gyro_read_raw, gyro_read_cooked,
- gyro_sample_bias, gyro_set_bias, gyro_reset_bias,
- gyro_set_sensivity, gyro_reset_sensivity
-};
-
-static const struct BaseAccelerometerVMT vmt_baseaccelerometer = {
- acc_get_axes_number, acc_read_raw, acc_read_cooked,
- acc_set_bias, acc_reset_bias, acc_set_sensivity, acc_reset_sensivity
-};
-
-static const struct LSM6DS0ACCVMT vmt_lsm6ds0acc = {
+static const struct LSM6DS0AccelerometerVMT vmt_accelerometer = {
acc_get_axes_number, acc_read_raw, acc_read_cooked,
acc_set_bias, acc_reset_bias, acc_set_sensivity, acc_reset_sensivity,
acc_set_full_scale
};
-static const struct LSM6DS0GYROVMT vmt_lsm6ds0gyro = {
+static const struct LSM6DS0GyroscopeVMT vmt_gyroscope = {
gyro_get_axes_number, gyro_read_raw, gyro_read_cooked,
gyro_sample_bias, gyro_set_bias, gyro_reset_bias,
gyro_set_sensivity, gyro_reset_sensivity, gyro_set_full_scale
@@ -594,11 +583,9 @@ static const struct LSM6DS0GYROVMT vmt_lsm6ds0gyro = { */
void lsm6ds0ObjectInit(LSM6DS0Driver *devp) {
uint32_t i;
- devp->vmt_basesensor = &vmt_basesensor;
- devp->vmt_baseaccelerometer = &vmt_baseaccelerometer;
- devp->vmt_basegyroscope = &vmt_basegyroscope;
- devp->vmt_lsm6ds0acc = &vmt_lsm6ds0acc;
- devp->vmt_lsm6ds0gyro = &vmt_lsm6ds0gyro;
+ devp->vmt_sensor = &vmt_sensor;
+ devp->vmt_accelerometer = &vmt_accelerometer;
+ devp->vmt_gyroscope = &vmt_gyroscope;
devp->config = NULL;
for(i = 0; i < LSM6DS0_ACC_NUMBER_OF_AXES; i++)
devp->accbias[i] = 0.0f;
|