diff --git a/pkg/openthread/Makefile b/pkg/openthread/Makefile index 2558437b13..fe2b201c87 100644 --- a/pkg/openthread/Makefile +++ b/pkg/openthread/Makefile @@ -1,6 +1,6 @@ PKG_NAME=openthread PKG_URL=https://github.com/openthread/openthread.git -PKG_VERSION=thread-reference-20170716 +PKG_VERSION=thread-reference-20180926 PKG_BUILDDIR ?= $(PKGDIRBASE)/$(PKG_NAME) ifneq (,$(filter openthread-ftd,$(USEMODULE))) @@ -15,7 +15,7 @@ else endif ifneq (,$(filter openthread-cli,$(USEMODULE))) - CLI_ARG = --enable-cli-app=$(TD) + CLI_ARG = --enable-cli --enable-$(TD) endif OPENTHREAD_ARGS += $(CLI_ARG) $(JOINER_ARG) --enable-application-coap diff --git a/pkg/openthread/contrib/platform_misc.c b/pkg/openthread/contrib/platform_misc.c index 2d6e97a56b..657cce08be 100644 --- a/pkg/openthread/contrib/platform_misc.c +++ b/pkg/openthread/contrib/platform_misc.c @@ -17,7 +17,6 @@ */ -#include "openthread/types.h" #include "openthread/platform/misc.h" #include "periph/pm.h" diff --git a/pkg/openthread/contrib/platform_radio.c b/pkg/openthread/contrib/platform_radio.c index 7685bddfe5..545a579671 100755 --- a/pkg/openthread/contrib/platform_radio.c +++ b/pkg/openthread/contrib/platform_radio.c @@ -28,7 +28,6 @@ #include "net/l2util.h" #include "net/netdev/ieee802154.h" #include "openthread/config.h" -#include "openthread/openthread.h" #include "openthread/platform/diag.h" #include "openthread/platform/radio.h" #include "ot.h" @@ -211,13 +210,13 @@ void otPlatRadioSetPanId(otInstance *aInstance, uint16_t panid) } /* OpenThread will call this for setting extended address */ -void otPlatRadioSetExtendedAddress(otInstance *aInstance, uint8_t *aExtendedAddress) +void otPlatRadioSetExtendedAddress(otInstance *aInstance, const otExtAddress *aExtAddress) { (void)aInstance; DEBUG("openthread: otPlatRadioSetExtendedAddress\n"); char reversed_addr[IEEE802154_LONG_ADDRESS_LEN]; for (unsigned i = 0; i < IEEE802154_LONG_ADDRESS_LEN; i++) { - reversed_addr[i] = (uint8_t) ((uint8_t *)aExtendedAddress)[IEEE802154_LONG_ADDRESS_LEN - 1 - i]; + reversed_addr[i] = (uint8_t) ((uint8_t *)aExtAddress)[IEEE802154_LONG_ADDRESS_LEN - 1 - i]; } if (ENABLE_DEBUG) { for (unsigned i = 0; i < IEEE802154_LONG_ADDRESS_LEN; ++i) { @@ -411,7 +410,7 @@ otError otPlatRadioAddSrcMatchShortEntry(otInstance *aInstance, const uint16_t a return OT_ERROR_NONE; } -otError otPlatRadioAddSrcMatchExtEntry(otInstance *aInstance, const uint8_t *aExtAddress) +otError otPlatRadioAddSrcMatchExtEntry(otInstance *aInstance, const otExtAddress *aExtAddress) { DEBUG("otPlatRadioAddSrcMatchExtEntry\n"); (void)aInstance; @@ -427,7 +426,7 @@ otError otPlatRadioClearSrcMatchShortEntry(otInstance *aInstance, const uint16_t return OT_ERROR_NONE; } -otError otPlatRadioClearSrcMatchExtEntry(otInstance *aInstance, const uint8_t *aExtAddress) +otError otPlatRadioClearSrcMatchExtEntry(otInstance *aInstance, const otExtAddress *aExtAddress) { DEBUG("otPlatRadioClearSrcMatchExtEntry\n"); (void)aInstance; diff --git a/pkg/openthread/contrib/platform_settings.c b/pkg/openthread/contrib/platform_settings.c index b8ae084037..4ee0f5394e 100644 --- a/pkg/openthread/contrib/platform_settings.c +++ b/pkg/openthread/contrib/platform_settings.c @@ -17,7 +17,8 @@ */ #include "assert.h" -#include "openthread/types.h" +#include "openthread/error.h" +#include "openthread/instance.h" #define ENABLE_DEBUG (0) #include "debug.h" diff --git a/pkg/openthread/contrib/platform_uart.c b/pkg/openthread/contrib/platform_uart.c index 122d7f838c..4e73a73bb8 100755 --- a/pkg/openthread/contrib/platform_uart.c +++ b/pkg/openthread/contrib/platform_uart.c @@ -23,7 +23,6 @@ #include "stdio_uart.h" #include "periph/uart.h" -#include "openthread/types.h" #include "openthread/platform/uart.h" #include "ot.h" diff --git a/pkg/openthread/include/ot.h b/pkg/openthread/include/ot.h index 9a9c66485f..9be3f8f5c5 100755 --- a/pkg/openthread/include/ot.h +++ b/pkg/openthread/include/ot.h @@ -33,7 +33,7 @@ extern "C" { #include "net/ethernet.h" #include "net/netdev.h" #include "thread.h" -#include "openthread/types.h" +#include "openthread/instance.h" /** * @name Openthread message types diff --git a/pkg/openthread/patches/0001-fix-macro-conflict.patch b/pkg/openthread/patches/0001-fix-macro-conflict.patch deleted file mode 100644 index cbddd8bb73..0000000000 --- a/pkg/openthread/patches/0001-fix-macro-conflict.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 0da72cf690b0d0f08fbd7df07b03a9b45e0e50a3 Mon Sep 17 00:00:00 2001 -From: Jose Alamos -Date: Fri, 5 Oct 2018 15:56:03 +0200 -Subject: [PATCH] fix macro conflict - ---- - include/openthread/types.h | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/include/openthread/types.h b/include/openthread/types.h -index f84a7d5e..87afe7eb 100644 ---- a/include/openthread/types.h -+++ b/include/openthread/types.h -@@ -61,8 +61,8 @@ extern "C" { - #define CONTAINING_RECORD(address, type, field) \ - ((type *)((uint8_t*)(address) - offsetof(type, field))) - #pragma GCC diagnostic pop*/ --#define BASE 0x1 --#define myoffsetof(s,m) (((size_t)&(((s*)BASE)->m))-BASE) -+#define _BASE 0x1 -+#define myoffsetof(s,m) (((size_t)&(((s*)_BASE)->m))-_BASE) - #define CONTAINING_RECORD(address, type, field) \ - ((type *)((uint8_t*)(address) - myoffsetof(type, field))) - #endif /* CONTAINING_RECORD */ --- -2.18.0 -