aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/drivers/device/device_nuttx.h8
-rw-r--r--src/drivers/device/module.mk8
-rw-r--r--src/platforms/px4_posix.h1
3 files changed, 9 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
diff --git a/src/platforms/px4_posix.h b/src/platforms/px4_posix.h
index 88b8f4e80..5694d4e86 100644
--- a/src/platforms/px4_posix.h
+++ b/src/platforms/px4_posix.h
@@ -40,6 +40,7 @@
#pragma once
#include <stdint.h>
+#include <sys/types.h>
#include <poll.h>
#include <semaphore.h>