Merge pull request #11540 from OlegHahm/feature/pkg/openthread_update

openthread: update to release 20180926
This commit is contained in:
José Alamos 2019-05-17 14:00:42 +02:00 committed by GitHub
commit d66ac85b8d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 9 additions and 38 deletions

View File

@ -1,6 +1,6 @@
PKG_NAME=openthread PKG_NAME=openthread
PKG_URL=https://github.com/openthread/openthread.git PKG_URL=https://github.com/openthread/openthread.git
PKG_VERSION=thread-reference-20170716 PKG_VERSION=thread-reference-20180926
PKG_BUILDDIR ?= $(PKGDIRBASE)/$(PKG_NAME) PKG_BUILDDIR ?= $(PKGDIRBASE)/$(PKG_NAME)
ifneq (,$(filter openthread-ftd,$(USEMODULE))) ifneq (,$(filter openthread-ftd,$(USEMODULE)))
@ -15,7 +15,7 @@ else
endif endif
ifneq (,$(filter openthread-cli,$(USEMODULE))) ifneq (,$(filter openthread-cli,$(USEMODULE)))
CLI_ARG = --enable-cli-app=$(TD) CLI_ARG = --enable-cli --enable-$(TD)
endif endif
OPENTHREAD_ARGS += $(CLI_ARG) $(JOINER_ARG) --enable-application-coap OPENTHREAD_ARGS += $(CLI_ARG) $(JOINER_ARG) --enable-application-coap

View File

@ -17,7 +17,6 @@
*/ */
#include "openthread/types.h"
#include "openthread/platform/misc.h" #include "openthread/platform/misc.h"
#include "periph/pm.h" #include "periph/pm.h"

View File

@ -28,7 +28,6 @@
#include "net/l2util.h" #include "net/l2util.h"
#include "net/netdev/ieee802154.h" #include "net/netdev/ieee802154.h"
#include "openthread/config.h" #include "openthread/config.h"
#include "openthread/openthread.h"
#include "openthread/platform/diag.h" #include "openthread/platform/diag.h"
#include "openthread/platform/radio.h" #include "openthread/platform/radio.h"
#include "ot.h" #include "ot.h"
@ -211,13 +210,13 @@ void otPlatRadioSetPanId(otInstance *aInstance, uint16_t panid)
} }
/* OpenThread will call this for setting extended address */ /* OpenThread will call this for setting extended address */
void otPlatRadioSetExtendedAddress(otInstance *aInstance, uint8_t *aExtendedAddress) void otPlatRadioSetExtendedAddress(otInstance *aInstance, const otExtAddress *aExtAddress)
{ {
(void)aInstance; (void)aInstance;
DEBUG("openthread: otPlatRadioSetExtendedAddress\n"); DEBUG("openthread: otPlatRadioSetExtendedAddress\n");
char reversed_addr[IEEE802154_LONG_ADDRESS_LEN]; char reversed_addr[IEEE802154_LONG_ADDRESS_LEN];
for (unsigned i = 0; i < IEEE802154_LONG_ADDRESS_LEN; i++) { 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) { if (ENABLE_DEBUG) {
for (unsigned i = 0; i < IEEE802154_LONG_ADDRESS_LEN; ++i) { 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; return OT_ERROR_NONE;
} }
otError otPlatRadioAddSrcMatchExtEntry(otInstance *aInstance, const uint8_t *aExtAddress) otError otPlatRadioAddSrcMatchExtEntry(otInstance *aInstance, const otExtAddress *aExtAddress)
{ {
DEBUG("otPlatRadioAddSrcMatchExtEntry\n"); DEBUG("otPlatRadioAddSrcMatchExtEntry\n");
(void)aInstance; (void)aInstance;
@ -427,7 +426,7 @@ otError otPlatRadioClearSrcMatchShortEntry(otInstance *aInstance, const uint16_t
return OT_ERROR_NONE; return OT_ERROR_NONE;
} }
otError otPlatRadioClearSrcMatchExtEntry(otInstance *aInstance, const uint8_t *aExtAddress) otError otPlatRadioClearSrcMatchExtEntry(otInstance *aInstance, const otExtAddress *aExtAddress)
{ {
DEBUG("otPlatRadioClearSrcMatchExtEntry\n"); DEBUG("otPlatRadioClearSrcMatchExtEntry\n");
(void)aInstance; (void)aInstance;

View File

@ -17,7 +17,8 @@
*/ */
#include "assert.h" #include "assert.h"
#include "openthread/types.h" #include "openthread/error.h"
#include "openthread/instance.h"
#define ENABLE_DEBUG (0) #define ENABLE_DEBUG (0)
#include "debug.h" #include "debug.h"

View File

@ -23,7 +23,6 @@
#include "stdio_uart.h" #include "stdio_uart.h"
#include "periph/uart.h" #include "periph/uart.h"
#include "openthread/types.h"
#include "openthread/platform/uart.h" #include "openthread/platform/uart.h"
#include "ot.h" #include "ot.h"

View File

@ -33,7 +33,7 @@ extern "C" {
#include "net/ethernet.h" #include "net/ethernet.h"
#include "net/netdev.h" #include "net/netdev.h"
#include "thread.h" #include "thread.h"
#include "openthread/types.h" #include "openthread/instance.h"
/** /**
* @name Openthread message types * @name Openthread message types

View File

@ -1,27 +0,0 @@
From 0da72cf690b0d0f08fbd7df07b03a9b45e0e50a3 Mon Sep 17 00:00:00 2001
From: Jose Alamos <jose.alamos@haw-hamburg.de>
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