mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
Merge pull request #609 from LudwigOrtmann/transceiver_any
anytransceiver pseudomodule
This commit is contained in:
commit
53264c7a45
@ -1,12 +1,15 @@
|
||||
export MAKEBASE =$(RIOTBASE)
|
||||
UNDEF += $(BINDIR)startup.o
|
||||
|
||||
include $(RIOTBASE)/Makefile.pseudomodules
|
||||
|
||||
USEMODULE += cpu core sys
|
||||
INCLUDES += -I$(RIOTBASE)/core/include -I$(RIOTBASE)/drivers/include -I$(RIOTBASE)/sys/include
|
||||
ED = $(USEMODULE:%=-DMODULE_%)
|
||||
ED += $(USEPKG:%=-DMODULE_%)
|
||||
EXTDEFINES = $(shell echo $(ED)|tr 'a-z' 'A-Z')
|
||||
export BASELIBS = $(USEMODULE:%= $(BINDIR)%.a)
|
||||
REALMODULES = $(filter-out $(PSEUDOMODULES), $(USEMODULE))
|
||||
export BASELIBS = $(REALMODULES:%= $(BINDIR)%.a)
|
||||
|
||||
CFLAGS += $(EXTDEFINES)
|
||||
|
||||
|
1
Makefile.pseudomodules
Normal file
1
Makefile.pseudomodules
Normal file
@ -0,0 +1 @@
|
||||
PSEUDOMODULES += defaulttransceiver
|
@ -1,3 +1,16 @@
|
||||
export INCLUDES += -I$(RIOTBOARD)/avsextrem/include
|
||||
|
||||
ifneq (,$(filter defaulttransceiver,$(USEMODULE)))
|
||||
ifeq (,$(filter cc110x,$(USEMODULE)))
|
||||
USEMODULE += cc110x
|
||||
endif
|
||||
ifeq (,$(filter transceiver,$(USEMODULE)))
|
||||
USEMODULE += transceiver
|
||||
endif
|
||||
endif
|
||||
|
||||
ifneq (,$(filter cc110x,$(USEMODULE)))
|
||||
INCLUDES += -I$(RIOTBASE)/sys/net/include
|
||||
endif
|
||||
|
||||
include $(RIOTBOARD)/msba2-common/Makefile.include
|
||||
|
8
boards/chronos/Makefile.dep
Normal file
8
boards/chronos/Makefile.dep
Normal file
@ -0,0 +1,8 @@
|
||||
ifneq (,$(filter defaulttransceiver,$(USEMODULE)))
|
||||
ifeq (,$(filter cc110x_ng,$(USEMODULE)))
|
||||
USEMODULE += cc110x_ng
|
||||
endif
|
||||
ifeq (,$(filter transceiver,$(USEMODULE)))
|
||||
USEMODULE += transceiver
|
||||
endif
|
||||
endif
|
@ -20,3 +20,5 @@ export HEXFILE = $(BINDIR)$(PROJECT).hex
|
||||
export USEMODULE += msp430_common
|
||||
export FFLAGS = rf2500 "prog $(HEXFILE)"
|
||||
export OFLAGS = -O ihex
|
||||
|
||||
include $(RIOTBOARD)/$(BOARD)/Makefile.dep
|
||||
|
@ -1,3 +1,12 @@
|
||||
ifneq (,$(filter defaulttransceiver,$(USEMODULE)))
|
||||
ifeq (,$(filter cc110x_ng,$(USEMODULE)))
|
||||
USEMODULE += cc110x_ng
|
||||
endif
|
||||
ifeq (,$(filter transceiver,$(USEMODULE)))
|
||||
USEMODULE += transceiver
|
||||
endif
|
||||
endif
|
||||
|
||||
ifneq (,$(filter cc110x_ng,$(USEMODULE)))
|
||||
ifeq (,$(filter cc110x_spi,$(USEMODULE)))
|
||||
USEMODULE += cc110x_spi
|
||||
|
@ -1,3 +1,12 @@
|
||||
export INCLUDES += -I$(RIOTBOARD)/msba2/include
|
||||
|
||||
ifneq (,$(filter defaulttransceiver,$(USEMODULE)))
|
||||
ifeq (,$(filter cc110x_ng,$(USEMODULE)))
|
||||
USEMODULE += cc110x_ng
|
||||
endif
|
||||
ifeq (,$(filter transceiver,$(USEMODULE)))
|
||||
USEMODULE += transceiver
|
||||
endif
|
||||
endif
|
||||
|
||||
include $(RIOTBOARD)/msba2-common/Makefile.include
|
||||
|
8
boards/native/Makefile.dep
Normal file
8
boards/native/Makefile.dep
Normal file
@ -0,0 +1,8 @@
|
||||
ifneq (,$(filter defaulttransceiver,$(USEMODULE)))
|
||||
ifeq (,$(filter nativenet,$(USEMODULE)))
|
||||
USEMODULE += nativenet
|
||||
endif
|
||||
ifeq (,$(filter transceiver,$(USEMODULE)))
|
||||
USEMODULE += transceiver
|
||||
endif
|
||||
endif
|
@ -1,3 +1,5 @@
|
||||
include $(RIOTBOARD)/$(BOARD)/Makefile.dep
|
||||
|
||||
export NATIVEINCLUDES = -I$(RIOTBOARD)/$(BOARD)/include/
|
||||
export NATIVEINCLUDES += -I$(RIOTBASE)/core/include/
|
||||
export NATIVEINCLUDES += -I$(RIOTBASE)/drivers/include/
|
||||
|
@ -1,3 +1,13 @@
|
||||
export INCLUDES += -I$(RIOTBOARD)/pttu/include
|
||||
|
||||
# Enable this after fixing https://github.com/RIOT-OS/RIOT/issues/659
|
||||
#ifneq (,$(filter defaulttransceiver,$(USEMODULE)))
|
||||
# ifeq (,$(filter cc110x,$(USEMODULE)))
|
||||
# USEMODULE += cc110x
|
||||
# endif
|
||||
# ifeq (,$(filter transceiver,$(USEMODULE)))
|
||||
# USEMODULE += transceiver
|
||||
# endif
|
||||
#endif
|
||||
|
||||
include $(RIOTBOARD)/msba2-common/Makefile.include
|
||||
|
@ -29,3 +29,13 @@ export FFLAGS = -t $(PORT) -f $(HEXFILE) -c 'bbmc -l redbee-econotag reset'
|
||||
export OFLAGS = -O binary --gap-fill=0xff
|
||||
|
||||
export INCLUDES += -I$(RIOTCPU)/$(CPU)/include/ -I$(RIOTBOARD)/$(BOARD)/include
|
||||
|
||||
# un-comment once https://github.com/RIOT-OS/RIOT/issues/676 is fixed
|
||||
#ifneq (,$(filter defaulttransceiver,$(USEMODULE)))
|
||||
# ifeq (,$(filter mc1322x,$(USEMODULE)))
|
||||
# USEMODULE += mc1322x
|
||||
# endif
|
||||
# ifeq (,$(filter transceiver,$(USEMODULE)))
|
||||
# USEMODULE += transceiver
|
||||
# endif
|
||||
#endif
|
||||
|
@ -24,3 +24,12 @@ export FFLAGS = --telosb -c $(PORT) -r -e -I -p $(HEXFILE)
|
||||
|
||||
export INCLUDES += -I$(RIOTCPU)/msp430-common/include -I$(RIOTBOARD)/$(BOARD)/include -I$(RIOTBASE)/drivers/cc2420/include -I$(RIOTBASE)/sys/net/include
|
||||
export OFLAGS = -O ihex
|
||||
|
||||
ifneq (,$(filter defaulttransceiver,$(USEMODULE)))
|
||||
ifeq (,$(filter cc2240,$(USEMODULE)))
|
||||
USEMODULE += cc2420
|
||||
endif
|
||||
ifeq (,$(filter transceiver,$(USEMODULE)))
|
||||
USEMODULE += transceiver
|
||||
endif
|
||||
endif
|
||||
|
@ -1,3 +1,12 @@
|
||||
ifneq (,$(filter defaulttransceiver,$(USEMODULE)))
|
||||
ifeq (,$(filter cc110x_ng,$(USEMODULE)))
|
||||
USEMODULE += cc110x_ng
|
||||
endif
|
||||
ifeq (,$(filter transceiver,$(USEMODULE)))
|
||||
USEMODULE += transceiver
|
||||
endif
|
||||
endif
|
||||
|
||||
ifneq (,$(filter cc110x_ng,$(USEMODULE)))
|
||||
ifeq (,$(filter cc110x_spi,$(USEMODULE)))
|
||||
USEMODULE += cc110x_spi
|
||||
|
@ -1 +1,10 @@
|
||||
USEMODULE += msp430_common
|
||||
|
||||
ifneq (,$(filter defaulttransceiver,$(USEMODULE)))
|
||||
ifeq (,$(filter cc2420,$(USEMODULE)))
|
||||
USEMODULE += cc2420
|
||||
endif
|
||||
ifeq (,$(filter transceiver,$(USEMODULE)))
|
||||
USEMODULE += transceiver
|
||||
endif
|
||||
endif
|
||||
|
@ -35,33 +35,22 @@ USEMODULE += shell_commands
|
||||
USEMODULE += ps
|
||||
USEMODULE += vtimer
|
||||
USEMODULE += auto_init
|
||||
USEMODULE += defaulttransceiver
|
||||
|
||||
ifneq (,$(filter msb-430,$(BOARD)))
|
||||
USEMODULE += sht11
|
||||
endif
|
||||
ifneq (,$(filter msb-430h,$(BOARD)))
|
||||
USEMODULE += sht11
|
||||
USEMODULE += cc110x_ng
|
||||
endif
|
||||
ifneq (,$(filter chronos,$(BOARD)))
|
||||
USEMODULE += cc110x_ng
|
||||
endif
|
||||
ifneq (,$(filter wsn430-v1_3b,$(BOARD)))
|
||||
USEMODULE += cc110x_ng
|
||||
endif
|
||||
ifneq (,$(filter msba2,$(BOARD)))
|
||||
USEMODULE += sht11
|
||||
USEMODULE += ltc4150
|
||||
USEMODULE += rtc
|
||||
USEMODULE += mci
|
||||
USEMODULE += cc110x_ng
|
||||
USEMODULE += config
|
||||
USEMODULE += random
|
||||
endif
|
||||
ifneq (,$(filter native,$(BOARD)))
|
||||
USEMODULE += ltc4150
|
||||
USEMODULE += rtc
|
||||
USEMODULE += nativenet
|
||||
USEMODULE += transceiver
|
||||
USEMODULE += config
|
||||
USEMODULE += random
|
||||
endif
|
||||
|
@ -94,25 +94,7 @@ void init_transceiver(void)
|
||||
radio,
|
||||
"radio");
|
||||
|
||||
uint16_t transceivers = 0;
|
||||
#ifdef MODULE_CC110X
|
||||
transceivers |= TRANSCEIVER_CC1100;
|
||||
#endif
|
||||
#ifdef MODULE_CC110X_NG
|
||||
transceivers |= TRANSCEIVER_CC1100;
|
||||
#endif
|
||||
#ifdef MODULE_CC2420
|
||||
transceivers |= TRANSCEIVER_CC2420;
|
||||
#endif
|
||||
#ifdef MODULE_NATIVENET
|
||||
transceivers |= TRANSCEIVER_NATIVE;
|
||||
#endif
|
||||
#ifdef MODULE_AT86RF231
|
||||
transceivers |= TRANSCEIVER_AT86RF231;
|
||||
#endif
|
||||
#ifdef MODULE_MC1322X
|
||||
transceivers |= TRANSCEIVER_MC1322X;
|
||||
#endif
|
||||
uint16_t transceivers = TRANSCEIVER_DEFAULT;
|
||||
|
||||
transceiver_init(transceivers);
|
||||
(void) transceiver_start();
|
||||
|
@ -15,29 +15,54 @@
|
||||
* https://github.com/RIOT-OS/RIOT/issues/117 */
|
||||
#ifdef MODULE_CC110X
|
||||
#include "cc110x.h"
|
||||
#ifndef TRANSCEIVER_DEFAULT
|
||||
#define TRANSCEIVER_DEFAULT TRANSCEIVER_CC1100
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef MODULE_CC110X_NG
|
||||
#include "cc110x_ng.h"
|
||||
#ifndef TRANSCEIVER_DEFAULT
|
||||
#define TRANSCEIVER_DEFAULT TRANSCEIVER_CC1100
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef MODULE_CC11020
|
||||
#include "cc1020.h"
|
||||
#ifndef TRANSCEIVER_DEFAULT
|
||||
#define TRANSCEIVER_DEFAULT TRANSCEIVER_CC1020
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef MODULE_CC2420
|
||||
#include "cc2420.h"
|
||||
#ifndef TRANSCEIVER_DEFAULT
|
||||
#define TRANSCEIVER_DEFAULT TRANSCEIVER_CC2420
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef MODULE_MC1322X
|
||||
#include "mc1322x.h"
|
||||
#include "maca.h"
|
||||
#include "maca_packet.h"
|
||||
#ifndef TRANSCEIVER_DEFAULT
|
||||
#define TRANSCEIVER_DEFAULT TRANSCEIVER_MC1322X
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef MODULE_NATIVENET
|
||||
#include "nativenet.h"
|
||||
#include "nativenet_internal.h"
|
||||
#ifndef TRANSCEIVER_DEFAULT
|
||||
#define TRANSCEIVER_DEFAULT TRANSCEIVER_NATIVE
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef MODULE_AT86RF231
|
||||
#include "at86rf231.h"
|
||||
#ifndef TRANSCEIVER_DEFAULT
|
||||
#define TRANSCEIVER_DEFAULT TRANSCEIVER_AT86RF231
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* Stack size for transceiver thread */
|
||||
|
@ -1,6 +1,6 @@
|
||||
export PROJECT = test_net_if
|
||||
|
||||
BOARD_WHITELIST = native msba2 telosb
|
||||
BOARD_BLACKLIST = mbed_lpc1768
|
||||
|
||||
include ../Makefile.tests_common
|
||||
|
||||
@ -10,17 +10,7 @@ endif
|
||||
|
||||
USEMODULE += auto_init
|
||||
USEMODULE += net_if
|
||||
ifeq ($(BOARD),native)
|
||||
USEMODULE += nativenet
|
||||
else ifeq ($(BOARD),msba2)
|
||||
USEMODULE += cc110x_ng
|
||||
else ifeq ($(BOARD),telosb)
|
||||
USEMODULE += cc2420
|
||||
else ifeq ($(BOARD),wsn430-v1_4)
|
||||
USEMODULE += cc2420
|
||||
else ifeq ($(BOARD),iot-lab_M3)
|
||||
USEMODULE += at86rf231
|
||||
endif
|
||||
USEMODULE += defaulttransceiver
|
||||
|
||||
export INCLUDES += -I$(RIOTBASE)/sys/net/include
|
||||
|
||||
|
@ -14,18 +14,6 @@
|
||||
#include "net_help.h"
|
||||
#include "transceiver.h"
|
||||
|
||||
#ifndef TRANSCEIVER
|
||||
#ifdef MODULE_AT86RF231
|
||||
#define TRANSCEIVER (TRANSCEIVER_AT86RF231)
|
||||
#elif MODULE_CC110X_NG
|
||||
#define TRANSCEIVER (TRANSCEIVER_CC1100)
|
||||
#elif MODULE_NATIVENET
|
||||
#define TRANSCEIVER (TRANSCEIVER_NATIVE)
|
||||
#elif MODULE_CC2420
|
||||
#define TRANSCEIVER (TRANSCEIVER_CC2420)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
int initialize_tests(void);
|
||||
int test_net_if_initialization(int iface);
|
||||
int test_net_if_get_add_l3p_types(int iface);
|
||||
@ -110,10 +98,10 @@ int initialize_tests(void)
|
||||
int iface;
|
||||
|
||||
#ifndef MODULE_AUTO_INIT
|
||||
transceiver_init(TRANSCEIVER);
|
||||
transceiver_init(TRANSCEIVER_DEFAULT);
|
||||
transceiver_start();
|
||||
net_if_init();
|
||||
iface = net_if_init_interface(0, TRANSCEIVER);
|
||||
iface = net_if_init_interface(0, TRANSCEIVER_DEFAULT);
|
||||
return iface;
|
||||
#else
|
||||
iface = -1;
|
||||
|
@ -1,20 +1,11 @@
|
||||
export PROJECT =test_pnet
|
||||
include ../Makefile.tests_common
|
||||
|
||||
ifeq ($(BOARD),stm32f4discovery)
|
||||
include Makefile.$(BOARD)
|
||||
endif
|
||||
|
||||
USEMODULE += auto_init
|
||||
USEMODULE += posix
|
||||
USEMODULE += pnet
|
||||
USEMODULE += vtimer
|
||||
|
||||
ifeq ($(strip $(BOARD)),native)
|
||||
USEMODULE += nativenet
|
||||
else ifeq ($(strip $(BOARD)),msba2)
|
||||
USEMODULE += cc110x_ng
|
||||
endif
|
||||
USEMODULE += defaulttransceiver
|
||||
|
||||
ifeq ($(BOARD),native)
|
||||
CFLAGS += -isystem $(RIOTBASE)/sys/net/include \
|
||||
|
@ -30,12 +30,6 @@
|
||||
#include "net_if.h"
|
||||
#include "ipv6.h"
|
||||
|
||||
#ifdef MODULE_NATIVENET
|
||||
#define TRANSCEIVER TRANSCEIVER_NATIVE
|
||||
#else
|
||||
#define TRANSCEIVER TRANSCEIVER_CC1100
|
||||
#endif
|
||||
|
||||
#ifndef R_ADDR
|
||||
#define R_ADDR (1)
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user