From c2706ef492a42a8ab1cde5ca7b2dee18fc96f8ac Mon Sep 17 00:00:00 2001 From: Martine Lenders Date: Wed, 19 Aug 2015 12:38:38 +0200 Subject: [PATCH 1/2] auto_init: rename auto_init_ng_netif to auto_init_gnrc_netif --- examples/gnrc_networking/Makefile | 2 +- sys/auto_init/Makefile | 2 +- sys/auto_init/auto_init.c | 8 ++++---- sys/auto_init/netif/Makefile | 2 +- sys/auto_init/netif/auto_init_at86rf2xx.c | 2 +- ...o_init_ng_netdev_eth.c => auto_init_gnrc_netdev_eth.c} | 4 ++-- sys/auto_init/netif/auto_init_kw2xrf.c | 2 +- sys/auto_init/netif/auto_init_slip.c | 2 +- sys/auto_init/netif/auto_init_xbee.c | 2 +- tests/driver_at86rf2xx/Makefile | 2 +- tests/driver_kw2xrf/Makefile | 2 +- tests/driver_netdev_eth/Makefile | 2 +- tests/driver_xbee/Makefile | 2 +- tests/driver_xbee/xbee_params.h | 2 +- tests/slip/slip_params.h | 2 +- tests/zep/Makefile | 2 +- 16 files changed, 20 insertions(+), 20 deletions(-) rename sys/auto_init/netif/{auto_init_ng_netdev_eth.c => auto_init_gnrc_netdev_eth.c} (95%) diff --git a/examples/gnrc_networking/Makefile b/examples/gnrc_networking/Makefile index f4eced2286..14eccee222 100644 --- a/examples/gnrc_networking/Makefile +++ b/examples/gnrc_networking/Makefile @@ -18,7 +18,7 @@ BOARD_BLACKLIST := arduino-mega2560 spark-core # Include packages that pull up and auto-init the link layer. # NOTE: 6LoWPAN will be included if IEEE802.15.4 devices are present USEMODULE += gnrc_netif_default -USEMODULE += auto_init_ng_netif +USEMODULE += auto_init_gnrc_netif # Specify the mandatory networking modules for IPv6 and UDP USEMODULE += gnrc_ipv6_router_default USEMODULE += gnrc_udp diff --git a/sys/auto_init/Makefile b/sys/auto_init/Makefile index 500728af1f..94641a8e4a 100644 --- a/sys/auto_init/Makefile +++ b/sys/auto_init/Makefile @@ -1,6 +1,6 @@ DIRS += $(AUTO_INIT_MODULES) -ifneq (,$(filter auto_init_ng_netif,$(USEMODULE))) +ifneq (,$(filter auto_init_gnrc_netif,$(USEMODULE))) DIRS += netif endif diff --git a/sys/auto_init/auto_init.c b/sys/auto_init/auto_init.c index e3f305a913..f34c31ee45 100644 --- a/sys/auto_init/auto_init.c +++ b/sys/auto_init/auto_init.c @@ -160,7 +160,7 @@ void auto_init(void) /* initialize network devices */ -#ifdef MODULE_AUTO_INIT_NG_NETIF +#ifdef MODULE_AUTO_INIT_GNRC_NETIF #ifdef MODULE_AT86RF2XX extern void auto_init_at86rf2xx(void); @@ -178,11 +178,11 @@ void auto_init(void) #endif #ifdef MODULE_GNRC_NETDEV_ETH - extern void auto_init_ng_netdev_eth(void); - auto_init_ng_netdev_eth(); + extern void auto_init_gnrc_netdev_eth(void); + auto_init_gnrc_netdev_eth(); #endif -#endif /* MODULE_AUTO_INIT_NG_NETIF */ +#endif /* MODULE_AUTO_INIT_GNRC_NETIF */ #ifdef MODULE_GNRC_IPV6_NETIF gnrc_ipv6_netif_init_by_dev(); diff --git a/sys/auto_init/netif/Makefile b/sys/auto_init/netif/Makefile index 3003ef2f53..c1e60318c2 100644 --- a/sys/auto_init/netif/Makefile +++ b/sys/auto_init/netif/Makefile @@ -1,3 +1,3 @@ -MODULE = auto_init_ng_netif +MODULE = auto_init_gnrc_netif include $(RIOTBASE)/Makefile.base diff --git a/sys/auto_init/netif/auto_init_at86rf2xx.c b/sys/auto_init/netif/auto_init_at86rf2xx.c index 14c267f921..84c9cc28d7 100644 --- a/sys/auto_init/netif/auto_init_at86rf2xx.c +++ b/sys/auto_init/netif/auto_init_at86rf2xx.c @@ -8,7 +8,7 @@ */ /* - * @ingroup auto_init_ng_netif + * @ingroup auto_init_gnrc_netif * @{ * * @file diff --git a/sys/auto_init/netif/auto_init_ng_netdev_eth.c b/sys/auto_init/netif/auto_init_gnrc_netdev_eth.c similarity index 95% rename from sys/auto_init/netif/auto_init_ng_netdev_eth.c rename to sys/auto_init/netif/auto_init_gnrc_netdev_eth.c index ed31dc7b90..b713c3329a 100644 --- a/sys/auto_init/netif/auto_init_ng_netdev_eth.c +++ b/sys/auto_init/netif/auto_init_gnrc_netdev_eth.c @@ -8,7 +8,7 @@ */ /* - * @ingroup auto_init_ng_netif + * @ingroup auto_init_gnrc_netif * @{ * * @file @@ -40,7 +40,7 @@ static char _nomac_stack[NETDEV_ETH_MAC_STACKSIZE]; -void auto_init_ng_netdev_eth(void) +void auto_init_gnrc_netdev_eth(void) { DEBUG("Initializing NETDEV_ETH device\n"); int res = gnrc_netdev_eth_init(&gnrc_netdev_eth, (dev_eth_t*)&dev_eth_tap); diff --git a/sys/auto_init/netif/auto_init_kw2xrf.c b/sys/auto_init/netif/auto_init_kw2xrf.c index 0a0fbf0d90..f9c7a594c8 100644 --- a/sys/auto_init/netif/auto_init_kw2xrf.c +++ b/sys/auto_init/netif/auto_init_kw2xrf.c @@ -9,7 +9,7 @@ */ /* - * @ingroup auto_init_ng_netif + * @ingroup auto_init_gnrc_netif * @{ * * @file diff --git a/sys/auto_init/netif/auto_init_slip.c b/sys/auto_init/netif/auto_init_slip.c index 94510aec8d..9703b20079 100644 --- a/sys/auto_init/netif/auto_init_slip.c +++ b/sys/auto_init/netif/auto_init_slip.c @@ -8,7 +8,7 @@ */ /** - * @ingroup auto_init_ng_netif + * @ingroup auto_init_gnrc_netif * @{ * * @file diff --git a/sys/auto_init/netif/auto_init_xbee.c b/sys/auto_init/netif/auto_init_xbee.c index d4e4bab9a2..221ac334bd 100644 --- a/sys/auto_init/netif/auto_init_xbee.c +++ b/sys/auto_init/netif/auto_init_xbee.c @@ -8,7 +8,7 @@ */ /** - * @ingroup auto_init_ng_netif + * @ingroup auto_init_gnrc_netif * @{ * * @file diff --git a/tests/driver_at86rf2xx/Makefile b/tests/driver_at86rf2xx/Makefile index eb93aff410..bc3b39de13 100644 --- a/tests/driver_at86rf2xx/Makefile +++ b/tests/driver_at86rf2xx/Makefile @@ -61,7 +61,7 @@ endif endif # USE_BOARD_PARAMETERS=false -USEMODULE += auto_init_ng_netif +USEMODULE += auto_init_gnrc_netif USEMODULE += gnrc_netif USEMODULE += gnrc_nomac USEMODULE += gnrc_pktdump diff --git a/tests/driver_kw2xrf/Makefile b/tests/driver_kw2xrf/Makefile index a2531547e5..8010132ee4 100644 --- a/tests/driver_kw2xrf/Makefile +++ b/tests/driver_kw2xrf/Makefile @@ -50,7 +50,7 @@ endif endif # USE_BOARD_PARAMETERS=false -USEMODULE += auto_init_ng_netif +USEMODULE += auto_init_gnrc_netif USEMODULE += gnrc_netif USEMODULE += gnrc_nomac USEMODULE += gnrc_pktdump diff --git a/tests/driver_netdev_eth/Makefile b/tests/driver_netdev_eth/Makefile index f599c86474..78b4b38237 100644 --- a/tests/driver_netdev_eth/Makefile +++ b/tests/driver_netdev_eth/Makefile @@ -8,7 +8,7 @@ USEMODULE += gnrc USEMODULE += gnrc_nomac USEMODULE += gnrc_pktdump USEMODULE += gnrc_netdev_eth -USEMODULE += auto_init_ng_netif +USEMODULE += auto_init_gnrc_netif USEMODULE += shell USEMODULE += shell_commands diff --git a/tests/driver_xbee/Makefile b/tests/driver_xbee/Makefile index 3690025e3b..b419368f8f 100644 --- a/tests/driver_xbee/Makefile +++ b/tests/driver_xbee/Makefile @@ -18,7 +18,7 @@ endif USEMODULE += xbee USEMODULE += gnrc_netif -USEMODULE += auto_init_ng_netif +USEMODULE += auto_init_gnrc_netif USEMODULE += gnrc_nomac USEMODULE += gnrc_pktdump USEMODULE += shell diff --git a/tests/driver_xbee/xbee_params.h b/tests/driver_xbee/xbee_params.h index 55c67ad131..11eb1f0fa4 100644 --- a/tests/driver_xbee/xbee_params.h +++ b/tests/driver_xbee/xbee_params.h @@ -11,7 +11,7 @@ * @{ * * @file - * @brief xbee driver parameters example, used by auto_init_ng_netif + * @brief xbee driver parameters example, used by auto_init_gnrc_netif * * @author Kaspar Schleiser */ diff --git a/tests/slip/slip_params.h b/tests/slip/slip_params.h index 814297a2ba..f3b81318c6 100644 --- a/tests/slip/slip_params.h +++ b/tests/slip/slip_params.h @@ -11,7 +11,7 @@ * @{ * * @file - * @brief slip parameters example, used by auto_init_ng_netif + * @brief slip parameters example, used by auto_init_gnrc_netif * * @author Martine Lenders */ diff --git a/tests/zep/Makefile b/tests/zep/Makefile index 1444ff472c..cb94a6af4e 100644 --- a/tests/zep/Makefile +++ b/tests/zep/Makefile @@ -7,7 +7,7 @@ BOARD_WHITELIST = native USEMODULE += gnrc_zep USEMODULE += gnrc_netif_default -USEMODULE += auto_init_ng_netif +USEMODULE += auto_init_gnrc_netif USEMODULE += gnrc_ipv6_default USEMODULE += gnrc_nomac USEMODULE += gnrc_pktdump From b41e31bb8a47e88c849793e5e38f34a96eadc238 Mon Sep 17 00:00:00 2001 From: Martine Lenders Date: Wed, 19 Aug 2015 17:22:54 +0200 Subject: [PATCH 2/2] auto_init_ng_netif: remove deprecated files --- .../samr21-xpro/auto_init_ng_netif/Makefile | 1 - .../auto_init_ng_netif/netif_app.c | 91 ------------------- .../auto_init_ng_netif/netif_app.c | 86 ------------------ 3 files changed, 178 deletions(-) delete mode 100644 boards/samr21-xpro/auto_init_ng_netif/Makefile delete mode 100644 tests/driver_at86rf2xx/auto_init_ng_netif/netif_app.c delete mode 100644 tests/driver_kw2xrf/auto_init_ng_netif/netif_app.c diff --git a/boards/samr21-xpro/auto_init_ng_netif/Makefile b/boards/samr21-xpro/auto_init_ng_netif/Makefile deleted file mode 100644 index 48422e909a..0000000000 --- a/boards/samr21-xpro/auto_init_ng_netif/Makefile +++ /dev/null @@ -1 +0,0 @@ -include $(RIOTBASE)/Makefile.base diff --git a/tests/driver_at86rf2xx/auto_init_ng_netif/netif_app.c b/tests/driver_at86rf2xx/auto_init_ng_netif/netif_app.c deleted file mode 100644 index aa92153a5c..0000000000 --- a/tests/driver_at86rf2xx/auto_init_ng_netif/netif_app.c +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Copyright (C) 2015 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. - */ - -/** - * @ingroup tests - * @{ - * - * @file - * @brief Test application for AT86RF2xx network device driver - * - * @author Hauke Petersen - * - * @} - */ - -#include - -#include "kernel.h" -#include "at86rf2xx.h" -#include "net/gnrc/nomac.h" -#include "net/gnrc.h" - -/* make sure the SPI port and the needed GPIO pins are defined */ -#ifndef ATRF_SPI -#error "SPI not defined" -#endif -#ifndef ATRF_CS -#error "Chip select pin not defined" -#endif -#ifndef ATRF_INT -#error "Interrupt pin not defined" -#endif -#ifndef ATRF_SLEEP -#error "Sleep pin not defined" -#endif -#ifndef ATRF_RESET -#error "Reset pin not defined" -#endif -#ifndef ATRF_SPI_SPEED -#define ATRF_SPI_SPEED (SPI_SPEED_5MHZ) -#endif - -/** - * @brief MAC layer stack configuration - * @{ - */ -#define STACKSIZE (THREAD_STACKSIZE_MAIN) -#define PRIO (0) -/** @} */ - -/** - * @brief Allocate the AT86RF2xx device descriptor - */ -static at86rf2xx_t dev; - -/** - * @brief Stack for the nomac thread - */ -static char nomac_stack[STACKSIZE]; - - -void auto_init_ng_netif(void) -{ - kernel_pid_t iface; - int res; - - /* initialize the AT86RF2xx device */ - printf("Initializing the AT86RF2xx radio at SPI_%i... \n", ATRF_SPI); - res = at86rf2xx_init(&dev, ATRF_SPI, ATRF_SPI_SPEED, - ATRF_CS, ATRF_INT, - ATRF_SLEEP, ATRF_RESET); - if (res < 0) { - puts("Error initializing AT86RF2xx radio device"); - return; - } - - /* start MAC layer */ - puts("Starting the NOMAC layer on top of the driver"); - iface = gnrc_nomac_init(nomac_stack, sizeof(nomac_stack), PRIO, "at86rf2xx", - (gnrc_netdev_t *)(&dev)); - if (iface <= KERNEL_PID_UNDEF) { - puts("Error initializing MAC layer"); - return; - } - -} diff --git a/tests/driver_kw2xrf/auto_init_ng_netif/netif_app.c b/tests/driver_kw2xrf/auto_init_ng_netif/netif_app.c deleted file mode 100644 index f4a290a5dc..0000000000 --- a/tests/driver_kw2xrf/auto_init_ng_netif/netif_app.c +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright (C) 2015 Freie Universität Berlin - * Copyright (C) 2015 PHYTEC Messtechnik GmbH - * - * 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. - */ - -/** - * @ingroup tests - * @{ - * - * @file - * @brief Test application for KW2xRF network device driver - * - * @author Hauke Petersen - * @author Jonas Remmert - * - * @} - */ - -#include - -#include "kernel.h" -#include "kw2xrf.h" -#include "net/gnrc/nomac.h" -#include "net/gnrc.h" - -/* make sure the SPI port and the needed GPIO pins are defined */ -#ifndef KWRF_SPI -#error "SPI not defined" -#endif -#ifndef KWRF_CS -#error "Chip select pin not defined" -#endif -#ifndef KWRF_INT -#error "Interrupt pin not defined" -#endif -#ifndef KWRF_SPI_SPEED -#define KWRF_SPI_SPEED (SPI_SPEED_10MHZ) -#endif - -/** - * @brief MAC layer stack configuration - * @{ - */ -#define STACKSIZE (THREAD_STACKSIZE_MAIN) -#define PRIO (0) -/** @} */ - -/** - * @brief Allocate the KW2XRF device descriptor - */ -static kw2xrf_t dev; - -/** - * @brief Stack for the nomac thread - */ -static char nomac_stack[STACKSIZE]; - - -void auto_init_ng_netif(void) -{ - kernel_pid_t iface; - int res; - - /* initialize the KW2XRF device */ - printf("Initializing the KW2XRF radio at SPI_%i... \n", KWRF_SPI); - res = kw2xrf_init(&dev, KWRF_SPI, KWRF_SPI_SPEED, - KWRF_CS, KWRF_INT); - if (res < 0) { - puts("Error initializing KW2XRF radio device"); - return; - } - - /* start MAC layer */ - puts("Starting the NOMAC layer on top of the driver"); - iface = gnrc_nomac_init(nomac_stack, sizeof(nomac_stack), PRIO, "kw2xrf", - (gnrc_netdev_t *)(&dev)); - if (iface <= KERNEL_PID_UNDEF) { - puts("Error initializing MAC layer"); - return; - } - -}