Fixes to compile again for NuttX

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
This commit is contained in:
Mark Charlebois 2015-03-12 16:29:17 -07:00
parent 4016ad2ff5
commit 97a72563b8
3 changed files with 9 additions and 8 deletions

View File

@ -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

View File

@ -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

View File

@ -40,6 +40,7 @@
#pragma once
#include <stdint.h>
#include <sys/types.h>
#include <poll.h>
#include <semaphore.h>