Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pkg: initial import of emb6 stack #4713

Merged
merged 5 commits into from
Mar 31, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions Makefile.dep
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,29 @@ ifneq (,$(filter posix_semaphore,$(USEMODULE)))
USEMODULE += xtimer
endif

ifneq (,$(filter emb6_conn_udp,$(USEMODULE)))
USEMODULE += emb6_sock
endif

ifneq (,$(filter emb6_%,$(USEMODULE)))
USEMODULE += emb6
endif

ifneq (,$(filter emb6,$(USEMODULE)))
USEPKG += emb6
USEMODULE += emb6_bsp
USEMODULE += emb6_common
USEMODULE += emb6_contrib
USEMODULE += emb6_ipv6
USEMODULE += emb6_ipv6_multicast
USEMODULE += emb6_llsec
USEMODULE += emb6_mac
USEMODULE += emb6_netdev2
USEMODULE += emb6_rpl
USEMODULE += emb6_sicslowpan
USEMODULE += emb6_utils
endif

ifneq (,$(filter lwip_sixlowpan,$(USEMODULE)))
USEMODULE += lwip_ipv6_autoconfig
endif
Expand Down Expand Up @@ -411,6 +434,25 @@ ifneq (,$(filter lwip_contrib,$(USEMODULE)))
USEMODULE += sema
endif

ifneq (,$(filter emb6_%,$(USEMODULE)))
USEMODULE += emb6
endif

ifneq (,$(filter emb6,$(USEMODULE)))
USEPKG += emb6
USEMODULE += emb6_bsp
USEMODULE += emb6_common
USEMODULE += emb6_contrib
USEMODULE += emb6_ipv6
USEMODULE += emb6_ipv6_multicast
USEMODULE += emb6_llsec
USEMODULE += emb6_mac
USEMODULE += emb6_netdev2
USEMODULE += emb6_rpl
USEMODULE += emb6_sicslowpan
USEMODULE += emb6_utils
endif

ifneq (,$(filter sema,$(USEMODULE)))
USEMODULE += xtimer
endif
Expand Down
1 change: 1 addition & 0 deletions Makefile.pseudomodules
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ PSEUDOMODULES += conn_ip
PSEUDOMODULES += conn_tcp
PSEUDOMODULES += conn_udp
PSEUDOMODULES += core_thread_flags
PSEUDOMODULES += emb6_router
PSEUDOMODULES += gnrc_netdev_default
PSEUDOMODULES += gnrc_ipv6_default
PSEUDOMODULES += gnrc_ipv6_router
Expand Down
11 changes: 11 additions & 0 deletions pkg/emb6/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
PKG_NAME=emb6
PKG_URL=https://github.com/hso-esk/emb6.git
PKG_VERSION=14e4a3cfff01644e078870e14e16a1fe60dcc895
PKG_BUILDDIR ?= $(BINDIRBASE)/pkg/$(BOARD)/$(PKG_NAME)

.PHONY: all

all: git-download
"$(MAKE)" -C $(PKG_BUILDDIR)

include $(RIOTBASE)/pkg/pkg.mk
71 changes: 71 additions & 0 deletions pkg/emb6/Makefile.include
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
PKG_BUILDDIR ?= $(BINDIRBASE)/pkg/$(BOARD)/emb6
EMB6_DIR := $(PKG_BUILDDIR)
EMB6_CONTRIB := $(RIOTBASE)/pkg/emb6/contrib

INCLUDES += -I$(PKG_BUILDDIR)/target
INCLUDES += -I$(RIOTBASE)/pkg/emb6/include

ifeq (,$(filter emb6_router,$(USEMODULE)))
CFLAGS += -DEMB6_CONF_ROUTER=FALSE
endif

ifneq (,$(filter emb6_bsp,$(USEMODULE)))
DIRS += $(EMB6_DIR)/target/bsp
endif

ifneq (,$(filter emb6_common,$(USEMODULE)))
DIRS += $(EMB6_DIR)/emb6
INCLUDES += -I$(EMB6_DIR)/emb6
endif

ifneq (,$(filter emb6_contrib,$(USEMODULE)))
DIRS += $(EMB6_CONTRIB)
endif

ifneq (,$(filter emb6_conn_udp,$(USEMODULE)))
DIRS += $(EMB6_CONTRIB)/conn/udp
endif

ifneq (,$(filter emb6_ipv6,$(USEMODULE)))
DIRS += $(EMB6_DIR)/emb6/src/net/ipv6
INCLUDES += -I$(EMB6_DIR)/emb6/inc/net/ipv6
endif

ifneq (,$(filter emb6_ipv6_multicast,$(USEMODULE)))
DIRS += $(EMB6_DIR)/emb6/src/net/ipv6/multicast
INCLUDES += -I$(EMB6_DIR)/emb6/inc/net/ipv6/multicast
endif

ifneq (,$(filter emb6_llsec,$(USEMODULE)))
DIRS += $(EMB6_DIR)/emb6/src/mac/llsec
INCLUDES += -I$(EMB6_DIR)/emb6/inc/mac/llsec
endif

ifneq (,$(filter emb6_mac,$(USEMODULE)))
DIRS += $(EMB6_DIR)/emb6/src/mac
INCLUDES += -I$(EMB6_DIR)/emb6/inc/mac
endif

ifneq (,$(filter emb6_netdev2,$(USEMODULE)))
DIRS += $(EMB6_CONTRIB)/netdev2
endif

ifneq (,$(filter emb6_rpl,$(USEMODULE)))
DIRS += $(EMB6_DIR)/emb6/src/net/rpl
INCLUDES += -I$(EMB6_DIR)/emb6/inc/net/rpl
endif

ifneq (,$(filter emb6_sicslowpan,$(USEMODULE)))
DIRS += $(EMB6_DIR)/emb6/src/net/sicslowpan
INCLUDES += -I$(EMB6_DIR)/emb6/inc/net/sicslowpan
endif

ifneq (,$(filter emb6_sock,$(USEMODULE)))
DIRS += $(EMB6_DIR)/emb6/src/tport
INCLUDES += -I$(EMB6_DIR)/emb6/inc/tport
endif

ifneq (,$(filter emb6_utils,$(USEMODULE)))
DIRS += $(EMB6_DIR)/utils/src
INCLUDES += -I$(EMB6_DIR)/utils/inc
endif
3 changes: 3 additions & 0 deletions pkg/emb6/contrib/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
MODULE = emb6_contrib

include $(RIOTBASE)/Makefile.base
37 changes: 37 additions & 0 deletions pkg/emb6/contrib/board_conf.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/*
* Copyright (C) Freie Universität Berlin
*
* This file is subject to the terms and conditions of the GNU Lesser
* General Public License v2.1. See the file LICENSE in the top level
* directory for more details.
*/

/**
* @{
*
* @file
* @author Martine Lenders <mlenders@inf.fu-berlin.de>
*/

#include "emb6/netdev2.h"

#include "etimer.h"
#include "board_conf.h"

#define ENABLE_DEBUG (0)
#include "debug.h"

uint8_t board_conf(s_ns_t *ps_nStack)
{
if (ps_nStack != NULL) {
ps_nStack->inif = &emb6_netdev2_driver;
etimer_init();
return ps_nStack->inif->init(ps_nStack);
}
else {
DEBUG("Network stack pointer is NULL");
return 0;
}
}

/** @} */
3 changes: 3 additions & 0 deletions pkg/emb6/contrib/conn/udp/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
MODULE = emb6_conn_udp

include $(RIOTBASE)/Makefile.base
Loading