[modules] mavlink: works via usb_serial

This commit is contained in:
Felix Ruess
2014-12-09 00:20:50 +01:00
parent 0b948edc78
commit 3954b3148d
2 changed files with 12 additions and 3 deletions
+9 -3
View File
@@ -21,9 +21,15 @@
MAVLINK_BAUD ?= B57600
MAVLINK_PORT_LOWER=$(shell echo $(MAVLINK_PORT) | tr A-Z a-z)
MAVLINK_PORT_UPPER=$(shell echo $(MAVLINK_PORT) | tr a-z A-Z)
ifeq ($(MAVLINK_PORT), UsbS)
ap.CFLAGS += -DUSE_USB_SERIAL
ap.srcs += $(SRC_ARCH)/usb_ser_hw.c
ap.CFLAGS += -DMAVLINK_DEV=UsbS
else
ap.CFLAGS += -DMAVLINK_DEV=$(MAVLINK_PORT_UPPER)
ap.CFLAGS += -DUSE_$(MAVLINK_PORT_UPPER)
ap.CFLAGS += -D$(MAVLINK_PORT_UPPER)_BAUD=$(MAVLINK_BAUD)
endif
</raw>
<define name="MAVLINK_DEV" value="$(MAVLINK_PORT_UPPER)"/>
<define name="USE_$(MAVLINK_PORT_UPPER)"/>
<define name="$(MAVLINK_PORT_UPPER)_BAUD" value="$(MAVLINK_BAUD)"/>
</makefile>
</module>
+3
View File
@@ -35,6 +35,9 @@
#if USE_UDP
#include "mcu_periph/udp.h"
#endif
#if USE_USB_SERIAL
#include "mcu_periph/usb_serial.h"
#endif
#include "mcu_periph/uart.h"
/*