pkg/openwsn: bump version

This commit is contained in:
Francisco Molina 2020-09-02 11:39:27 +02:00
parent 6ad0e70db2
commit 006cdeb37e
No known key found for this signature in database
GPG Key ID: 3E94EAC3DBDEEDA8
11 changed files with 49 additions and 232 deletions

View File

@ -1,6 +1,6 @@
PKG_NAME=openwsn PKG_NAME=openwsn
PKG_URL=https://github.com/openwsn-berkeley/openwsn-fw.git PKG_URL=https://github.com/openwsn-berkeley/openwsn-fw.git
PKG_VERSION=4e58c93dc76d8c5c5c4b8dfebdd955feaf605e74 PKG_VERSION=028db872c0c60f756e16880a0c86d6282e421c71
PKG_LICENSE=BSD-3-Clause PKG_LICENSE=BSD-3-Clause
include $(RIOTBASE)/pkg/pkg.mk include $(RIOTBASE)/pkg/pkg.mk

View File

@ -1,7 +1,7 @@
From f519ad22f9564aee46e860c50875a0d66adbb193 Mon Sep 17 00:00:00 2001 From c8a38150ba7c8e1c4f04b65b50d8bf6f6d6881ff Mon Sep 17 00:00:00 2001
From: PeterKietzmann <peter.kietzmann@haw-hamburg.de> From: PeterKietzmann <peter.kietzmann@haw-hamburg.de>
Date: Thu, 8 Feb 2018 10:23:00 +0100 Date: Thu, 8 Feb 2018 10:23:00 +0100
Subject: [PATCH 01/10] bsp-kernel: include RIOT-OpenWSN board definitions Subject: [PATCH 1/9] bsp-kernel: include RIOT-OpenWSN board definitions
--- ---
bsp/boards/radio.h | 2 +- bsp/boards/radio.h | 2 +-
@ -36,7 +36,7 @@ index 668496cb..90978f89 100644
//=========================== typedef ========================================= //=========================== typedef =========================================
diff --git a/kernel/openos/scheduler.c b/kernel/openos/scheduler.c diff --git a/kernel/openos/scheduler.c b/kernel/openos/scheduler.c
index 35068796..1dad545e 100644 index 4b63d624..f52f35d4 100644
--- a/kernel/openos/scheduler.c --- a/kernel/openos/scheduler.c
+++ b/kernel/openos/scheduler.c +++ b/kernel/openos/scheduler.c
@@ -6,7 +6,7 @@ @@ -6,7 +6,7 @@
@ -49,5 +49,5 @@ index 35068796..1dad545e 100644
#include "leds.h" #include "leds.h"
-- --
2.27.0 2.28.0

View File

@ -1,7 +1,7 @@
From 4522c2b7cc03b96b23278953292a9b3c9bb0ee60 Mon Sep 17 00:00:00 2001 From 744194e510063e665ffaaf829a20e45494d0ebe8 Mon Sep 17 00:00:00 2001
From: Francisco Molina <femolina@uc.cl> From: Francisco Molina <femolina@uc.cl>
Date: Mon, 10 Feb 2020 15:05:07 +0100 Date: Mon, 10 Feb 2020 15:05:07 +0100
Subject: [PATCH 02/10] drivers/common/openserial: rename include for Subject: [PATCH 2/9] drivers/common/openserial: rename include for
RIOT-OpenWSN uart RIOT-OpenWSN uart
--- ---
@ -9,7 +9,7 @@ Subject: [PATCH 02/10] drivers/common/openserial: rename include for
1 file changed, 1 insertion(+), 1 deletion(-) 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/common/openserial.c b/drivers/common/openserial.c diff --git a/drivers/common/openserial.c b/drivers/common/openserial.c
index 27a30d24..2e417071 100644 index ac3b8f5c..f0dcb19e 100644
--- a/drivers/common/openserial.c --- a/drivers/common/openserial.c
+++ b/drivers/common/openserial.c +++ b/drivers/common/openserial.c
@@ -20,7 +20,7 @@ @@ -20,7 +20,7 @@
@ -22,5 +22,5 @@ index 27a30d24..2e417071 100644
#include "openhdlc.h" #include "openhdlc.h"
#include "schedule.h" #include "schedule.h"
-- --
2.27.0 2.28.0

View File

