1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-18 12:52:44 +01:00

Merge pull request #1031 from LudwigOrtmann/issue_676

redbee-econotag: fix maca
This commit is contained in:
Thomas Eichinger 2014-04-24 10:19:22 +02:00
commit d89faccc78
8 changed files with 31 additions and 18 deletions

View File

@ -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

View File

@ -18,5 +18,5 @@ nvm_err_t (*nvm_write) (nvm_interface_t nvm_interface, nvm_type_t nvm_type, voi
= (void*) 0x00006ec5;
nvm_err_t (*nvm_erase) (nvm_interface_t nvm_interface, nvm_type_t nvm_type, uint32_t sector_bitfield)
= (void*) 0x00006e05;
void (*nvm_sets_var) (uint32_t zero_is_for_winners)
= (void*) 0x00007085;
void (*nvm_setsvar) (uint32_t zero_is_for_winners)
= (void*) 0x00007085;

View File

@ -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 ;

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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)

View File

@ -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;