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

ng_slip: fix auto initialization

This commit is contained in:
Martine Lenders 2015-06-01 16:41:03 +02:00
parent b47c4af50b
commit b66ada2ae7
4 changed files with 14 additions and 6 deletions

View File

@ -167,6 +167,11 @@ void auto_init(void)
auto_init_at86rf2xx(); auto_init_at86rf2xx();
#endif #endif
#ifdef MODULE_NG_SLIP
extern void auto_init_slip(void);
auto_init_slip();
#endif
#ifdef MODULE_XBEE #ifdef MODULE_XBEE
extern void auto_init_xbee(void); extern void auto_init_xbee(void);
auto_init_xbee(); auto_init_xbee();

View File

@ -23,7 +23,7 @@
#include "net/gnrc/nomac.h" #include "net/gnrc/nomac.h"
#include "net/gnrc.h" #include "net/gnrc.h"
#include "slip.h" #include "net/gnrc/slip.h"
#include "slip_params.h" #include "slip_params.h"
#define ENABLE_DEBUG (0) #define ENABLE_DEBUG (0)
@ -37,8 +37,8 @@ static gnrc_slip_dev_t slip_devs[SLIP_NUM];
* @brief Define stack parameters for the MAC layer thread * @brief Define stack parameters for the MAC layer thread
* @{ * @{
*/ */
#define SLIP_STACKSIZE (KERNEL_CONF_STACKSIZE_DEFAULT) #define SLIP_STACKSIZE (THREAD_STACKSIZE_DEFAULT)
#define SLIP_PRIO (PRIORITY_MAIN - 4) #define SLIP_PRIO (THREAD_PRIORITY_MAIN - 4)
/** /**
* @brief Stacks for the MAC layer threads * @brief Stacks for the MAC layer threads
@ -55,7 +55,7 @@ void auto_init_slip(void)
SLIP_PRIO); SLIP_PRIO);
if (res <= KERNEL_PID_UNDEF) { if (res <= KERNEL_PID_UNDEF) {
DEBUG("Error initializing XBee radio device!"); DEBUG("Error initializing SLIP radio device!\n");
} }
} }
} }

View File

@ -3,17 +3,20 @@ include ../Makefile.tests_common
BOARD_INSUFFICIENT_RAM := stm32f0discovery BOARD_INSUFFICIENT_RAM := stm32f0discovery
USEMODULE += auto_init_ng_netif
USEMODULE += gnrc USEMODULE += gnrc
USEMODULE += gnrc_pktdump USEMODULE += gnrc_pktdump
USEMODULE += gnrc_slip USEMODULE += gnrc_slip
USEMODULE += shell USEMODULE += shell
USEMODULE += shell_commands USEMODULE += shell_commands
CFLAGS += -I$(CURDIR)
ifneq (,$(SLIP_UART)) ifneq (,$(SLIP_UART))
CFLAGS += -DSLIP_UART=$(SLIP_UART) CFLAGS += -DSLIP_UART=$(SLIP_UART)
else else
# set default # set default
CFLAGS += -DSLIP_UART=UART_0 CFLAGS += -DSLIP_UART="(UART_NUMOF-1)"
endif endif
ifneq (,$(SLIP_BAUDRATE)) ifneq (,$(SLIP_BAUDRATE))
CFLAGS += -DSLIP_BAUDRATE=$(SLIP_BAUDRATE) CFLAGS += -DSLIP_BAUDRATE=$(SLIP_BAUDRATE)

View File

@ -25,7 +25,7 @@
extern "C" { extern "C" {
#endif #endif
static gnrc_slip_params_t xbee_params[] = { static gnrc_slip_params_t gnrc_slip_params[] = {
{ {
.uart = SLIP_UART, .uart = SLIP_UART,
.baudrate = SLIP_BAUDRATE, .baudrate = SLIP_BAUDRATE,