1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-27 07:21:18 +01:00

examples: adapt border router example for slipdev_stdio

This commit is contained in:
Martine S. Lenders 2020-03-05 18:29:56 +01:00 committed by Martine Lenders
parent ff425576a0
commit f847cde5f7
No known key found for this signature in database
GPG Key ID: CCD317364F63286F
3 changed files with 12 additions and 4 deletions

View File

@ -62,7 +62,6 @@ IPV6_PREFIX ?= 2001:db8::/64
ifeq (,$(filter native,$(BOARD)))
ifeq (1,$(USE_SLIP))
# SLIP baudrate and UART device can be configured from make command
SLIP_UART ?= "UART_DEV(UART_NUMOF-1)"
SLIP_BAUDRATE ?= 115200
include $(CURDIR)/Makefile.slip.conf
else
@ -109,5 +108,10 @@ uhcpd-daemon: host-tools
endif
endif
ifeq (1,$(USE_SLIP))
sliptty:
$(Q)env -u CC -u CFLAGS make -C $(RIOTTOOLS)/sliptty
endif
# Set a custom channel if needed
include $(RIOTMAKE)/default-radio-settings.inc.mk

View File

@ -1,7 +1,7 @@
# Put board specific dependencies here
ifeq (,$(filter native,$(BOARD)))
ifeq (1,$(USE_SLIP))
USEMODULE += slipdev
USEMODULE += slipdev_stdio
else
USEMODULE += stdio_ethos
endif

View File

@ -1,6 +1,10 @@
INCLUDES += -I$(CURDIR)
CFLAGS += -DSLIP_UART=$(SLIP_UART)
CFLAGS += -DSLIP_BAUDRATE=$(SLIP_BAUDRATE)
CFLAGS += -DSLIPDEV_PARAM_BAUDRATE=$(SLIP_BAUDRATE)
STATIC_ROUTES ?= 1
# Configure terminal parameters
TERMDEPS += sliptty
TERMPROG ?= sudo sh $(RIOTTOOLS)/sliptty/start_network.sh
TERMFLAGS ?= $(IPV6_PREFIX) $(PORT) $(SLIP_BAUDRATE)