mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-21 20:04:09 +08:00
cleanup telemetry subsystem makefiles
This commit is contained in:
@@ -2,12 +2,12 @@
|
||||
# The superbitRF module as telemetry downlink/uplink
|
||||
#
|
||||
#
|
||||
ap.CFLAGS += -DDOWNLINK -DPERIODIC_TELEMETRY -DDOWNLINK_FBW_DEVICE=superbitrf -DDOWNLINK_AP_DEVICE=superbitrf
|
||||
ap.CFLAGS += -DDOWNLINK_TRANSPORT=pprz_tp -DDATALINK=SUPERBITRF
|
||||
#ap.CFLAGS += -DUSE_SUPERBITRF -DUSE_SPI2 -DUSE_SPI_SLAVE2
|
||||
|
||||
ap.srcs += peripherals/cyrf6936.c
|
||||
ap.srcs += subsystems/datalink/downlink.c subsystems/datalink/superbitrf.c subsystems/datalink/pprz_transport.c subsystems/datalink/telemetry.c
|
||||
# include shared part for ap
|
||||
ifeq ($(TARGET),ap)
|
||||
include $(CFG_SHARED)/telemetry_superbitrf.makefile
|
||||
endif
|
||||
|
||||
ap.srcs += $(SRC_FIRMWARE)/datalink.c $(SRC_FIRMWARE)/ap_downlink.c
|
||||
|
||||
# avoid fbw_telemetry_mode error
|
||||
|
||||
@@ -1,15 +1,11 @@
|
||||
# Hey Emacs, this is a -*- makefile -*-
|
||||
|
||||
PPRZ_MODEM_PORT_LOWER=$(shell echo $(MODEM_PORT) | tr A-Z a-z)
|
||||
# include shared part for ap
|
||||
ifeq ($(TARGET),ap)
|
||||
include $(CFG_SHARED)/telemetry_transparent.makefile
|
||||
endif
|
||||
|
||||
telemetry_CFLAGS = -DUSE_$(MODEM_PORT)
|
||||
telemetry_CFLAGS += -D$(MODEM_PORT)_BAUD=$(MODEM_BAUD)
|
||||
telemetry_CFLAGS += -DDOWNLINK -DPERIODIC_TELEMETRY -DDOWNLINK_DEVICE=$(PPRZ_MODEM_PORT_LOWER) -DPPRZ_UART=$(PPRZ_MODEM_PORT_LOWER)
|
||||
telemetry_CFLAGS += -DDOWNLINK_TRANSPORT=pprz_tp -DDATALINK=PPRZ
|
||||
telemetry_srcs = subsystems/datalink/downlink.c subsystems/datalink/pprz_transport.c subsystems/datalink/telemetry.c
|
||||
|
||||
ap.CFLAGS += $(telemetry_CFLAGS)
|
||||
ap.srcs += $(telemetry_srcs) $(SRC_FIRMWARE)/datalink.c $(SRC_FIRMWARE)/ap_downlink.c
|
||||
ap.srcs += $(SRC_FIRMWARE)/datalink.c $(SRC_FIRMWARE)/ap_downlink.c
|
||||
|
||||
# avoid fbw_telemetry_mode error
|
||||
ap.srcs += $(SRC_FIRMWARE)/fbw_downlink.c
|
||||
|
||||
@@ -2,28 +2,13 @@
|
||||
|
||||
#serial USB (e.g. /dev/ttyACM0)
|
||||
|
||||
telemetry_CFLAGS = -DDOWNLINK -DDOWNLINK_DEVICE=usb_serial -DPPRZ_UART=usb_serial
|
||||
telemetry_CFLAGS += -DDOWNLINK_TRANSPORT=pprz_tp -DDATALINK=PPRZ -DUSE_USB_SERIAL
|
||||
telemetry_srcs = subsystems/datalink/downlink.c subsystems/datalink/pprz_transport.c subsystems/datalink/telemetry.c
|
||||
telemetry_srcs += $(SRC_FIRMWARE)/datalink.c $(SRC_FIRMWARE)/ap_downlink.c $(SRC_FIRMWARE)/fbw_downlink.c
|
||||
# avoid fbw_telemetry_mode error
|
||||
telemetry_srcs += $(SRC_FIRMWARE)/fbw_downlink.c
|
||||
ifeq ($(TARGET), ap)
|
||||
include $(CFG_SHARED)/telemetry_transparent_usb.makefile
|
||||
endif
|
||||
|
||||
ap.CFLAGS += $(telemetry_CFLAGS)
|
||||
ap.srcs += $(telemetry_srcs)
|
||||
ap.srcs += $(SRC_FIRMWARE)/datalink.c $(SRC_FIRMWARE)/ap_downlink.c $(SRC_FIRMWARE)/fbw_downlink.c
|
||||
# avoid fbw_telemetry_mode error
|
||||
ap.srcs += $(SRC_FIRMWARE)/fbw_downlink.c
|
||||
|
||||
fbw.srcs += $(SRC_FIRMWARE)/fbw_downlink.c
|
||||
|
||||
ifeq ($(ARCH), lpc21)
|
||||
ap.CFLAGS += -DUSE_USB_HIGH_PCLK
|
||||
ap.srcs += $(SRC_ARCH)/usb_ser_hw.c $(SRC_ARCH)/lpcusb/usbhw_lpc.c $(SRC_ARCH)/lpcusb/usbcontrol.c
|
||||
ap.srcs += $(SRC_ARCH)/lpcusb/usbstdreq.c $(SRC_ARCH)/lpcusb/usbinit.c
|
||||
else
|
||||
ifeq ($(ARCH), stm32)
|
||||
ap.srcs += $(SRC_ARCH)/usb_ser_hw.c
|
||||
else
|
||||
ifneq ($(ARCH), sim)
|
||||
$(error telemetry_transparent_usb currently only implemented for the lpc21 and stm32)
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
@@ -2,36 +2,13 @@
|
||||
|
||||
# W5100 ethernet chip.
|
||||
|
||||
W5100_IP ?= "192,168,25,47"
|
||||
W5100_SUBNET ?= "255,255,255,0"
|
||||
W5100_MULTICAST_IP ?= "224,1,1,11"
|
||||
W5100_MULTICAST_PORT ?= "1234"
|
||||
ifeq ($(TARGET), ap)
|
||||
include $(CFG_SHARED)/telemetry_w5100.makefile
|
||||
endif
|
||||
|
||||
ap.CFLAGS += -DDOWNLINK -DPERIODIC_TELEMETRY -DDOWNLINK_DEVICE=chip0
|
||||
ap.CFLAGS += -DDOWNLINK_TRANSPORT=pprz_tp -DDATALINK=W5100
|
||||
ap.CFLAGS += -DW5100_IP=$(W5100_IP) -DW5100_SUBNET=$(W5100_SUBNET) -DW5100_MULTICAST_IP=$(W5100_MULTICAST_IP) -DW5100_MULTICAST_PORT=$(W5100_MULTICAST_PORT)
|
||||
ap.srcs += subsystems/datalink/downlink.c subsystems/datalink/w5100.c subsystems/datalink/pprz_transport.c subsystems/datalink/telemetry.c
|
||||
ap.srcs += $(SRC_FIRMWARE)/datalink.c $(SRC_FIRMWARE)/ap_downlink.c
|
||||
|
||||
# avoid fbw_telemetry_mode error
|
||||
ap.srcs += $(SRC_FIRMWARE)/fbw_downlink.c
|
||||
|
||||
fbw.srcs += $(SRC_FIRMWARE)/fbw_downlink.c
|
||||
|
||||
ifeq ($(ARCH), lpc21)
|
||||
# only an issue of setting the DRDY pin in w5100.c, which is stm32 specific
|
||||
$(error Not implemented for the LCP21x yet.)
|
||||
ap.CFLAGS += -DUSE_SPI1
|
||||
# default SPI device for W5100 is already SPI1
|
||||
ap.CFLAGS += -DUSE_SPI_SLAVE0
|
||||
ap.CFLAGS += -DW5100_SLAVE_IDX=0
|
||||
else ifeq ($(ARCH), stm32)
|
||||
# on extra SPI1 connector
|
||||
ap.CFLAGS += -DUSE_SPI1
|
||||
# default SPI device for W5100 is already SPI1
|
||||
# Slave select configuration
|
||||
# SLAVE1 is SS on external SPI1 connector (PA04)
|
||||
ap.CFLAGS += -DUSE_SPI_SLAVE1
|
||||
# default slave select for W5100 is already SLAVE1
|
||||
#ap.CFLAGS += -DW5100_SLAVE_IDX=1
|
||||
endif
|
||||
|
||||
@@ -2,14 +2,11 @@
|
||||
|
||||
# XBee modems in API mode
|
||||
|
||||
XBEE_MODEM_PORT_LOWER=$(shell echo $(MODEM_PORT) | tr A-Z a-z)
|
||||
# include shared part for ap
|
||||
ifeq ($(TARGET),ap)
|
||||
include $(CFG_SHARED)/telemetry_xbee_api.makefile
|
||||
endif
|
||||
|
||||
ap.CFLAGS += -DUSE_$(MODEM_PORT)
|
||||
ap.CFLAGS += -D$(MODEM_PORT)_BAUD=$(MODEM_BAUD) -DXBEE_BAUD=$(MODEM_BAUD)
|
||||
|
||||
ap.CFLAGS += -DDOWNLINK -DPERIODIC_TELEMETRY -DDOWNLINK_DEVICE=$(XBEE_MODEM_PORT_LOWER) -DXBEE_UART=$(XBEE_MODEM_PORT_LOWER)
|
||||
ap.CFLAGS += -DDOWNLINK_TRANSPORT=xbee_tp -DDATALINK=XBEE
|
||||
ap.srcs += subsystems/datalink/downlink.c subsystems/datalink/xbee.c subsystems/datalink/telemetry.c
|
||||
ap.srcs += $(SRC_FIRMWARE)/datalink.c $(SRC_FIRMWARE)/ap_downlink.c
|
||||
|
||||
# avoid fbw_telemetry_mode error
|
||||
|
||||
@@ -65,8 +65,6 @@ nps.srcs += $(NPSDIR)/nps_main.c \
|
||||
# for geo mag calculation
|
||||
nps.srcs += math/pprz_geodetic_wmm2010.c
|
||||
|
||||
nps.CFLAGS += -DDOWNLINK -DPERIODIC_TELEMETRY -DDOWNLINK_TRANSPORT=ivy_tp -DDOWNLINK_DEVICE=ivy_tp
|
||||
nps.srcs += subsystems/datalink/ivy_transport.c
|
||||
nps.srcs += subsystems/datalink/downlink.c subsystems/datalink/telemetry.c
|
||||
include $(CFG_SHARED)/telemetry_ivy.makefile
|
||||
nps.srcs += $(SRC_FIRMWARE)/rotorcraft_telemetry.c
|
||||
nps.srcs += $(SRC_FIRMWARE)/datalink.c
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
#
|
||||
# The superbitRF module as telemetry downlink/uplink
|
||||
#
|
||||
#
|
||||
ap.CFLAGS += -DDOWNLINK -DPERIODIC_TELEMETRY -DDOWNLINK_DEVICE=superbitrf
|
||||
ap.CFLAGS += -DDOWNLINK_TRANSPORT=pprz_tp -DDATALINK=SUPERBITRF
|
||||
#ap.CFLAGS += -DUSE_SUPERBITRF -DUSE_SPI2 -DUSE_SPI_SLAVE2
|
||||
|
||||
ap.srcs += peripherals/cyrf6936.c
|
||||
ap.srcs += subsystems/datalink/downlink.c subsystems/datalink/superbitrf.c subsystems/datalink/pprz_transport.c subsystems/datalink/telemetry.c
|
||||
# include generic part
|
||||
ifeq ($(TARGET), ap)
|
||||
include $(CFG_SHARED)/telemetry_superbitrf.makefile
|
||||
endif
|
||||
|
||||
# add rotorcraft specific files
|
||||
ap.srcs += $(SRC_FIRMWARE)/datalink.c $(SRC_FIRMWARE)/rotorcraft_telemetry.c
|
||||
|
||||
@@ -5,12 +5,8 @@
|
||||
# MODEM_BAUD
|
||||
#
|
||||
|
||||
PPRZ_MODEM_PORT_LOWER=$(shell echo $(MODEM_PORT) | tr A-Z a-z)
|
||||
ifeq ($(TARGET), ap)
|
||||
include $(CFG_SHARED)/telemetry_transparent.makefile
|
||||
endif
|
||||
|
||||
ap.CFLAGS += -DUSE_$(MODEM_PORT)
|
||||
ap.CFLAGS += -D$(MODEM_PORT)_BAUD=$(MODEM_BAUD)
|
||||
|
||||
ap.CFLAGS += -DDOWNLINK -DPERIODIC_TELEMETRY -DDOWNLINK_DEVICE=$(PPRZ_MODEM_PORT_LOWER) -DPPRZ_UART=$(PPRZ_MODEM_PORT_LOWER)
|
||||
ap.CFLAGS += -DDOWNLINK_TRANSPORT=pprz_tp -DDATALINK=PPRZ
|
||||
ap.srcs += subsystems/datalink/downlink.c subsystems/datalink/pprz_transport.c subsystems/datalink/telemetry.c
|
||||
ap.srcs += $(SRC_FIRMWARE)/datalink.c $(SRC_FIRMWARE)/rotorcraft_telemetry.c
|
||||
|
||||
@@ -1,23 +1,8 @@
|
||||
|
||||
#serial UDP
|
||||
|
||||
include $(CFG_SHARED)/udp.makefile
|
||||
ifeq ($(TARGET), ap)
|
||||
include $(CFG_SHARED)/telemetry_transparent_udp.makefile
|
||||
endif
|
||||
|
||||
MODEM_DEV ?= UDP0
|
||||
MODEM_PORT_OUT ?= 4242
|
||||
MODEM_PORT_IN ?= 4243
|
||||
MODEM_BROADCAST ?= TRUE
|
||||
|
||||
UDP_MODEM_PORT_LOWER=$(shell echo $(MODEM_DEV) | tr A-Z a-z)
|
||||
|
||||
|
||||
MODEM_CFLAGS = -DUSE_$(MODEM_DEV) -D$(MODEM_DEV)_PORT_OUT=$(MODEM_PORT_OUT) -D$(MODEM_DEV)_PORT_IN=$(MODEM_PORT_IN)
|
||||
MODEM_CFLAGS += -D$(MODEM_DEV)_BROADCAST=$(MODEM_BROADCAST) -D$(MODEM_DEV)_HOST=\"$(MODEM_HOST)\"
|
||||
|
||||
TELEM_CFLAGS = -DDOWNLINK -DPERIODIC_TELEMETRY -DDOWNLINK_DEVICE=$(UDP_MODEM_PORT_LOWER) -DPPRZ_UART=$(UDP_MODEM_PORT_LOWER)
|
||||
TELEM_CFLAGS += -DDOWNLINK_TRANSPORT=pprz_tp -DDATALINK=PPRZ
|
||||
|
||||
|
||||
ap.CFLAGS += $(MODEM_CFLAGS) $(TELEM_CFLAGS)
|
||||
ap.srcs += subsystems/datalink/downlink.c subsystems/datalink/pprz_transport.c subsystems/datalink/telemetry.c
|
||||
ap.srcs += $(SRC_FIRMWARE)/datalink.c $(SRC_FIRMWARE)/rotorcraft_telemetry.c
|
||||
|
||||
@@ -1,23 +1,8 @@
|
||||
|
||||
#serial USB (e.g. /dev/ttyACM0)
|
||||
|
||||
ifeq ($(ARCH), lpc21)
|
||||
ap.CFLAGS += -DDOWNLINK -DPERIODIC_TELEMETRY -DDOWNLINK_DEVICE=usb_serial -DPPRZ_UART=usb_serial
|
||||
ap.CFLAGS += -DDOWNLINK_TRANSPORT=pprz_tp -DDATALINK=PPRZ -DUSE_USB_SERIAL
|
||||
ap.srcs += subsystems/datalink/downlink.c subsystems/datalink/pprz_transport.c subsystems/datalink/telemetry.c
|
||||
ifeq ($(TARGET), ap)
|
||||
include $(CFG_SHARED)/telemetry_transparent_usb.makefile
|
||||
endif
|
||||
|
||||
ap.srcs += $(SRC_FIRMWARE)/datalink.c $(SRC_FIRMWARE)/rotorcraft_telemetry.c
|
||||
ap.srcs += $(SRC_ARCH)/usb_ser_hw.c $(SRC_ARCH)/lpcusb/usbhw_lpc.c $(SRC_ARCH)/lpcusb/usbcontrol.c
|
||||
ap.srcs += $(SRC_ARCH)/lpcusb/usbstdreq.c $(SRC_ARCH)/lpcusb/usbinit.c
|
||||
else
|
||||
ifeq ($(ARCH), stm32)
|
||||
ap.CFLAGS += -DDOWNLINK -DPERIODIC_TELEMETRY -DDOWNLINK_DEVICE=usb_serial -DPPRZ_UART=usb_serial
|
||||
ap.CFLAGS += -DDOWNLINK_TRANSPORT=pprz_tp -DDATALINK=PPRZ -DUSE_USB_SERIAL
|
||||
ap.srcs += subsystems/datalink/downlink.c subsystems/datalink/pprz_transport.c subsystems/datalink/telemetry.c
|
||||
ap.srcs += $(SRC_FIRMWARE)/datalink.c $(SRC_FIRMWARE)/rotorcraft_telemetry.c
|
||||
ap.srcs += $(SRC_ARCH)/usb_ser_hw.c
|
||||
else
|
||||
ifneq ($(ARCH), sim)
|
||||
$(error telemetry_transparent_usb currently only implemented for the lpc21 and stm32)
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
$(error The telemetry_udp subsystem has been renamed, please replace <subsystem name="telemetry" type="udp"/> with <subsystem name="telemetry" type="transparent_udp"/> in your airframe file.)
|
||||
@@ -6,12 +6,8 @@
|
||||
# MODEM_BAUD
|
||||
#
|
||||
|
||||
XBEE_MODEM_PORT_LOWER=$(shell echo $(MODEM_PORT) | tr A-Z a-z)
|
||||
ifeq ($(TARGET), ap)
|
||||
include $(CFG_SHARED)/telemetry_xbee_api.makefile
|
||||
endif
|
||||
|
||||
ap.CFLAGS += -DUSE_$(MODEM_PORT)
|
||||
ap.CFLAGS += -D$(MODEM_PORT)_BAUD=$(MODEM_BAUD) -DXBEE_BAUD=$(MODEM_BAUD)
|
||||
|
||||
ap.CFLAGS += -DDOWNLINK -DPERIODIC_TELEMETRY -DDOWNLINK_DEVICE=$(XBEE_MODEM_PORT_LOWER) -DXBEE_UART=$(XBEE_MODEM_PORT_LOWER)
|
||||
ap.CFLAGS += -DDOWNLINK_TRANSPORT=xbee_tp -DDATALINK=XBEE
|
||||
ap.srcs += subsystems/datalink/downlink.c subsystems/datalink/xbee.c subsystems/datalink/telemetry.c
|
||||
ap.srcs += $(SRC_FIRMWARE)/datalink.c $(SRC_FIRMWARE)/rotorcraft_telemetry.c
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
$(TARGET).CFLAGS += -DDOWNLINK -DPERIODIC_TELEMETRY -DDOWNLINK_TRANSPORT=ivy_tp -DDOWNLINK_DEVICE=ivy_tp
|
||||
$(TARGET).srcs += subsystems/datalink/ivy_transport.c
|
||||
$(TARGET).srcs += subsystems/datalink/downlink.c subsystems/datalink/telemetry.c
|
||||
@@ -0,0 +1,10 @@
|
||||
#
|
||||
# The superbitRF module as telemetry downlink/uplink
|
||||
#
|
||||
#
|
||||
|
||||
$(TARGET).CFLAGS += -DDOWNLINK -DPERIODIC_TELEMETRY -DDOWNLINK_DEVICE=superbitrf
|
||||
$(TARGET).CFLAGS += -DDOWNLINK_TRANSPORT=pprz_tp -DDATALINK=SUPERBITRF
|
||||
|
||||
$(TARGET).srcs += peripherals/cyrf6936.c
|
||||
$(TARGET).srcs += subsystems/datalink/downlink.c subsystems/datalink/superbitrf.c subsystems/datalink/pprz_transport.c subsystems/datalink/telemetry.c
|
||||
@@ -0,0 +1,16 @@
|
||||
#
|
||||
# Expected from board file or overriden as xml param :
|
||||
#
|
||||
# MODEM_PORT
|
||||
# MODEM_BAUD
|
||||
#
|
||||
|
||||
PPRZ_MODEM_PORT_LOWER=$(shell echo $(MODEM_PORT) | tr A-Z a-z)
|
||||
|
||||
$(TARGET).CFLAGS += -DUSE_$(MODEM_PORT)
|
||||
$(TARGET).CFLAGS += -D$(MODEM_PORT)_BAUD=$(MODEM_BAUD)
|
||||
|
||||
$(TARGET).CFLAGS += -DDOWNLINK -DPERIODIC_TELEMETRY -DDOWNLINK_DEVICE=$(PPRZ_MODEM_PORT_LOWER) -DPPRZ_UART=$(PPRZ_MODEM_PORT_LOWER)
|
||||
$(TARGET).CFLAGS += -DDOWNLINK_TRANSPORT=pprz_tp -DDATALINK=PPRZ
|
||||
$(TARGET).srcs += subsystems/datalink/downlink.c subsystems/datalink/pprz_transport.c subsystems/datalink/telemetry.c
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
|
||||
#serial UDP
|
||||
|
||||
include $(CFG_SHARED)/udp.makefile
|
||||
|
||||
MODEM_DEV ?= UDP0
|
||||
MODEM_PORT_OUT ?= 4242
|
||||
MODEM_PORT_IN ?= 4243
|
||||
MODEM_BROADCAST ?= TRUE
|
||||
|
||||
UDP_MODEM_PORT_LOWER=$(shell echo $(MODEM_DEV) | tr A-Z a-z)
|
||||
|
||||
|
||||
MODEM_CFLAGS = -DUSE_$(MODEM_DEV) -D$(MODEM_DEV)_PORT_OUT=$(MODEM_PORT_OUT) -D$(MODEM_DEV)_PORT_IN=$(MODEM_PORT_IN)
|
||||
MODEM_CFLAGS += -D$(MODEM_DEV)_BROADCAST=$(MODEM_BROADCAST) -D$(MODEM_DEV)_HOST=\"$(MODEM_HOST)\"
|
||||
|
||||
TELEM_CFLAGS = -DDOWNLINK -DPERIODIC_TELEMETRY -DDOWNLINK_DEVICE=$(UDP_MODEM_PORT_LOWER) -DPPRZ_UART=$(UDP_MODEM_PORT_LOWER)
|
||||
TELEM_CFLAGS += -DDOWNLINK_TRANSPORT=pprz_tp -DDATALINK=PPRZ
|
||||
|
||||
|
||||
$(TARGET).CFLAGS += $(MODEM_CFLAGS) $(TELEM_CFLAGS)
|
||||
$(TARGET).srcs += subsystems/datalink/downlink.c subsystems/datalink/pprz_transport.c subsystems/datalink/telemetry.c
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
|
||||
#serial USB (e.g. /dev/ttyACM0)
|
||||
|
||||
$(TARGET).CFLAGS += -DDOWNLINK -DDOWNLINK_DEVICE=usb_serial -DPPRZ_UART=usb_serial
|
||||
$(TARGET).CFLAGS += -DDOWNLINK_TRANSPORT=pprz_tp -DDATALINK=PPRZ -DUSE_USB_SERIAL
|
||||
$(TARGET).CFLAGS += -DPERIODIC_TELEMETRY
|
||||
$(TARGET).srcs += subsystems/datalink/downlink.c subsystems/datalink/pprz_transport.c subsystems/datalink/telemetry.c
|
||||
|
||||
ifeq ($(ARCH), lpc21)
|
||||
$(TARGET).srcs += $(SRC_ARCH)/usb_ser_hw.c $(SRC_ARCH)/lpcusb/usbhw_lpc.c $(SRC_ARCH)/lpcusb/usbcontrol.c
|
||||
$(TARGET).srcs += $(SRC_ARCH)/lpcusb/usbstdreq.c $(SRC_ARCH)/lpcusb/usbinit.c
|
||||
else
|
||||
ifeq ($(ARCH), stm32)
|
||||
$(TARGET).srcs += $(SRC_ARCH)/usb_ser_hw.c
|
||||
else
|
||||
ifneq ($(ARCH), sim)
|
||||
$(error telemetry_transparent_usb currently only implemented for the lpc21 and stm32)
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
@@ -0,0 +1,31 @@
|
||||
# Hey Emacs, this is a -*- makefile -*-
|
||||
|
||||
# W5100 ethernet chip.
|
||||
|
||||
W5100_IP ?= "192,168,25,47"
|
||||
W5100_SUBNET ?= "255,255,255,0"
|
||||
W5100_MULTICAST_IP ?= "224,1,1,11"
|
||||
W5100_MULTICAST_PORT ?= "1234"
|
||||
|
||||
$(TARGET).CFLAGS += -DDOWNLINK -DPERIODIC_TELEMETRY -DDOWNLINK_DEVICE=chip0
|
||||
$(TARGET).CFLAGS += -DDOWNLINK_TRANSPORT=pprz_tp -DDATALINK=W5100
|
||||
$(TARGET).CFLAGS += -DW5100_IP=$(W5100_IP) -DW5100_SUBNET=$(W5100_SUBNET) -DW5100_MULTICAST_IP=$(W5100_MULTICAST_IP) -DW5100_MULTICAST_PORT=$(W5100_MULTICAST_PORT)
|
||||
$(TARGET).srcs += subsystems/datalink/downlink.c subsystems/datalink/w5100.c subsystems/datalink/pprz_transport.c subsystems/datalink/telemetry.c
|
||||
|
||||
ifeq ($(ARCH), lpc21)
|
||||
# only an issue of setting the DRDY pin in w5100.c, which is stm32 specific
|
||||
$(error Not implemented for the LCP21x yet.)
|
||||
$(TARGET).CFLAGS += -DUSE_SPI1
|
||||
# default SPI device for W5100 is already SPI1
|
||||
$(TARGET).CFLAGS += -DUSE_SPI_SLAVE0
|
||||
$(TARGET).CFLAGS += -DW5100_SLAVE_IDX=0
|
||||
else ifeq ($(ARCH), stm32)
|
||||
# on extra SPI1 connector
|
||||
$(TARGET).CFLAGS += -DUSE_SPI1
|
||||
# default SPI device for W5100 is already SPI1
|
||||
# Slave select configuration
|
||||
# SLAVE1 is SS on external SPI1 connector (PA04)
|
||||
$(TARGET).CFLAGS += -DUSE_SPI_SLAVE1
|
||||
# default slave select for W5100 is already SLAVE1
|
||||
#$(TARGET).CFLAGS += -DW5100_SLAVE_IDX=1
|
||||
endif
|
||||
@@ -0,0 +1,16 @@
|
||||
# XBee modems in API mode
|
||||
#
|
||||
# Expected from board file or overriden as xml param :
|
||||
#
|
||||
# MODEM_PORT
|
||||
# MODEM_BAUD
|
||||
#
|
||||
|
||||
XBEE_MODEM_PORT_LOWER=$(shell echo $(MODEM_PORT) | tr A-Z a-z)
|
||||
|
||||
$(TARGET).CFLAGS += -DUSE_$(MODEM_PORT)
|
||||
$(TARGET).CFLAGS += -D$(MODEM_PORT)_BAUD=$(MODEM_BAUD) -DXBEE_BAUD=$(MODEM_BAUD)
|
||||
|
||||
$(TARGET).CFLAGS += -DDOWNLINK -DPERIODIC_TELEMETRY -DDOWNLINK_DEVICE=$(XBEE_MODEM_PORT_LOWER) -DXBEE_UART=$(XBEE_MODEM_PORT_LOWER)
|
||||
$(TARGET).CFLAGS += -DDOWNLINK_TRANSPORT=xbee_tp -DDATALINK=XBEE
|
||||
$(TARGET).srcs += subsystems/datalink/downlink.c subsystems/datalink/xbee.c subsystems/datalink/telemetry.c
|
||||
@@ -76,12 +76,6 @@
|
||||
#define DefaultChannel DOWNLINK_TRANSPORT
|
||||
#endif
|
||||
|
||||
// FIXME are DOWNLINK_AP|FBW_DEVICE distinction really necessary ?
|
||||
// by default use AP_DEVICE if nothing is set ?
|
||||
#ifndef DOWNLINK_DEVICE
|
||||
#define DOWNLINK_DEVICE DOWNLINK_AP_DEVICE
|
||||
#endif
|
||||
|
||||
#ifndef DefaultDevice
|
||||
#define DefaultDevice DOWNLINK_DEVICE
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user