Merge branch 'develop' into lafka-rpl-probing-guard
This commit is contained in:
commit
cb6dd29e4a
@ -9,10 +9,13 @@ SIZE = arm-none-eabi-size
|
||||
SREC_CAT = srec_cat
|
||||
|
||||
CFLAGS += -mthumb -mabi=aapcs -mlittle-endian
|
||||
CFLAGS += -Werror -Wall
|
||||
CFLAGS += -Wall
|
||||
CFLAGS += -std=c99
|
||||
CFLAGS += -ffunction-sections -fdata-sections -fno-strict-aliasing
|
||||
CFLAGS += -fshort-enums -fomit-frame-pointer -fno-builtin
|
||||
ifeq ($(WERROR),1)
|
||||
CFLAGS += -Werror
|
||||
endif
|
||||
|
||||
LDFLAGS += -mthumb -mlittle-endian
|
||||
|
||||
|
@ -1,6 +1,12 @@
|
||||
CPU_ABS_PATH = arch/cpu/cc26xx-cc13xx
|
||||
TI_XXWARE = $(CONTIKI_CPU)/$(TI_XXWARE_PATH)
|
||||
|
||||
ifeq (,$(wildcard $(TI_XXWARE)))
|
||||
$(warning $(TI_XXWARE) does not exist.)
|
||||
$(warning Did you run 'git submodule update --init' ?)
|
||||
$(error "")
|
||||
endif
|
||||
|
||||
### cc26xxware sources under driverlib will be added to the MODULES list
|
||||
TI_XXWARE_SRC = $(CPU_ABS_PATH)/$(TI_XXWARE_PATH)/driverlib
|
||||
|
||||
|
@ -71,7 +71,9 @@
|
||||
#endif /* CPU_FAMILY_CC13XX */
|
||||
|
||||
#if CC13XX_CONF_PROP_MODE
|
||||
#ifndef NETSTACK_CONF_RADIO
|
||||
#define NETSTACK_CONF_RADIO prop_mode_driver
|
||||
#endif /* NETSTACK_CONF_RADIO */
|
||||
|
||||
/* Channels count from 0 upwards in IEEE 802.15.4g */
|
||||
#ifndef IEEE802154_CONF_DEFAULT_CHANNEL
|
||||
|
@ -171,6 +171,45 @@ tsch_schedule_get_link_by_handle(uint16_t handle)
|
||||
return NULL;
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
static const char *
|
||||
print_link_options(uint16_t link_options)
|
||||
{
|
||||
static char buffer[20];
|
||||
unsigned length;
|
||||
|
||||
buffer[0] = '\0';
|
||||
if(link_options & LINK_OPTION_TX) {
|
||||
strcat(buffer, "Tx|");
|
||||
}
|
||||
if(link_options & LINK_OPTION_RX) {
|
||||
strcat(buffer, "Rx|");
|
||||
}
|
||||
if(link_options & LINK_OPTION_SHARED) {
|
||||
strcat(buffer, "Sh|");
|
||||
}
|
||||
length = strlen(buffer);
|
||||
if(length > 0) {
|
||||
buffer[length - 1] = '\0';
|
||||
}
|
||||
|
||||
return buffer;
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
static const char *
|
||||
print_link_type(uint16_t link_type)
|
||||
{
|
||||
switch(link_type) {
|
||||
case LINK_TYPE_NORMAL:
|
||||
return "NORMAL";
|
||||
case LINK_TYPE_ADVERTISING:
|
||||
return "ADV";
|
||||
case LINK_TYPE_ADVERTISING_ONLY:
|
||||
return "ADV_ONLY";
|
||||
default:
|
||||
return "?";
|
||||
}
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/* Adds a link to a slotframe, return a pointer to it (NULL if failure) */
|
||||
struct tsch_link *
|
||||
tsch_schedule_add_link(struct tsch_slotframe *slotframe,
|
||||
@ -218,8 +257,10 @@ tsch_schedule_add_link(struct tsch_slotframe *slotframe,
|
||||
}
|
||||
linkaddr_copy(&l->addr, address);
|
||||
|
||||
LOG_INFO("add_link %u %u %u %u %u ",
|
||||
slotframe->handle, link_options, link_type, timeslot, channel_offset);
|
||||
LOG_INFO("add_link sf=%u opt=%s type=%s ts=%u ch=%u addr=",
|
||||
slotframe->handle,
|
||||
print_link_options(link_options),
|
||||
print_link_type(link_type), timeslot, channel_offset);
|
||||
LOG_INFO_LLADDR(address);
|
||||
LOG_INFO_("\n");
|
||||
/* Release the lock before we update the neighbor (will take the lock) */
|
||||
@ -260,8 +301,10 @@ tsch_schedule_remove_link(struct tsch_slotframe *slotframe, struct tsch_link *l)
|
||||
if(l == current_link) {
|
||||
current_link = NULL;
|
||||
}
|
||||
LOG_INFO("remove_link %u %u %u %u ",
|
||||
slotframe->handle, l->link_options, l->timeslot, l->channel_offset);
|
||||
LOG_INFO("remove_link sf=%u opt=%s type=%s ts=%u ch=%u addr=",
|
||||
slotframe->handle,
|
||||
print_link_options(l->link_options),
|
||||
print_link_type(l->link_type), l->timeslot, l->channel_offset);
|
||||
LOG_INFO_LLADDR(&l->addr);
|
||||
LOG_INFO_("\n");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user