mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-01-18 12:52:44 +01:00
core cpu: add defaulttransceiver pseudomodule
update examples/default
This commit is contained in:
parent
804ba3c7d7
commit
8ac4f3332d
@ -6,7 +6,12 @@ INCLUDES += -I$(RIOTBASE)/core/include -I$(RIOTBASE)/drivers/include -I$(RIOTBAS
|
||||
ED = $(USEMODULE:%=-DMODULE_%)
|
||||
ED += $(USEPKG:%=-DMODULE_%)
|
||||
EXTDEFINES = $(shell echo $(ED)|tr 'a-z' 'A-Z')
|
||||
export BASELIBS = $(USEMODULE:%= $(BINDIR)%.a)
|
||||
BL=$(USEMODULE:%= $(BINDIR)%.a)
|
||||
|
||||
# Exclude defaulttransceiver, it is only a pseudomodule that adds other
|
||||
# modules depending on the current board.
|
||||
export BASELIBS = $(shell echo $(BL)|sed \
|
||||
-e 's/[^ ]*defaulttransceiver.a//')
|
||||
|
||||
CFLAGS += $(EXTDEFINES)
|
||||
|
||||
|
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user