Linux to posix conversion

Changed "linux" target to "posix". Most of the changes are shared with
QuRT and with OSX. The Linux specific parts are in for i2c which uses
<linux/i2c.h> and <linux/i2c-dev.h>.

There is also a check for __PX4_LINUX in mavlink for a tty ioctl that is
not supported.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
This commit is contained in:
Mark Charlebois
2015-04-21 09:53:09 -07:00
parent 40faa98416
commit f3b5076d70
109 changed files with 106 additions and 107 deletions
+1 -1
View File
@@ -35,7 +35,7 @@
#ifdef __PX4_NUTTX
#include "device_nuttx.h"
#elif defined (__PX4_LINUX)
#elif defined (__PX4_POSIX)
#include "vdev.h"
#endif
+1 -1
View File
@@ -35,5 +35,5 @@
#ifdef __PX4_NUTTX
#include "i2c_nuttx.h"
#else
#include "i2c_linux.h"
#include "i2c_posix.h"
#endif
@@ -41,8 +41,10 @@
*/
#include "i2c.h"
#ifdef __PX4_LINUX
#include <linux/i2c.h>
#include <linux/i2c-dev.h>
#endif
#include <unistd.h>
#include <fcntl.h>
#include <sys/ioctl.h>
@@ -43,8 +43,10 @@
#include "vdev.h"
#include <px4_i2c.h>
#ifdef __PX4_LINUX
#include <linux/i2c.h>
#include <linux/i2c-dev.h>
#endif
#include <string>
namespace device __EXPORT
+2 -2
View File
@@ -44,11 +44,11 @@ SRCS = \
spi.cpp \
ringbuffer.cpp
endif
ifeq ($(PX4_TARGET_OS),linux)
ifeq ($(PX4_TARGET_OS),posix)
SRCS = vdev.cpp \
device.cpp \
vdev_posix.cpp \
i2c_linux.cpp \
i2c_posix.cpp \
sim.cpp \
ringbuffer.cpp
endif