diff options
author | Roman Bapst <romanbapst@yahoo.de> | 2014-11-11 13:07:35 +0100 |
---|---|---|
committer | Roman Bapst <romanbapst@yahoo.de> | 2014-11-11 13:07:35 +0100 |
commit | 4e0882121e975f19be130c68cacbda3bd817f772 (patch) | |
tree | 4b636ad2632d48fa7a3c1cd82187fbf2c790c68d /src/drivers/drv_accel.h | |
parent | 7e350555ea634013f083bccc2f5a8108fc5ef9f9 (diff) | |
download | px4-firmware-4e0882121e975f19be130c68cacbda3bd817f772.tar.gz px4-firmware-4e0882121e975f19be130c68cacbda3bd817f772.tar.bz2 px4-firmware-4e0882121e975f19be130c68cacbda3bd817f772.zip |
removed ifdef because this file is specific to the nuttx platform
Diffstat (limited to 'src/drivers/drv_accel.h')
-rw-r--r-- | src/drivers/drv_accel.h | 64 |
1 files 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 <stdint.h> #include <sys/ioctl.h> -#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 */ |