removed ifdef because this file is specific to the nuttx platform

This commit is contained in:
Roman Bapst
2014-11-11 13:07:35 +01:00
parent 7e350555ea
commit 4e0882121e
+30 -34
View File
@@ -42,13 +42,12 @@
#include <stdint.h> #include <stdint.h>
#include <sys/ioctl.h> #include <sys/ioctl.h>
#ifdef CONFIG_ARCH_ARM
#include "drv_sensor.h" #include "drv_sensor.h"
#include "drv_orb_dev.h" #include "drv_orb_dev.h"
#define ACCEL_DEVICE_PATH "/dev/accel" #define ACCEL_DEVICE_PATH "/dev/accel"
#endif
/** /**
* accel report structure. Reads from the device must be in multiples of this * accel report structure. Reads from the device must be in multiples of this
* structure. * structure.
@@ -82,49 +81,46 @@ struct accel_scale {
/* /*
* ObjDev tag for raw accelerometer data. * ObjDev tag for raw accelerometer data.
*/ */
#ifdef CONFIG_ARCH_ARM ORB_DECLARE(sensor_accel0);
ORB_DECLARE(sensor_accel0); ORB_DECLARE(sensor_accel1);
ORB_DECLARE(sensor_accel1); ORB_DECLARE(sensor_accel2);
ORB_DECLARE(sensor_accel2);
/* /*
* ioctl() definitions * ioctl() definitions
* *
* Accelerometer drivers also implement the generic sensor driver * Accelerometer drivers also implement the generic sensor driver
* interfaces from drv_sensor.h * interfaces from drv_sensor.h
*/ */
#define _ACCELIOCBASE (0x2100) #define _ACCELIOCBASE (0x2100)
#define _ACCELIOC(_n) (_IOC(_ACCELIOCBASE, _n)) #define _ACCELIOC(_n) (_IOC(_ACCELIOCBASE, _n))
/** set the accel internal sample rate to at least (arg) Hz */ /** set the accel internal sample rate to at least (arg) Hz */
#define ACCELIOCSSAMPLERATE _ACCELIOC(0) #define ACCELIOCSSAMPLERATE _ACCELIOC(0)
/** return the accel internal sample rate in Hz */ /** return the accel internal sample rate in Hz */
#define ACCELIOCGSAMPLERATE _ACCELIOC(1) #define ACCELIOCGSAMPLERATE _ACCELIOC(1)
/** set the accel internal lowpass filter to no lower than (arg) Hz */ /** set the accel internal lowpass filter to no lower than (arg) Hz */
#define ACCELIOCSLOWPASS _ACCELIOC(2) #define ACCELIOCSLOWPASS _ACCELIOC(2)
/** return the accel internal lowpass filter in Hz */ /** return the accel internal lowpass filter in Hz */
#define ACCELIOCGLOWPASS _ACCELIOC(3) #define ACCELIOCGLOWPASS _ACCELIOC(3)
/** set the accel scaling constants to the structure pointed to by (arg) */ /** set the accel scaling constants to the structure pointed to by (arg) */
#define ACCELIOCSSCALE _ACCELIOC(5) #define ACCELIOCSSCALE _ACCELIOC(5)
/** get the accel scaling constants into the structure pointed to by (arg) */ /** get the accel scaling constants into the structure pointed to by (arg) */
#define ACCELIOCGSCALE _ACCELIOC(6) #define ACCELIOCGSCALE _ACCELIOC(6)
/** set the accel measurement range to handle at least (arg) g */ /** set the accel measurement range to handle at least (arg) g */
#define ACCELIOCSRANGE _ACCELIOC(7) #define ACCELIOCSRANGE _ACCELIOC(7)
/** get the current accel measurement range in g */ /** get the current accel measurement range in g */
#define ACCELIOCGRANGE _ACCELIOC(8) #define ACCELIOCGRANGE _ACCELIOC(8)
/** get the result of a sensor self-test */ /** get the result of a sensor self-test */
#define ACCELIOCSELFTEST _ACCELIOC(9) #define ACCELIOCSELFTEST _ACCELIOC(9)
#endif
#endif /* _DRV_ACCEL_H */ #endif /* _DRV_ACCEL_H */