diff options
author | Mark Charlebois <charlebm@gmail.com> | 2015-03-12 16:29:17 -0700 |
---|---|---|
committer | Mark Charlebois <charlebm@gmail.com> | 2015-04-20 11:00:17 -0700 |
commit | 97a72563b800e27aadebe1bf28a5217fa3144bc9 (patch) | |
tree | b19ef05d0d4585c03116db928d9af024f3554e18 /src/drivers | |
parent | 4016ad2ff52163c78db42662d18f02312db333e6 (diff) | |
download | px4-firmware-97a72563b800e27aadebe1bf28a5217fa3144bc9.tar.gz px4-firmware-97a72563b800e27aadebe1bf28a5217fa3144bc9.tar.bz2 px4-firmware-97a72563b800e27aadebe1bf28a5217fa3144bc9.zip |
Fixes to compile again for NuttX
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
Diffstat (limited to 'src/drivers')
-rw-r--r-- | src/drivers/device/device_nuttx.h | 8 | ||||
-rw-r--r-- | src/drivers/device/module.mk | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/src/drivers/device/device_nuttx.h b/src/drivers/device/device_nuttx.h index 87e5e2abe..3d5737cee 100644 --- a/src/drivers/device/device_nuttx.h +++ b/src/drivers/device/device_nuttx.h @@ -51,6 +51,8 @@ #include <stdint.h> #include <poll.h> +#include <nuttx/fs/fs.h> + /** * Namespace encapsulating all device framework classes, functions and data. */ @@ -89,7 +91,6 @@ public: */ virtual int init(); -#if 0 /** * Read directly from the device. * @@ -122,7 +123,6 @@ public: * @return Negative errno on error, OK or positive value on success. */ virtual int ioctl(unsigned operation, unsigned &arg); -#endif /* device bus types for DEVID @@ -513,7 +513,7 @@ protected: * * @param offset Register offset in bytes from the base address. */ - unsigned long reg(uint32_t offset) { + uint32_t reg(uint32_t offset) { return *(volatile uint32_t *)(_base + offset); } @@ -545,7 +545,7 @@ protected: } private: - unsigned long _base; + uint32_t _base; }; } // namespace device diff --git a/src/drivers/device/module.mk b/src/drivers/device/module.mk index 216fae1ab..522639dc1 100644 --- a/src/drivers/device/module.mk +++ b/src/drivers/device/module.mk @@ -35,15 +35,15 @@ # Build the device driver framework. # -#ifeq ($(PX4_TARGET_OS),nuttx) +ifeq ($(PX4_TARGET_OS),nuttx) SRCS = \ device.cpp \ cdev.cpp \ i2c.cpp \ pio.cpp \ spi.cpp -#endif -#ifeq ($(PX4_TARGET_OS),linux) +endif +ifeq ($(PX4_TARGET_OS),linux) SRCS = vcdev.cpp \ vdevice.cpp -#endif +endif |