@ -1,15 +1,14 @@
From 462865cd89f6e970c7dbdd62cb66cee538be8f6c Mon Sep 17 00:00:00 2001 From 0a1426c01092118bc875fdc46d2dae296188b163 Mon Sep 17 00:00:00 2001
From: Francisco Molina <femolina@uc.cl> From: Francisco Molina <femolina@uc.cl>
Date: Fri, 27 Mar 2020 10:15:43 +0100 Date: Fri, 27 Mar 2020 10:15:43 +0100
Subject: [PATCH 03/10] openstack/02b-MAChigh/neighbors.c: expose Subject: [PATCH 3/9] openstack/02b-MAChigh/neighbors.c: expose neighbors_vars
neighbors_vars
--- ---
openstack/02b-MAChigh/neighbors.c | 2 +- openstack/02b-MAChigh/neighbors.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-) 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/openstack/02b-MAChigh/neighbors.c b/openstack/02b-MAChigh/neighbors.c diff --git a/openstack/02b-MAChigh/neighbors.c b/openstack/02b-MAChigh/neighbors.c
index c947ab9e..eff3bb34 100644 index 18bbcdd1..f104aad5 100644
--- a/openstack/02b-MAChigh/neighbors.c --- a/openstack/02b-MAChigh/neighbors.c
+++ b/openstack/02b-MAChigh/neighbors.c +++ b/openstack/02b-MAChigh/neighbors.c
@@ -10,7 +10,7 @@ @@ -10,7 +10,7 @@
@ -22,5 +21,5 @@ index c947ab9e..eff3bb34 100644
//=========================== prototypes ====================================== //=========================== prototypes ======================================
-- --
2.27.0 2.28.0

View File

