mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
redbee-econotag: fix maca
I suspect that the transceiver will still not work as there are many many warnings, but at least it builds now. closes: #676
This commit is contained in:
parent
1bc74f4fef
commit
3a1980af36
@ -29,15 +29,16 @@ 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/
|
||||
export INCLUDES += -I$(RIOTCPU)/$(CPU)/maca/include
|
||||
export INCLUDES += -I$(RIOTBOARD)/$(BOARD)/drivers/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
|
||||
ifneq (,$(filter defaulttransceiver,$(USEMODULE)))
|
||||
ifeq (,$(filter mc1322x,$(USEMODULE)))
|
||||
USEMODULE += mc1322x
|
||||
endif
|
||||
ifeq (,$(filter transceiver,$(USEMODULE)))
|
||||
USEMODULE += transceiver
|
||||
endif
|
||||
endif
|
||||
|
||||
export UNDEF += $(BINDIR)cpu/startup.o
|
||||
|
@ -7,6 +7,9 @@ endif
|
||||
ifneq (,$(filter mc1322x_asm,$(USEMODULE)))
|
||||
DIRS += asm
|
||||
endif
|
||||
ifneq (,$(filter mc1322x,$(USEMODULE)))
|
||||
DIRS += maca
|
||||
endif
|
||||
|
||||
all: $(BINDIR)$(MODULE).a
|
||||
@for i in $(DIRS) ; do "$(MAKE)" -C $$i || exit 1; done ;
|
||||
|
@ -1,4 +1,5 @@
|
||||
INCLUDES += -I$(RIOTBASE)/cpu/mc1322x/include
|
||||
INCLUDES += -I$(RIOTCPU)/$(CPU)/include
|
||||
INCLUDES += -I$(RIOTCPU)/$(CPU)/maca/include
|
||||
|
||||
include $(RIOTCPU)/arm_common/Makefile.include
|
||||
|
||||
|
@ -1,5 +1,7 @@
|
||||
INCLUDES = -I$(RIOTBASE)/cpu/mc1322x/include -I$(RIOTBASE)/cpu/mc1322x/maca/include -I$(RIOTBOARDS)/redbee-econotag/drivers/include
|
||||
INCLUDES += -I$(RIOTCPU)/$(CPU)/include \
|
||||
-I$(RIOTCPU)/$(CPU)/maca/include \
|
||||
-I$(RIOTBOARDS)/redbee-econotag/drivers/include
|
||||
|
||||
MODULE =mc1322x
|
||||
MODULE = mc1322x
|
||||
|
||||
include $(RIOTBASE)/Makefile.base
|
||||
|
@ -98,9 +98,9 @@
|
||||
#endif
|
||||
#endif
|
||||
#ifdef MODULE_MC1322X
|
||||
#if (MC1322X_MAX_DATA_LENGTH > PAYLOAD_SIZE)
|
||||
#if (MACA_MAX_PAYLOAD_SIZE > PAYLOAD_SIZE)
|
||||
#undef PAYLOAD_SIZE
|
||||
#define PAYLOAD_SIZE (MC1322X_MAX_DATA_LENGTH)
|
||||
#define PAYLOAD_SIZE (MACA_MAX_PAYLOAD_SIZE)
|
||||
#endif
|
||||
#endif
|
||||
#ifdef MODULE_NATIVENET
|
||||
|
@ -51,8 +51,14 @@
|
||||
#include "nativenet.h"
|
||||
#define TEXT_SIZE NATIVE_MAX_DATA_LENGTH
|
||||
#define _TC_TYPE TRANSCEIVER_NATIVE
|
||||
#endif
|
||||
|
||||
#elif defined( MODULE_MC1322X )
|
||||
#include "mc1322x.h"
|
||||
#include "maca.h"
|
||||
#include "maca_packet.h"
|
||||
#define TEXT_SIZE MACA_MAX_PAYLOAD_SIZE
|
||||
#define _TC_TYPE TRANSCEIVER_MC1322X
|
||||
#endif
|
||||
|
||||
/* checked for type safety */
|
||||
void _transceiver_get_set_address_handler(int argc, char **argv)
|
||||
|
@ -744,7 +744,7 @@ static int8_t send_packet(transceiver_type_t t, void *pkt)
|
||||
|
||||
case TRANSCEIVER_MC1322X:
|
||||
maca_pkt->length = p->length;
|
||||
memcpy(maca_pkt->data, p->data, p->length);
|
||||
memcpy(maca_pkt->data, &p->frame, p->length);
|
||||
maca_set_tx_packet(maca_pkt);
|
||||
res = 1;
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user