diff options
Diffstat (limited to 'os/ex/ST')
-rw-r--r-- | os/ex/ST/lsm303dlhc.c | 8 | ||||
-rw-r--r-- | os/ex/ST/lsm303dlhc.h | 21 |
2 files changed, 12 insertions, 17 deletions
diff --git a/os/ex/ST/lsm303dlhc.c b/os/ex/ST/lsm303dlhc.c index 0a4d9689f..993c07aa0 100644 --- a/os/ex/ST/lsm303dlhc.c +++ b/os/ex/ST/lsm303dlhc.c @@ -833,7 +833,7 @@ static const struct BaseAccelerometerVMT vmt_accelerometer = { };
static const struct BaseCompassVMT vmt_compass = {
- sizeof(struct LSM303DLHCVMT*) + sizeof(BaseAccelerometer),
+ sizeof(struct LSM303DLHCVMT*) + sizeof(BaseAccelerometer),
comp_get_axes_number, comp_read_raw, comp_read_cooked,
comp_set_bias, comp_reset_bias, comp_set_sensivity, comp_reset_sensivity
};
@@ -850,8 +850,6 @@ static const struct BaseCompassVMT vmt_compass = { * @init
*/
void lsm303dlhcObjectInit(LSM303DLHCDriver *devp) {
- uint32_t i;
-
devp->vmt = &vmt_device;
devp->acc_if.vmt = &vmt_accelerometer;
devp->comp_if.vmt = &vmt_compass;
@@ -861,7 +859,6 @@ void lsm303dlhcObjectInit(LSM303DLHCDriver *devp) { devp->accaxes = LSM303DLHC_ACC_NUMBER_OF_AXES;
devp->compaxes = LSM303DLHC_COMP_NUMBER_OF_AXES;
-
devp->state = LSM303DLHC_STOP;
}
@@ -880,7 +877,7 @@ void lsm303dlhcStart(LSM303DLHCDriver *devp, const LSM303DLHCConfig *config) { osalDbgAssert((devp->state == LSM303DLHC_STOP) ||
(devp->state == LSM303DLHC_READY),
- "lsm303dlhcStart(), invalid state");
+ "lsm303dlhcStart(), invalid state");
devp->config = config;
@@ -977,7 +974,6 @@ void lsm303dlhcStart(LSM303DLHCDriver *devp, const LSM303DLHCConfig *config) { for(i = 0; i < LSM303DLHC_ACC_NUMBER_OF_AXES; i++)
devp->accbias[i] = LSM303DLHC_ACC_BIAS;
-
/* Configuring Compass subsystem */
/* Multiple write starting address.*/
cr[0] = LSM303DLHC_AD_COMP_CRA_REG;
diff --git a/os/ex/ST/lsm303dlhc.h b/os/ex/ST/lsm303dlhc.h index 0d7fa656e..b91b9635e 100644 --- a/os/ex/ST/lsm303dlhc.h +++ b/os/ex/ST/lsm303dlhc.h @@ -311,7 +311,7 @@ * @note The default is @p FALSE.
*/
#if !defined(LSM303DLHC_ACC_USE_ADVANCED) || defined(__DOXYGEN__)
-#define LSM303DLHC_ACC_USE_ADVANCED FALSE
+#define LSM303DLHC_ACC_USE_ADVANCED FALSE
#endif
/**
@@ -321,7 +321,7 @@ * @note The default is @p FALSE.
*/
#if !defined(LSM303DLHC_COMP_USE_ADVANCED) || defined(__DOXYGEN__)
-#define LSM303DLHC_COMP_USE_ADVANCED FALSE
+#define LSM303DLHC_COMP_USE_ADVANCED FALSE
#endif
/**
@@ -331,7 +331,7 @@ * @note The default is @p FALSE. Requires I2C_USE_MUTUAL_EXCLUSION.
*/
#if !defined(LSM303DLHC_SHARED_I2C) || defined(__DOXYGEN__)
-#define LSM303DLHC_SHARED_I2C FALSE
+#define LSM303DLHC_SHARED_I2C FALSE
#endif
/** @} */
@@ -364,9 +364,9 @@ typedef struct LSM303DLHCDriver LSM303DLHCDriver; * @brief LSM303DLHC accelerometer subsystem full scale.
*/
typedef enum {
- LSM303DLHC_ACC_FS_2G = 0x00, /**< Full scale ±2g. */
- LSM303DLHC_ACC_FS_4G = 0x10, /**< Full scale ±4g. */
- LSM303DLHC_ACC_FS_8G = 0x20, /**< Full scale ±8g. */
+ LSM303DLHC_ACC_FS_2G = 0x00, /**< Full scale ±2g. */
+ LSM303DLHC_ACC_FS_4G = 0x10, /**< Full scale ±4g. */
+ LSM303DLHC_ACC_FS_8G = 0x20, /**< Full scale ±8g. */
LSM303DLHC_ACC_FS_16G = 0x30 /**< Full scale ±16g. */
} lsm303dlhc_acc_fs_t;
@@ -495,12 +495,11 @@ typedef struct { */
I2CDriver *i2cp;
/**
- * @brief I2C configuration associated to this LSM303DLHC accelerometer
- * subsystem.
+ * @brief I2C configuration associated to this LSM303DLHC.
*/
const I2CConfig *i2ccfg;
/**
- * @brief LSM303DLHC initial sensitivity.
+ * @brief LSM303DLHC accelerometer subsystem initial sensitivity.
*/
float *accsensitivity;
/**
@@ -561,10 +560,10 @@ typedef struct { * @brief @p LSM303DLHC specific methods.
*/
#define _lsm303dlhc_methods_alone \
- /* Change full scale value of LSM303DLHC accelerometer subsystem .*/ \
+ /* Change full scale value of LSM303DLHC accelerometer subsystem.*/ \
msg_t (*acc_set_full_scale)(LSM303DLHCDriver *instance, \
lsm303dlhc_acc_fs_t fs); \
- /* Change full scale value of LSM303DLHC compass subsystem .*/ \
+ /* Change full scale value of LSM303DLHC compass subsystem.*/ \
msg_t (*comp_set_full_scale)(LSM303DLHCDriver *instance, \
lsm303dlhc_comp_fs_t fs); \
|