drivers/sensors/lsm303agr: fix compilation warnings and run through nxstyle; drivers/sensors/lsm6dsl: run through nxstyle

This commit is contained in:
raiden00pl
2020-01-16 16:11:12 +01:00
committed by Alan Carvalho de Assis
parent 177c037aa9
commit e23d58e86d
4 changed files with 164 additions and 173 deletions
+6 -6
View File
@@ -55,11 +55,11 @@
/* Accelerometer addresses */
#define LSM303AGRACCELERO_ADDR (0x32>>1)
#define LSM303AGRACCELERO_ADDR (0x32 >> 1)
/* Magnetometer addresses */
#define LSM303AGRMAGNETO_ADDR (0x3C>>1) /* 7-bit */
#define LSM303AGRMAGNETO_ADDR (0x3C >> 1) /* 7-bit */
/* Register Addresses *******************************************************/
@@ -93,7 +93,7 @@
#define LSM303AGR_OUT_Z_L_A 0x2C
#define LSM303AGR_OUT_Z_H_A 0x2D
#define LSM303AGR_OUTX_L_A_SHIFT 0
#define LSM303AGR_OUTX_L_A_SHIFT 0
#define LSM303AGR_OUTX_L_A_MASK (255 << LSM303AGR_OUTX_L_A_SHIFT)
#define LSM303AGR_FIFO_CTRL_REG_A 0x2E
@@ -142,7 +142,7 @@
#define LSM303AGR_OUTZ_L_REG_M 0x6C
#define LSM303AGR_OUTZ_H_REG_M 0x6D
#define LSM303AGR_OUTX_L_M_SHIFT 0
#define LSM303AGR_OUTX_L_M_SHIFT 0
#define LSM303AGR_OUTX_L_M_MASK (255 << LSM303AGR_OUTX_L_M_SHIFT)
/****************************************************************************
@@ -166,7 +166,7 @@ struct lsm303agr_sensor_data_s
};
/****************************************************************************
* Private Types
* Public Types
****************************************************************************/
struct lsm303agr_dev_s;
@@ -218,7 +218,7 @@ extern "C"
****************************************************************************/
int lsm303agr_sensor_register(FAR const char *devpath,
FAR struct i2c_master_s *i2c,uint8_t addr);
FAR struct i2c_master_s *i2c, uint8_t addr);
#ifdef __cplusplus
}
+5 -7
View File
@@ -53,8 +53,8 @@
/* Accelerometer addresses */
#define LSM6DSLACCEL_ADDR0 (0xD4>>1) /*0x6a low */
#define LSM6DSLACCEL_ADDR1 (0xD6>>1) /* 0x6B .. high */
#define LSM6DSLACCEL_ADDR0 (0xD4 >> 1) /* 0x6a low */
#define LSM6DSLACCEL_ADDR1 (0xD6 >> 1) /* 0x6B .. high */
/* Gyroscope addresses */
@@ -138,12 +138,10 @@
#define LSM6DSL_SENSORHUB16_REG 0x50 /* Sixteenth byte associated to external sensors. */
#define LSM6DSL_SENSORHUB17_REG 0x51 /* Seventeenth byte associated to external sensors. */
#define LSM6DSL_SENSORHUB18_REG 0x52 /* Eighteenth byte associated to external sensors. */
#define LSM6DSL_FUNC_SRC1 0x53 /* Significant motion, tilt, step detector, hard/soft-iron and sensor hub interrupt source register
(r). */
#define LSM6DSL_FUNC_SRC1 0x53 /* Significant motion, tilt, step detector, hard/soft-iron and sensor hub interrupt source register (r). */
#define LSM6DSL_FUNC_SRC2 0x54 /* Wrist tilt interrupt source register (r). */
#define LSM6DSL_WRIST_TILT_IA 0x55 /* Wrist tilt interrupt source register (r). */
#define LSM6DSL_TAP_CFG 0x58 /* Enables interrupt and inactivity functions, configuration of filtering and tap recognition
functions (r/w). */
#define LSM6DSL_TAP_CFG 0x58 /* Enables interrupt and inactivity functions, configuration of filtering and tap recognition functions (r/w). */
#define LSM6DSL_TAP_THS_6D 0x59 /* Portrait/landscape position and tap function threshold register (r/w). */
#define LSM6DSL_INT_DUR2 0x5A /* Tap recognition function setting register (r/w). */
#define LSM6DSL_WAKE_UP_THS 0x5B /* Single and double-tap function threshold register (r/w). */
@@ -834,7 +832,7 @@ struct lsm6dsl_sensor_data_s
};
/****************************************************************************************************
* Private Types
* Public Types
****************************************************************************************************/
struct lsm6dsl_dev_s;