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
@@ -52,7 +52,7 @@ ifdef ($(PX4_TARGET_OS),nuttx)
SRCS +=
state_machine_helper.cpp
else
SRCS += state_machine_helper_linux.cpp
SRCS += state_machine_helper_posix.cpp
endif
MODULE_STACKSIZE = 5000
+1 -1
View File
@@ -35,5 +35,5 @@
#ifdef __PX4_NUTTX
#include "mavlink_main_nuttx.h"
#else
#include "mavlink_main_linux.h"
#include "mavlink_main_posix.h"
#endif
@@ -32,7 +32,7 @@
****************************************************************************/
/**
* @file mavlink_main_linux.h
* @file mavlink_main_posix.h
* MAVLink 1.0 protocol interface definition.
*
* @author Lorenz Meier <lm@inf.ethz.ch>
@@ -41,7 +41,7 @@
*/
/* XXX trim includes */
#include <px4_config.h>
#include <nuttx/config.h>
#include <unistd.h>
#include <pthread.h>
#include <stdio.h>
+1 -1
View File
@@ -42,7 +42,7 @@ SRCS = mavlink_tests.cpp \
ifeq ($(PX4_TARGET_NUTTX),nuttx)
SRCS += ../mavlink_ftp_nuttx.cpp
else
SRCS += ../mavlink_ftp_linux.cpp
SRCS += ../mavlink_ftp_posix.cpp
endif
INCLUDE_DIRS += $(MAVLINK_SRC)/include/mavlink
+3 -3
View File
@@ -41,9 +41,9 @@ SRCS += mavlink_main_nuttx.cpp \
mavlink_ftp_nuttx.cpp \
mavlink_receiver_nuttx.cpp
else
SRCS += mavlink_main_linux.cpp \
mavlink_ftp_linux.cpp \
mavlink_receiver_linux.cpp
SRCS += mavlink_main_posix.cpp \
mavlink_ftp_posix.cpp \
mavlink_receiver_posix.cpp
endif
SRCS += mavlink.c \
+1 -1
View File
@@ -41,7 +41,7 @@ MODULE_PRIORITY = "SCHED_PRIORITY_MAX-5"
ifeq ($(PX$_TARGET_OS),nuttx)
SRCS = sensors_nuttx.cpp
else
SRCS = sensors_linux.cpp
SRCS = sensors_posix.cpp
endif
SRCS += sensor_params.c
+1 -1
View File
@@ -46,7 +46,7 @@
* @author Anton Babushkin <anton@px4.io>
*/
#include <px4_config.h>
#include <nuttx/config.h>
#include <fcntl.h>
#include <poll.h>
+1 -1
View File
@@ -396,7 +396,7 @@ struct param_info_s {
// See https://llvm.org/bugs/show_bug.cgi?format=multiple&id=18006
// The following hack is for GCC >=4.8 only. Clang works fine without
// this.
#ifdef __PX4_LINUX
#ifdef __PX4_POSIX
__attribute__((aligned(16)));
#else
;