@ -1,7 +1,7 @@
From 9854468048be9f3119ff76ec4545ba7bfb99f107 Mon Sep 17 00:00:00 2001 From 219e01c2b9fb779e3682a24d361a8a9b672b551a Mon Sep 17 00:00:00 2001
From: Francisco Molina <femolina@uc.cl> From: Francisco Molina <femolina@uc.cl>
Date: Sun, 29 Mar 2020 12:11:53 +0200 Date: Sun, 29 Mar 2020 12:11:53 +0200
Subject: [PATCH 04/10] kernel/openos/scheduler: use thread flags, restore Subject: [PATCH 4/9] kernel/openos/scheduler: use thread flags, restore
irq_state irq_state
Use thread_flags_wait_any to pause the scheduler. Set flag in Use thread_flags_wait_any to pause the scheduler. Set flag in
@ -14,7 +14,7 @@ squash! kernel/openos/scheduler: use thread flags
2 files changed, 13 insertions(+), 2 deletions(-) 2 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/kernel/openos/scheduler.c b/kernel/openos/scheduler.c diff --git a/kernel/openos/scheduler.c b/kernel/openos/scheduler.c
index 1dad545e..28bfe5c2 100644 index f52f35d4..41be092f 100644
--- a/kernel/openos/scheduler.c --- a/kernel/openos/scheduler.c
+++ b/kernel/openos/scheduler.c +++ b/kernel/openos/scheduler.c
@@ -10,6 +10,11 @@ @@ -10,6 +10,11 @@
@ -29,7 +29,7 @@ index 1dad545e..28bfe5c2 100644
//=========================== variables ======================================= //=========================== variables =======================================
scheduler_vars_t scheduler_vars; scheduler_vars_t scheduler_vars;
@@ -31,8 +36,11 @@ void scheduler_init(void) { @@ -36,8 +41,11 @@ void scheduler_init(void) {
SCHEDULER_ENABLE_INTERRUPT(); SCHEDULER_ENABLE_INTERRUPT();
} }
@ -42,7 +42,7 @@ index 1dad545e..28bfe5c2 100644
while (1) { while (1) {
while(scheduler_vars.task_list!=NULL) { while(scheduler_vars.task_list!=NULL) {
// there is still at least one task in the linked-list of tasks // there is still at least one task in the linked-list of tasks
@@ -59,6 +67,7 @@ void scheduler_start(void) { @@ -66,6 +74,7 @@ void scheduler_start(void) {
} }
debugpins_task_clr(); debugpins_task_clr();
board_sleep(); board_sleep();
@ -50,20 +50,20 @@ index 1dad545e..28bfe5c2 100644
debugpins_task_set(); // IAR should halt here if nothing to do debugpins_task_set(); // IAR should halt here if nothing to do
} }
} }
@@ -105,6 +114,8 @@ void scheduler_push_task(task_cbt cb, task_prio_t prio) { @@ -114,6 +123,8 @@ void scheduler_push_task(task_cbt cb, task_prio_t prio) {
} #endif
ENABLE_INTERRUPTS(); ENABLE_INTERRUPTS();
+ thread_t *thread = (thread_t*) thread_get(openwsn_get_pid()); + thread_t *thread = (thread_t*) thread_get(openwsn_get_pid());
+ thread_flags_set(thread, OPENWSN_SCHEDULER_FLAG); + thread_flags_set(thread, OPENWSN_SCHEDULER_FLAG);
} }
//=========================== private =========================================
diff --git a/kernel/scheduler.h b/kernel/scheduler.h diff --git a/kernel/scheduler.h b/kernel/scheduler.h
index bc49817e..f3f64570 100644 index dd035a22..51b6d9cb 100644
--- a/kernel/scheduler.h --- a/kernel/scheduler.h
+++ b/kernel/scheduler.h +++ b/kernel/scheduler.h
@@ -64,7 +64,7 @@ typedef struct { @@ -47,7 +47,7 @@ typedef void (*task_cbt)(void);
//=========================== prototypes ====================================== //=========================== prototypes ======================================
void scheduler_init(void); void scheduler_init(void);
@ -71,7 +71,7 @@ index bc49817e..f3f64570 100644
+void scheduler_start(unsigned state); +void scheduler_start(unsigned state);
void scheduler_push_task(task_cbt task_cb, task_prio_t prio); void scheduler_push_task(task_cbt task_cb, task_prio_t prio);
/** #if SCHEDULER_DEBUG_ENABLE
-- --
2.27.0 2.28.0

View File

@ -1,7 +1,7 @@
From e801ea1e88ea60d848c0ca9c1a2e7dab1a8a7d98 Mon Sep 17 00:00:00 2001 From 611a5841893b6f60b9cfa9389c5a9c99599bc651 Mon Sep 17 00:00:00 2001
From: Francisco Molina <femolina@uc.cl> From: Francisco Molina <femolina@uc.cl>
Date: Thu, 2 Apr 2020 16:04:29 +0200 Date: Thu, 2 Apr 2020 16:04:29 +0200
Subject: [PATCH 05/10] bsp/boards/toolchain_defs.h: comment out conflict ISR Subject: [PATCH 5/9] bsp/boards/toolchain_defs.h: comment out conflict ISR
definitions definitions
The ISR definition conflicts with AVR ISR definitions. The ISR definition conflicts with AVR ISR definitions.
@ -39,5 +39,5 @@ index afcbcbf6..e288e52e 100644
//===== inline //===== inline
-- --
2.27.0 2.28.0

View File

@ -1,7 +1,7 @@
From e8b844e1af690c1734602911c498ac15e0e1f9ed Mon Sep 17 00:00:00 2001 From 085704291c846d225abe8f24d01c1ba4d855b87a Mon Sep 17 00:00:00 2001
From: Francisco Molina <femolina@uc.cl> From: Francisco Molina <femolina@uc.cl>
Date: Fri, 15 May 2020 13:45:02 +0200 Date: Fri, 15 May 2020 13:45:02 +0200
Subject: [PATCH 06/10] openstack/openstack: dont init idmanager Subject: [PATCH 6/9] openstack/openstack: dont init idmanager
Dont initiate idmanager in OpenWSN but in RIOT to allow overriding Dont initiate idmanager in OpenWSN but in RIOT to allow overriding
default short address. default short address.
@ -10,7 +10,7 @@ default short address.
1 file changed, 1 insertion(+), 1 deletion(-) 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/openstack/openstack.c b/openstack/openstack.c diff --git a/openstack/openstack.c b/openstack/openstack.c
index 8c074d30..a7972024 100644 index 172bc317..dce1496a 100644
--- a/openstack/openstack.c --- a/openstack/openstack.c
+++ b/openstack/openstack.c +++ b/openstack/openstack.c
@@ -59,7 +59,7 @@ void openstack_init(void) { @@ -59,7 +59,7 @@ void openstack_init(void) {
@ -23,5 +23,5 @@ index 8c074d30..a7972024 100644
openrandom_init(); openrandom_init();
-- --
2.27.0 2.28.0

View File

@ -1,7 +1,7 @@
From c24730d5265dd487ae0f61612f67753ff89b3246 Mon Sep 17 00:00:00 2001 From ede0403eb8774674e2194d30f573fa31b07b9d8a Mon Sep 17 00:00:00 2001
From: Francisco Molina <femolina@uc.cl> From: Francisco Molina <femolina@uc.cl>
Date: Fri, 27 Mar 2020 10:18:16 +0100 Date: Fri, 27 Mar 2020 10:18:16 +0100
Subject: [PATCH 07/10] openstack/openapps: add debugging Subject: [PATCH 7/9] openstack/openapps: add debugging
Debugging info that can be also be obtained through ifconfig in Debugging info that can be also be obtained through ifconfig in
tests/openwsn. tests/openwsn.
@ -14,7 +14,7 @@ tests/openwsn.
5 files changed, 24 insertions(+), 3 deletions(-) 5 files changed, 24 insertions(+), 3 deletions(-)
diff --git a/kernel/openos/scheduler.c b/kernel/openos/scheduler.c diff --git a/kernel/openos/scheduler.c b/kernel/openos/scheduler.c
index 28bfe5c2..b7c74814 100644 index 41be092f..b9eec910 100644
--- a/kernel/openos/scheduler.c --- a/kernel/openos/scheduler.c
+++ b/kernel/openos/scheduler.c +++ b/kernel/openos/scheduler.c
@@ -13,6 +13,8 @@ @@ -13,6 +13,8 @@
@ -26,7 +26,7 @@ index 28bfe5c2..b7c74814 100644
#define OPENWSN_SCHEDULER_FLAG (1u << 8) #define OPENWSN_SCHEDULER_FLAG (1u << 8)
//=========================== variables ======================================= //=========================== variables =======================================
@@ -87,7 +89,7 @@ void scheduler_push_task(task_cbt cb, task_prio_t prio) { @@ -94,7 +96,7 @@ void scheduler_push_task(task_cbt cb, task_prio_t prio) {
} }
if (taskContainer>&scheduler_vars.taskBuf[TASK_LIST_DEPTH-1]) { if (taskContainer>&scheduler_vars.taskBuf[TASK_LIST_DEPTH-1]) {
// task list has overflown. This should never happpen! // task list has overflown. This should never happpen!
@ -36,7 +36,7 @@ index 28bfe5c2..b7c74814 100644
// blink the error LED // blink the error LED
leds_error_blink(); leds_error_blink();
diff --git a/openapps/cjoin/cjoin.c b/openapps/cjoin/cjoin.c diff --git a/openapps/cjoin/cjoin.c b/openapps/cjoin/cjoin.c
index e155717b..6527c5ee 100644 index 1e040dee..6431cbf7 100644
--- a/openapps/cjoin/cjoin.c --- a/openapps/cjoin/cjoin.c
+++ b/openapps/cjoin/cjoin.c +++ b/openapps/cjoin/cjoin.c
@@ -22,6 +22,8 @@ @@ -22,6 +22,8 @@
@ -86,7 +86,7 @@ index e155717b..6527c5ee 100644
outcome = coap_send( outcome = coap_send(
pkt, pkt,
diff --git a/openstack/02a-MAClow/IEEE802154E.c b/openstack/02a-MAClow/IEEE802154E.c diff --git a/openstack/02a-MAClow/IEEE802154E.c b/openstack/02a-MAClow/IEEE802154E.c
index 70017ab7..09e0851d 100644 index 76e7ee56..83de4296 100644
--- a/openstack/02a-MAClow/IEEE802154E.c --- a/openstack/02a-MAClow/IEEE802154E.c
+++ b/openstack/02a-MAClow/IEEE802154E.c +++ b/openstack/02a-MAClow/IEEE802154E.c
@@ -19,6 +19,8 @@ @@ -19,6 +19,8 @@
@ -115,7 +115,7 @@ index 70017ab7..09e0851d 100644
// log the error // log the error
diff --git a/openstack/02b-MAChigh/neighbors.c b/openstack/02b-MAChigh/neighbors.c diff --git a/openstack/02b-MAChigh/neighbors.c b/openstack/02b-MAChigh/neighbors.c
index eff3bb34..c379538d 100644 index f104aad5..50fc87c0 100644
--- a/openstack/02b-MAChigh/neighbors.c --- a/openstack/02b-MAChigh/neighbors.c
+++ b/openstack/02b-MAChigh/neighbors.c +++ b/openstack/02b-MAChigh/neighbors.c
@@ -8,6 +8,8 @@ @@ -8,6 +8,8 @@
@ -145,7 +145,7 @@ index eff3bb34..c379538d 100644
neighbors_vars.neighbors[neighborIndex].parentPreference = 0; neighbors_vars.neighbors[neighborIndex].parentPreference = 0;
neighbors_vars.neighbors[neighborIndex].stableNeighbor = FALSE; neighbors_vars.neighbors[neighborIndex].stableNeighbor = FALSE;
diff --git a/openstack/03b-IPv6/icmpv6rpl.c b/openstack/03b-IPv6/icmpv6rpl.c diff --git a/openstack/03b-IPv6/icmpv6rpl.c b/openstack/03b-IPv6/icmpv6rpl.c
index 21bc54ac..e7e911ba 100644 index efed533a..3ebf1ec3 100644
--- a/openstack/03b-IPv6/icmpv6rpl.c --- a/openstack/03b-IPv6/icmpv6rpl.c
+++ b/openstack/03b-IPv6/icmpv6rpl.c +++ b/openstack/03b-IPv6/icmpv6rpl.c
@@ -14,6 +14,8 @@ @@ -14,6 +14,8 @@
@ -174,5 +174,5 @@ index 21bc54ac..e7e911ba 100644
if (idmanager_getIsDAGroot() == TRUE) { if (idmanager_getIsDAGroot() == TRUE) {
icmpv6rpl_vars.myDAGrank = MINHOPRANKINCREASE; icmpv6rpl_vars.myDAGrank = MINHOPRANKINCREASE;
-- --
2.27.0 2.28.0

View File

@ -1,15 +1,14 @@
From 555aa9d9b00ecfa8a0c3982de5520d8eb1b23076 Mon Sep 17 00:00:00 2001 From a66e2713eb76a1c8b555760f73ce7418312b58d6 Mon Sep 17 00:00:00 2001
From: Francisco Molina <femolina@uc.cl> From: Francisco Molina <femolina@uc.cl>
Date: Thu, 4 Jun 2020 15:39:07 +0200 Date: Thu, 4 Jun 2020 15:39:07 +0200
Subject: [PATCH 08/10] drivers/common/openserial: add flag to echo badcrc Subject: [PATCH 8/9] drivers/common/openserial: add flag to echo badcrc frames
frames
--- ---
drivers/common/openserial.c | 6 +++++- drivers/common/openserial.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-) 1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/common/openserial.c b/drivers/common/openserial.c diff --git a/drivers/common/openserial.c b/drivers/common/openserial.c
index 2e417071..4f13baf3 100644 index f0dcb19e..2fc2c858 100644
--- a/drivers/common/openserial.c --- a/drivers/common/openserial.c
+++ b/drivers/common/openserial.c +++ b/drivers/common/openserial.c
@@ -733,9 +733,13 @@ port_INLINE void inputHdlcClose(void) { @@ -733,9 +733,13 @@ port_INLINE void inputHdlcClose(void) {
@ -28,5 +27,5 @@ index 2e417071..4f13baf3 100644
} }
-- --
2.27.0 2.28.0

View File

@ -1,14 +1,14 @@
From 6224ae6d65cf505c03d64636afd596e896291497 Mon Sep 17 00:00:00 2001 From cee779033fb652a7e39a1cc03ef4b7a80e6b6f86 Mon Sep 17 00:00:00 2001
From: Francisco Molina <femolina@uc.cl> From: Francisco Molina <femolina@uc.cl>
Date: Fri, 24 Jul 2020 15:42:05 +0200 Date: Fri, 24 Jul 2020 15:42:05 +0200
Subject: [PATCH 09/10] inc/check_config: skip checking board, unused in RIOT Subject: [PATCH 9/9] inc/check_config: skip checking board, unused in RIOT
--- ---
inc/check_config.h | 2 +- inc/check_config.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-) 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/inc/check_config.h b/inc/check_config.h diff --git a/inc/check_config.h b/inc/check_config.h
index 6cbaaf9d..6ab4c78c 100644 index f50b9e7c..68aea646 100644
--- a/inc/check_config.h --- a/inc/check_config.h
+++ b/inc/check_config.h +++ b/inc/check_config.h
@@ -17,7 +17,7 @@ @@ -17,7 +17,7 @@
@ -21,5 +21,5 @@ index 6cbaaf9d..6ab4c78c 100644
#if (defined(OPENMOTE_CC2538) || \ #if (defined(OPENMOTE_CC2538) || \
-- --
2.27.0 2.28.0

View File

@ -1,181 +0,0 @@
From 0e2e1e1b3898a77bc0a3474a4edc79c3c54a85d3 Mon Sep 17 00:00:00 2001
From: Francisco Molina <femolina@uc.cl>
Date: Fri, 24 Jul 2020 16:48:22 +0200
Subject: [PATCH 10/10] openwsn-fw: add ifndef guards for configurable
parameters
---
inc/config.h | 18 ++++++++++++++----
openstack/02a-MAClow/IEEE802154E.h | 8 +++++++-
openstack/02b-MAChigh/neighbors.h | 8 ++++++++
openstack/02b-MAChigh/schedule.h | 12 +++++++++++-
openstack/02b-MAChigh/sixtop.h | 2 ++
5 files changed, 42 insertions(+), 6 deletions(-)
diff --git a/inc/config.h b/inc/config.h
index 974ceb76..4f27b98a 100644
--- a/inc/config.h
+++ b/inc/config.h
@@ -16,8 +16,9 @@
* - level 6: critical, error, success, warning, info, and verbose
*
*/
-
+#ifndef OPENWSN_DEBUG_LEVEL
#define OPENWSN_DEBUG_LEVEL 6
+#endif
// ========================== Applications ==========================
@@ -221,11 +222,16 @@
* - OPENWSN_MAX_NUM_BIGPKTS: defines how many static buffer space will be allocated for processing large packets.
*
*/
-
// #define OPENWSN_6LO_FRAGMENTATION_C
-// #define OPENWSN_MAX_PKTSIZE_SUPPORTED 1320
-// #define OPENWSN_MAX_NUM_BIGPKTS 2
+#ifdef OPENWSN_6LO_FRAGMENTATION_C
+#ifndef OPENWSN_MAX_PKTSIZE_SUPPORTED
+#define OPENWSN_MAX_PKTSIZE_SUPPORTED 1320
+#endif
+#ifndef OPENWSN_MAX_NUM_BIGPKTS
+#define OPENWSN_MAX_NUM_BIGPKTS 2
+#endif
+#endif
/**
* \def OPENWSN_ADAPTIVE_MSF
@@ -279,7 +285,9 @@
* When the channel is set to 0, frequency hopping is enabled, otherwise a single channel is used.
*
*/
+#ifndef IEEE802154E_SINGLE_CHANNEL
#define IEEE802154E_SINGLE_CHANNEL 11
+#endif
/**
* \def PACKETQUEUE_LENGTH
@@ -288,7 +296,9 @@
* increase RAM usage.
*
*/
+#ifndef PACKETQUEUE_LENGTH
#define PACKETQUEUE_LENGTH 20
+#endif
// ======================== Board configuration ========================
diff --git a/openstack/02a-MAClow/IEEE802154E.h b/openstack/02a-MAClow/IEEE802154E.h
index f3274979..472e4b85 100644
--- a/openstack/02a-MAClow/IEEE802154E.h
+++ b/openstack/02a-MAClow/IEEE802154E.h
@@ -42,9 +42,15 @@ static const uint8_t ebIEsBytestream[] = {
#define TXRETRIES 15 // number of MAC retries before declaring failed
#define TX_POWER 31 // 1=-25dBm, 31=0dBm (max value)
#define RESYNCHRONIZATIONGUARD 5 // in 32kHz ticks. min distance to the end of the slot to successfully synchronize
-#define EB_PORTION 10 // set EB on minimal cell for 1/EB_PORTION portion
+#ifndef EB_PORTION
+#define EB_PORTION 10 // set EB on minimal cell for 1/EB_PORTION portion
+#endif
+#ifndef MAXKAPERIOD
#define MAXKAPERIOD 1000 // in slots: 1500@20ms per slot -> ~30 seconds. Max value used by adaptive synchronization.
+#endif
+#ifndef DESYNCTIMEOUT
#define DESYNCTIMEOUT 1750 // in slots: 1750@20ms per slot -> ~35 seconds. A larger DESYNCTIMEOUT is needed if using a larger KATIMEOUT.
+#endif
#define LIMITLARGETIMECORRECTION 5 // threshold number of ticks to declare a timeCorrection "large"
#define LENGTH_IEEE154_MAX 128 // max length of a valid radio packet
#define DUTY_CYCLE_WINDOW_LIMIT (0xFFFFFFFF>>1) // limit of the dutycycle window
diff --git a/openstack/02b-MAChigh/neighbors.h b/openstack/02b-MAChigh/neighbors.h
index 894001e6..3ca55cdc 100644
--- a/openstack/02b-MAChigh/neighbors.h
+++ b/openstack/02b-MAChigh/neighbors.h
@@ -13,10 +13,18 @@
//=========================== define ==========================================
#define MAXPREFERENCE 2
+#ifndef BADNEIGHBORMAXRSSI
#define BADNEIGHBORMAXRSSI -70 //dBm
+#endif
+#ifndef GOODNEIGHBORMINRSSI
#define GOODNEIGHBORMINRSSI -80 //dBm
+#endif
+#ifndef SWITCHSTABILITYTHRESHOLD
#define SWITCHSTABILITYTHRESHOLD 3
+#endif
+#ifndef DEFAULTLINKCOST
#define DEFAULTLINKCOST 4
+#endif
#define MINIMAL_NUM_TX 16
#define MAXDAGRANK 0xffff
diff --git a/openstack/02b-MAChigh/schedule.h b/openstack/02b-MAChigh/schedule.h
index 6ba2657a..ae53a9ce 100644
--- a/openstack/02b-MAChigh/schedule.h
+++ b/openstack/02b-MAChigh/schedule.h
@@ -17,10 +17,15 @@
The superframe reappears over time and can be arbitrarily long.
*/
+
+#ifndef SLOTFRAME_LENGTH
#define SLOTFRAME_LENGTH 101 //should be 101
+#endif
//draft-ietf-6tisch-minimal-06
+#ifndef SCHEDULE_MINIMAL_6TISCH_ACTIVE_CELLS
#define SCHEDULE_MINIMAL_6TISCH_ACTIVE_CELLS 1
+#endif
#define SCHEDULE_MINIMAL_6TISCH_SLOTOFFSET 0
#define SCHEDULE_MINIMAL_6TISCH_CHANNELOFFSET 0
#define SCHEDULE_MINIMAL_6TISCH_DEFAULT_SLOTFRAME_HANDLE 0 //id of slotframe
@@ -37,7 +42,9 @@ The superframe reappears over time and can be arbitrarily long.
for serial port to transmit data to dagroot.
*/
+#ifndef NUMSLOTSOFF
#define NUMSLOTSOFF 20
+#endif
/**
\brief Maximum number of active slots in a superframe.
@@ -49,7 +56,9 @@ in that table; a slot is "active" when it is not of type CELLTYPE_OFF.
Set this number to the exact number of active slots you are planning on having
in your schedule, so not to waste RAM.
*/
+#ifndef MAXACTIVESLOTS
#define MAXACTIVESLOTS SCHEDULE_MINIMAL_6TISCH_ACTIVE_CELLS+NUMSLOTSOFF
+#endif
/**
\brief Maximum number of alternative slots (more than one cells with same slotOffset)
@@ -59,8 +68,9 @@ Note that for each slot entry, it has a table of alternative slots. All
those slots's next pointer is pointing to the same entries.
*/
-
+#ifndef MAXBACKUPSLOTS
#define MAXBACKUPSLOTS 2
+#endif
/**
\brief Minimum backoff exponent.
diff --git a/openstack/02b-MAChigh/sixtop.h b/openstack/02b-MAChigh/sixtop.h
index 6cd98959..7028ca50 100644
--- a/openstack/02b-MAChigh/sixtop.h
+++ b/openstack/02b-MAChigh/sixtop.h
@@ -81,7 +81,9 @@ typedef enum {
// >2^4*3*(101/9)*15=8080 (2^MAXEB * maxretries * (slotframe / numberOfsharedCellsFor6p)*slotlength) (ms))
// on the receiver side of sixtop, it may has mutiple sixtop request in the queue to response (most of them will return with RC BUSY)
// increase the timeout longer than calculated value
+#ifndef SIX2SIX_TIMEOUT_MS
#define SIX2SIX_TIMEOUT_MS 65535
+#endif
typedef uint8_t (*sixtop_sf_getsfid_cbt)(void);
--
2.27.0