From 4e0882121e975f19be130c68cacbda3bd817f772 Mon Sep 17 00:00:00 2001 From: Roman Bapst Date: Tue, 11 Nov 2014 13:07:35 +0100 Subject: removed ifdef because this file is specific to the nuttx platform --- src/drivers/drv_accel.h | 64 +++++++++++++++++++++++-------------------------- 1 file changed, 30 insertions(+), 34 deletions(-) diff --git a/src/drivers/drv_accel.h b/src/drivers/drv_accel.h index 49b104d38..1f98d966b 100644 --- a/src/drivers/drv_accel.h +++ b/src/drivers/drv_accel.h @@ -42,13 +42,12 @@ #include #include -#ifdef CONFIG_ARCH_ARM + #include "drv_sensor.h" #include "drv_orb_dev.h" #define ACCEL_DEVICE_PATH "/dev/accel" -#endif /** * accel report structure. Reads from the device must be in multiples of this * structure. @@ -82,49 +81,46 @@ struct accel_scale { /* * ObjDev tag for raw accelerometer data. */ -#ifdef CONFIG_ARCH_ARM - ORB_DECLARE(sensor_accel0); - ORB_DECLARE(sensor_accel1); - ORB_DECLARE(sensor_accel2); - - /* - * ioctl() definitions - * - * Accelerometer drivers also implement the generic sensor driver - * interfaces from drv_sensor.h - */ +ORB_DECLARE(sensor_accel0); +ORB_DECLARE(sensor_accel1); +ORB_DECLARE(sensor_accel2); - #define _ACCELIOCBASE (0x2100) - #define _ACCELIOC(_n) (_IOC(_ACCELIOCBASE, _n)) +/* + * ioctl() definitions + * + * Accelerometer drivers also implement the generic sensor driver + * interfaces from drv_sensor.h + */ +#define _ACCELIOCBASE (0x2100) +#define _ACCELIOC(_n) (_IOC(_ACCELIOCBASE, _n)) - /** set the accel internal sample rate to at least (arg) Hz */ - #define ACCELIOCSSAMPLERATE _ACCELIOC(0) - /** return the accel internal sample rate in Hz */ - #define ACCELIOCGSAMPLERATE _ACCELIOC(1) +/** set the accel internal sample rate to at least (arg) Hz */ +#define ACCELIOCSSAMPLERATE _ACCELIOC(0) - /** set the accel internal lowpass filter to no lower than (arg) Hz */ - #define ACCELIOCSLOWPASS _ACCELIOC(2) +/** return the accel internal sample rate in Hz */ +#define ACCELIOCGSAMPLERATE _ACCELIOC(1) - /** return the accel internal lowpass filter in Hz */ - #define ACCELIOCGLOWPASS _ACCELIOC(3) +/** set the accel internal lowpass filter to no lower than (arg) Hz */ +#define ACCELIOCSLOWPASS _ACCELIOC(2) - /** set the accel scaling constants to the structure pointed to by (arg) */ - #define ACCELIOCSSCALE _ACCELIOC(5) +/** return the accel internal lowpass filter in Hz */ +#define ACCELIOCGLOWPASS _ACCELIOC(3) - /** get the accel scaling constants into the structure pointed to by (arg) */ - #define ACCELIOCGSCALE _ACCELIOC(6) +/** set the accel scaling constants to the structure pointed to by (arg) */ +#define ACCELIOCSSCALE _ACCELIOC(5) - /** set the accel measurement range to handle at least (arg) g */ - #define ACCELIOCSRANGE _ACCELIOC(7) +/** get the accel scaling constants into the structure pointed to by (arg) */ +#define ACCELIOCGSCALE _ACCELIOC(6) - /** get the current accel measurement range in g */ - #define ACCELIOCGRANGE _ACCELIOC(8) +/** set the accel measurement range to handle at least (arg) g */ +#define ACCELIOCSRANGE _ACCELIOC(7) - /** get the result of a sensor self-test */ - #define ACCELIOCSELFTEST _ACCELIOC(9) +/** get the current accel measurement range in g */ +#define ACCELIOCGRANGE _ACCELIOC(8) -#endif +/** get the result of a sensor self-test */ +#define ACCELIOCSELFTEST _ACCELIOC(9) #endif /* _DRV_ACCEL_H */ -- cgit v1.2.3