author
int64 658
755k
| date
stringlengths 19
19
| timezone
int64 -46,800
43.2k
| hash
stringlengths 40
40
| message
stringlengths 5
490
| mods
list | language
stringclasses 20
values | license
stringclasses 3
values | repo
stringlengths 5
68
| original_message
stringlengths 12
491
|
---|---|---|---|---|---|---|---|---|---|
491,595 |
19.02.2020 13:40:48
| -3,600 |
bd5d06165728917662788e53ff321fdc06461ad7
|
use single channel.
|
[
{
"change_type": "MODIFY",
"old_path": "bsp/boards/openmote-b-24ghz/radio.c",
"new_path": "bsp/boards/openmote-b-24ghz/radio.c",
"diff": "@@ -194,7 +194,7 @@ void radio_setFrequency(uint8_t frequency, radio_freq_t tx_or_rx) {\n/* Changes to FREQCTRL take effect after the next recalibration */\nHWREG(RFCORE_XREG_FREQCTRL) = (CC2538_RF_CHANNEL_MIN\n- + (frequency - CC2538_RF_CHANNEL_MIN) * CC2538_RF_CHANNEL_SPACING);\n+ + (11 - CC2538_RF_CHANNEL_MIN) * CC2538_RF_CHANNEL_SPACING);\n//radio_on();\n"
},
{
"change_type": "MODIFY",
"old_path": "bsp/boards/scum/board_info.h",
"new_path": "bsp/boards/scum/board_info.h",
"diff": "@@ -75,22 +75,14 @@ to return the board's description.\n#define SLOT_FSM_IMPLEMENTATION_SINGLE_COMPARE_TIMER_INTERRUPT\n// #define SLOT_FSM_IMPLEMENTATION_MULTIPLE_TIMER_INTERRUPT\n-// The scum setting frequency for tx and rx are seperated,\n-// the radio interface needs to be changed to adapt this feature\n-// Another reason is the setting frequency takes long since we need write the\n-// frequency variables from FPGA to the PCB board. SCuM needs a seperating\n-// timing for when to send the frame which currently is a common value for all board.\n-// Those are the two reasons to define the marco below to insolated the SCuM related code.\n-// This marco shouldn't be used with the new tapeout which should be ready around July 2019.\n-\n-//#define DAGROOT\n+#define RAM_SIZE_64KB\n//=========================== typedef ========================================\n//=========================== variables =======================================\nstatic const uint8_t rreg_uriquery[] = \"h=ucb\";\n-static const uint8_t infoBoardname[] = \"SCuM\";\n+static const uint8_t infoBoardname[] = \"SCuM3C\";\nstatic const uint8_t infouCName[] = \"CortexM0\";\nstatic const uint8_t infoRadioName[] = \"SCuM\";\n"
},
{
"change_type": "MODIFY",
"old_path": "bsp/boards/scum/cryptoengine.c",
"new_path": "bsp/boards/scum/cryptoengine.c",
"diff": "@@ -31,10 +31,12 @@ owerror_t cryptoengine_aes_ccms_dec(uint8_t* a,\n}\nowerror_t cryptoengine_aes_ecb_enc(uint8_t* buffer, uint8_t* key) {\n+ // To be implemented\nreturn E_FAIL;\n}\nowerror_t cryptoengine_init(void) {\n+ // To be implemented\nreturn E_SUCCESS;\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "bsp/boards/scum/radio.c",
"new_path": "bsp/boards/scum/radio.c",
"diff": "@@ -107,9 +107,8 @@ signed short cdr_tau_history[11] = {0};\n// rx = 24458 tx= 24495\n-\n-uint16_t freq_setting_rx[16] = {24458, 25070, 25265, 25852, 26094, 26286, 26504, 27091, 27306, 27449, 28109, 28252, 28466, 29078, 29291, 29456};\n-uint16_t freq_setting_tx[16] = {24495, 25133, 25749, 25918, 26183, 26377, 26968, 27203, 27840, 28005, 28153, 28364, 28975, 29117, 29376, 29965};\n+uint16_t freq_setting_rx[16] = {24877, 25070, 25265, 25852, 26094, 26286, 26504, 27091, 27306, 27449, 28109, 28252, 28466, 29078, 29291, 29456};\n+uint16_t freq_setting_tx[16] = {24455, 25133, 25749, 25918, 26183, 26377, 26968, 27203, 27840, 28005, 28153, 28364, 28975, 29117, 29376, 29965};\n//=========================== prototypes ======================================\n@@ -228,8 +227,8 @@ void radio_setFrequency(uint8_t frequency, radio_freq_t tx_or_rx) {\n// change state\nradio_vars.state = RADIOSTATE_SETTING_FREQUENCY;\n- radio_vars.current_frequency = frequency;\n- // radio_vars.current_frequency = DEFAULT_FREQ;\n+// radio_vars.current_frequency = frequency;\n+ radio_vars.current_frequency = DEFAULT_FREQ;\nswitch(tx_or_rx){\ncase FREQ_TX:\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/02a-MAClow/IEEE802154E.c",
"new_path": "openstack/02a-MAClow/IEEE802154E.c",
"diff": "@@ -279,31 +279,6 @@ void isr_ieee154e_newSlot(opentimers_id_t id) {\nieee154e_vars.startOfSlotReference = opentimers_getCurrentCompareValue();\n-#ifdef SCUM3C_FPGA_PCB_VERSION\n- // the RFTimer clock is sourced from 500KHz clock which can't be well translated to 32768Hz\n- // so, use the adaptive synchronization to compensate this\n- if (ieee154e_vars.compensatingCounter == 0 && idmanager_getIsDAGroot()==FALSE){\n- opentimers_scheduleAbsolute(\n- ieee154e_vars.timerId, // timerId\n- TsSlotDuration+1, // duration\n- ieee154e_vars.startOfSlotReference, // reference\n- TIME_TICS, // timetype\n- isr_ieee154e_newSlot // callback\n- );\n- ieee154e_vars.compensatingCounter = 2;\n- ieee154e_vars.slotDuration = TsSlotDuration+1;\n- } else {\n- opentimers_scheduleAbsolute(\n- ieee154e_vars.timerId, // timerId\n- TsSlotDuration, // duration\n- ieee154e_vars.startOfSlotReference, // reference\n- TIME_TICS, // timetype\n- isr_ieee154e_newSlot // callback\n- );\n- ieee154e_vars.slotDuration = TsSlotDuration;\n- }\n- ieee154e_vars.compensatingCounter -= 1;\n-#else\nopentimers_scheduleAbsolute(\nieee154e_vars.timerId, // timerId\nTsSlotDuration, // duration\n@@ -312,7 +287,6 @@ void isr_ieee154e_newSlot(opentimers_id_t id) {\nisr_ieee154e_newSlot // callback\n);\nieee154e_vars.slotDuration = TsSlotDuration;\n-#endif\n// radiotimer_setPeriod(ieee154e_vars.slotDuration);\nif (ieee154e_vars.isSync==FALSE) {\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/02a-MAClow/IEEE802154E.h",
"new_path": "openstack/02a-MAClow/IEEE802154E.h",
"diff": "@@ -169,7 +169,7 @@ enum ieee154e_atomicdurations_enum {\nTsTxOffset = (5215/PORT_US_PER_TICK), // 5215us\nTsLongGT = (1311/PORT_US_PER_TICK), // 1311us\nTsTxAckDelay = (5521/PORT_US_PER_TICK), // 5521us\n- TsShortGT = (700/PORT_US_PER_TICK), // 500us\n+ TsShortGT = (700/PORT_US_PER_TICK), // 700us\n#endif\nTsSlotDuration = PORT_TsSlotDuration, // 10000us\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/02b-MAChigh/sixtop.c",
"new_path": "openstack/02b-MAChigh/sixtop.c",
"diff": "@@ -723,7 +723,7 @@ port_INLINE void sixtop_sendEB(void) {\nif (\n(ieee154e_isSynch()==FALSE) ||\n-// (IEEE802154_security_isConfigured()==FALSE) ||\n+ (IEEE802154_security_isConfigured()==FALSE) ||\n(icmpv6rpl_getMyDAGrank()==DEFAULTDAGRANK) ||\nicmpv6rpl_daoSent()==FALSE\n) {\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/openstack.c",
"new_path": "openstack/openstack.c",
"diff": "//-- 04-TRAN\n#include \"openudp.h\"\n+#ifndef RAM_SIZE_64KB\n+\n+//===== applications\n+#include \"openapps.h\"\n+\n+#endif\n+\n//=========================== variables =======================================\n//=========================== prototypes ======================================\n@@ -72,6 +79,11 @@ void openstack_init(void) {\n//-- 04-TRAN\nopenudp_init();\n+#ifndef RAM_SIZE_64KB\n+ //===== applications\n+ openapps_init();\n+#endif\n+\nopenserial_printInfo(\nCOMPONENT_OPENWSN,ERR_BOOTED,\n(errorparameter_t)0,\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-830. use single channel.
|
491,595 |
19.02.2020 14:12:33
| -3,600 |
c1b9f2641ef54480ad44a5ef41b35dd44aef2fa6
|
reverse this changes.
|
[
{
"change_type": "MODIFY",
"old_path": "openstack/02b-MAChigh/schedule.c",
"new_path": "openstack/02b-MAChigh/schedule.c",
"diff": "@@ -845,7 +845,8 @@ bool schedule_getAutonomousTxRxCellUnicastNeighbor(open_addr_t* neighbor){\nif(\nschedule_vars.scheduleBuf[i].type == CELLTYPE_TXRX &&\nschedule_vars.scheduleBuf[i].shared &&\n- schedule_vars.scheduleBuf[i].neighbor.type == ADDR_64B\n+ schedule_vars.scheduleBuf[i].neighbor.type == ADDR_64B &&\n+ packetfunctions_sameAddress(neighbor,&schedule_vars.scheduleBuf[i].neighbor)\n){\nmemcpy(neighbor, &schedule_vars.scheduleBuf[i].neighbor, sizeof(open_addr_t));\nENABLE_INTERRUPTS();\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-830. reverse this changes.
|
491,595 |
19.02.2020 14:15:23
| -3,600 |
3f9d43e1b845ba76860ca6e3f2f8d0e72a949c99
|
reverse the changes for SCuM.
|
[
{
"change_type": "MODIFY",
"old_path": "openstack/02a-MAClow/IEEE802154E.h",
"new_path": "openstack/02a-MAClow/IEEE802154E.h",
"diff": "@@ -41,9 +41,9 @@ static const uint8_t ebIEsBytestream[] = {\n#define TXRETRIES 15 // number of MAC retries before declaring failed\n#define TX_POWER 31 // 1=-25dBm, 31=0dBm (max value)\n#define RESYNCHRONIZATIONGUARD 5 // in 32kHz ticks. min distance to the end of the slot to successfully synchronize\n-#define EB_PORTION 2 // set EB on minimal cell for 1/EB_PORTION portion\n-#define MAXKAPERIOD 428 // in slots: 1500@20ms per slot -> ~30 seconds. Max value used by adaptive synchronization.\n-#define DESYNCTIMEOUT 500 // in slots: 1750@20ms per slot -> ~35 seconds. A larger DESYNCTIMEOUT is needed if using a larger KATIMEOUT.\n+#define EB_PORTION 10 // set EB on minimal cell for 1/EB_PORTION portion\n+#define MAXKAPERIOD 1000 // in slots: 1500@20ms per slot -> ~30 seconds. Max value used by adaptive synchronization.\n+#define DESYNCTIMEOUT 1750 // in slots: 1750@20ms per slot -> ~35 seconds. A larger DESYNCTIMEOUT is needed if using a larger KATIMEOUT.\n#define LIMITLARGETIMECORRECTION 5 // threshold number of ticks to declare a timeCorrection \"large\"\n#define LENGTH_IEEE154_MAX 128 // max length of a valid radio packet\n#define DUTY_CYCLE_WINDOW_LIMIT (0xFFFFFFFF>>1) // limit of the dutycycle window\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/02b-MAChigh/schedule.h",
"new_path": "openstack/02b-MAChigh/schedule.h",
"diff": "The superframe reappears over time and can be arbitrarily long.\n*/\n-#define SLOTFRAME_LENGTH 11 //should be 101\n+#define SLOTFRAME_LENGTH 101 //should be 101\n//draft-ietf-6tisch-minimal-06\n#define SCHEDULE_MINIMAL_6TISCH_ACTIVE_CELLS 1\n@@ -37,7 +37,7 @@ The superframe reappears over time and can be arbitrarily long.\nfor serial port to transmit data to dagroot.\n*/\n-#define NUMSLOTSOFF 5\n+#define NUMSLOTSOFF 20\n/**\n\\brief Maximum number of active slots in a superframe.\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-830. reverse the changes for SCuM.
|
491,595 |
19.02.2020 14:23:26
| -3,600 |
a40c38092312c2d2df504eee5fb072966216c277
|
add README.md about how to run 6TiSCH on SCUM(3C).
|
[
{
"change_type": "ADD",
"old_path": null,
"new_path": "projects/scum/README.md",
"diff": "+Run 6TiSCH on SCuM\n+===============================================================================\n+\n+As the stage of SCuM development (SCuM3C), several adaptation need to be made to run 6TiSCH on SCuM.\n+\n+Changes to make\n+-------------------------------------------------------------------------------\n+\n+1. CoAP/App\n+ no CoAP or any application running, this is because of the limited 64Kb RAM\n+of SCuM3C.\n+\n+ It's applied in the port of SCuM, so no changes required.\n+\n+2. Schedule\n+T o get SCuM synchronize all the time, the slotframe length should be set to 11\n+in schedule.h file, such as:\n+\n+ #define SLOTFRAME_LENGTH 11 //should be 101\n+ #define NUMSLOTSOFF 5\n+\n+3. EB interval\n+ To get tight synchronization, EB sending rate need to be increase by following changes in IEEE802154e.h file:\n+\n+ #define EB_PORTION 2 // set EB on minimal cell for 1/EB_PORTION portion\n+ #define MAXKAPERIOD 428 // in slots: 1500@20ms per slot -> ~30 seconds. Max value used by adaptive synchronization.\n+ #define DESYNCTIMEOUT 500 // in slots: 1750@20ms per slot -> ~35 seconds. A larger DESYNCTIMEOUT is needed if using a larger KATIMEOUT.\n+\n+4. calibrate the channel frequency\n+\n+ The frequency needs to be pre-calibrate before running 6TiSCH on SCuM. You will need to replace the update the frequency settings in radio.c file using a 15-bit integer: e.g. 24900 (coarse 24 mid 10 fine 4). Try to use just one channel and disable channel hopping by change radio_setFrequency function in radio.c file by:\n+\n+ radio_vars.current_frequency = DEFAULT_FREQ;\n+\n+ Do the same thing on OpenMote side as well to communicate with OpenMote\n+\n+\n+Test\n+-------------------------------------------------------------------------------\n+With those changes, you should be able to have one OpenMote acting as dagroot (set through OV), one SCuM acting as a child of dagroot. They are communicating on channel 11 with 6TiSCH protocol. When receiving the DAO from SCuM, you should be able to ping SCuM.\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-830. add README.md about how to run 6TiSCH on SCUM(3C).
|
491,587 |
19.02.2020 17:24:28
| -3,600 |
7d6ea5253bd444decef69d89cbf3f7cffa369efb
|
Formatting code to make it compatible with GCC-4.8
|
[
{
"change_type": "MODIFY",
"old_path": "openstack/03a-IPHC/frag.c",
"new_path": "openstack/03a-IPHC/frag.c",
"diff": "@@ -95,9 +95,11 @@ void frag_init() {\n}\nowerror_t frag_fragment6LoPacket(OpenQueueEntry_t *msg) {\n+ uint32_t i;\nOpenQueueEntry_t *lowpan_fragment;\nuint16_t remaining_bytes;\n- uint8_t fragment_length; uint8_t fragment_offset;\n+ uint8_t fragment_length;\n+ uint8_t fragment_offset;\nint8_t bpos;\n// check if fragmentation is necessary\n@@ -136,7 +138,7 @@ owerror_t frag_fragment6LoPacket(OpenQueueEntry_t *msg) {\nfragment_length = remaining_bytes;\n// find a new spot in the fragmentation buffer\n- for (int i = 0; i < FRAGMENT_BUFFER_SIZE; i++) {\n+ for (i = 0; i < FRAGMENT_BUFFER_SIZE; i++) {\nif (frag_vars.fragmentBuf[i].pFragment == NULL) {\nbpos = i;\nbreak;\n@@ -181,7 +183,7 @@ owerror_t frag_fragment6LoPacket(OpenQueueEntry_t *msg) {\n}\n// send all the fragments with the current datagram tag\n- for (int i = 0; i < FRAGMENT_BUFFER_SIZE; i++) {\n+ for (i = 0; i < FRAGMENT_BUFFER_SIZE; i++) {\nif (frag_vars.fragmentBuf[i].datagram_tag == frag_vars.global_tag) {\n// try to send the fragment. If this fails, abort the transmission of the other fragments.\nif (sixtop_send(frag_vars.fragmentBuf[i].pFragment) == E_FAIL) {\n@@ -204,7 +206,7 @@ owerror_t frag_fragment6LoPacket(OpenQueueEntry_t *msg) {\n// this is a fragment (type frag1) that's being source routed\n// set nexthop in vrb and restore original frag1 header\n- for (uint8_t i = 0; i < NUM_OF_VRBS; i++) {\n+ for (i = 0; i < NUM_OF_VRBS; i++) {\nif (frag_vars.vrbs[i].frag1 == msg) {\nmemcpy(&frag_vars.vrbs[i].nexthop, &msg->l2_nextORpreviousHop, sizeof(open_addr_t));\nprepend_frag1_header(msg, frag_vars.vrbs[i].size, frag_vars.vrbs[i].tag);\n@@ -223,6 +225,7 @@ owerror_t frag_fragment6LoPacket(OpenQueueEntry_t *msg) {\nvoid frag_sendDone(OpenQueueEntry_t *msg, owerror_t sendError) {\n+ uint32_t i, k;\nbool frags_queued;\nbool upward_relay;\nuint16_t datagram_tag;\n@@ -234,7 +237,6 @@ void frag_sendDone(OpenQueueEntry_t *msg, owerror_t sendError) {\nupward_relay = FALSE;\n// delete sent fragment from fragment buffer\n- int i;\nfor (i = 0; i < FRAGMENT_BUFFER_SIZE; i++) {\nif (frag_vars.fragmentBuf[i].pFragment == msg) {\ndatagram_tag = frag_vars.fragmentBuf[i].datagram_tag;\n@@ -251,7 +253,7 @@ void frag_sendDone(OpenQueueEntry_t *msg, owerror_t sendError) {\nif (sendError == E_SUCCESS && upward_relay == FALSE) {\n// check if we have send all other fragments of the original packet\n- for (int i = 0; i < FRAGMENT_BUFFER_SIZE; i++) {\n+ for (i = 0; i < FRAGMENT_BUFFER_SIZE; i++) {\nif (frag_vars.fragmentBuf[i].datagram_tag == datagram_tag) {\nfrags_queued = TRUE;\nbreak;\n@@ -271,7 +273,6 @@ void frag_sendDone(OpenQueueEntry_t *msg, owerror_t sendError) {\n}\n} else if (msg->l3_isFragment && msg->l3_useSourceRouting) {\n- int k;\nfor (k = 0; k < FRAGMENT_BUFFER_SIZE; k++) {\nif (frag_vars.fragmentBuf[k].pFragment == msg) {\ndatagram_tag = frag_vars.fragmentBuf[k].datagram_tag;\n@@ -295,6 +296,7 @@ void frag_sendDone(OpenQueueEntry_t *msg, owerror_t sendError) {\nvoid frag_receive(OpenQueueEntry_t *msg) {\n+ uint32_t i;\nuint8_t dispatch;\nuint8_t offset;\nuint8_t page_length;\n@@ -353,8 +355,6 @@ void frag_receive(OpenQueueEntry_t *msg) {\n} else {\npacketfunctions_tossHeader(msg, FRAGN_HEADER_SIZE);\n-\n- uint8_t i;\nfor (i = 0; i < NUM_OF_VRBS; i++) {\nif (frag_vars.vrbs[i].tag == tag &&\nfrag_vars.vrbs[i].size == size &&\n@@ -411,24 +411,29 @@ void frag_receive(OpenQueueEntry_t *msg) {\nstatic void cleanup_fragments(uint16_t datagram_tag) {\n- for (int i = 0; i < FRAGMENT_BUFFER_SIZE; i++) {\n+ uint32_t i;\n+ for (i = 0; i < FRAGMENT_BUFFER_SIZE; i++) {\nif (frag_vars.fragmentBuf[i].datagram_tag == datagram_tag)\nRESET_FRAG_BUFFER_ENTRY(i);\n}\n}\nstatic void store_fragment(OpenQueueEntry_t *msg, uint16_t size, uint16_t tag, uint8_t offset) {\n+ uint32_t i, j;\nuint8_t dropped_srh_len;\nuint8_t count;\nuint16_t total_wanted_bytes;\nuint16_t received_bytes;\n- bool do_reassemble = FALSE;\n- bool has_timer = FALSE;\n+ bool do_reassemble;\n+ bool has_timer;\n+\n+ do_reassemble = FALSE;\n+ has_timer = FALSE;\n// we detect a duplicate fragment (if datagram_tag and offset are the same)\n// check if we have running reassembly timer\n- for (int i = 0; i < FRAGMENT_BUFFER_SIZE; i++) {\n+ for (i = 0; i < FRAGMENT_BUFFER_SIZE; i++) {\nif (frag_vars.fragmentBuf[i].datagram_tag == tag && frag_vars.fragmentBuf[i].datagram_offset == offset) {\nopenqueue_freePacketBuffer(msg);\nreturn;\n@@ -440,7 +445,6 @@ static void store_fragment(OpenQueueEntry_t *msg, uint16_t size, uint16_t tag, u\n}\n// we find buffer space for a new fragment (new datagram_tag)\n- int i;\nfor (i = 0; i < FRAGMENT_BUFFER_SIZE; i++) {\nif (frag_vars.fragmentBuf[i].pFragment == NULL) {\nfrag_vars.fragmentBuf[i].datagram_tag = tag;\n@@ -484,7 +488,7 @@ static void store_fragment(OpenQueueEntry_t *msg, uint16_t size, uint16_t tag, u\ntotal_wanted_bytes = size;\nreceived_bytes = dropped_srh_len = count = 0;\n- for (int j = 0; j < FRAGMENT_BUFFER_SIZE; j++) {\n+ for (j = 0; j < FRAGMENT_BUFFER_SIZE; j++) {\nif (tag == frag_vars.fragmentBuf[j].datagram_tag) {\nif (frag_vars.fragmentBuf[j].datagram_offset == 0) {\ndropped_srh_len = MAX_FRAGMENT_SIZE - frag_vars.fragmentBuf[j].pFragment->length;\n@@ -523,6 +527,7 @@ static void store_fragment(OpenQueueEntry_t *msg, uint16_t size, uint16_t tag, u\n}\nstatic void reassemble_fragments(uint16_t tag, uint16_t size, OpenQueueEntry_t *reassembled_msg) {\n+ uint32_t i;\nuint8_t *ptr;\nuint8_t offset = 0;\n@@ -535,7 +540,7 @@ static void reassemble_fragments(uint16_t tag, uint16_t size, OpenQueueEntry_t *\nreassembled_msg->is_big_packet = TRUE;\nreassembled_msg->length = size;\n- for (int i = 0; i < FRAGMENT_BUFFER_SIZE; i++) {\n+ for (i = 0; i < FRAGMENT_BUFFER_SIZE; i++) {\nif (frag_vars.fragmentBuf[i].pFragment != NULL && frag_vars.fragmentBuf[i].datagram_tag == tag) {\nif (frag_vars.fragmentBuf[i].datagram_offset == 0 &&\nfrag_vars.fragmentBuf[i].pFragment->length < MAX_FRAGMENT_SIZE) {\n@@ -567,7 +572,7 @@ static void reassemble_fragments(uint16_t tag, uint16_t size, OpenQueueEntry_t *\nstatic owerror_t allocate_vrb(OpenQueueEntry_t *frag1, uint16_t size, uint16_t tag) {\n// find an a vrb spot\n- uint8_t i;\n+ uint32_t i;\nfor (i = 0; i < NUM_OF_VRBS; i++) {\nif (frag_vars.vrbs[i].tag == 0 && frag_vars.vrbs[i].size == 0) {\nfrag_vars.vrbs[i].tag = tag;\n@@ -606,7 +611,8 @@ static owerror_t allocate_vrb(OpenQueueEntry_t *frag1, uint16_t size, uint16_t t\n}\nstatic void fast_forward_frags(uint16_t tag, uint16_t size, uint8_t vrb_pos) {\n- for (int i = 0; i < FRAGMENT_BUFFER_SIZE; i++) {\n+ uint32_t i;\n+ for (i = 0; i < FRAGMENT_BUFFER_SIZE; i++) {\n// check if we have subsequent fragments stored.\nif (frag_vars.fragmentBuf[i].pFragment != NULL &&\nfrag_vars.fragmentBuf[i].datagram_tag == tag &&\n@@ -684,7 +690,7 @@ static void prepend_fragn_header(OpenQueueEntry_t *fragn, uint16_t size, uint16_\n}\nowerror_t frag_timerq_enqueue(opentimers_id_t id) {\n- uint8_t i;\n+ uint32_t i;\nfor (i = 0; i < NUM_OF_CONCURRENT_TIMERS; i++) {\nif (frag_vars.frag_timerq[i] == 0) {\nfrag_vars.frag_timerq[i] = id;\n@@ -706,7 +712,8 @@ opentimers_id_t frag_timerq_dequeue(void) {\n}\nowerror_t frag_timerq_remove(opentimers_id_t id) {\n- for (int i = 0; i < NUM_OF_CONCURRENT_TIMERS - 1; i++) {\n+ uint32_t i;\n+ for (i = 0; i < NUM_OF_CONCURRENT_TIMERS - 1; i++) {\nif (frag_vars.frag_timerq[i] == id) {\nmemcpy(&frag_vars.frag_timerq[i], &frag_vars.frag_timerq[i + 1], NUM_OF_CONCURRENT_TIMERS - 1 - i);\nfrag_vars.frag_timerq[NUM_OF_CONCURRENT_TIMERS - 1] = 0;\n@@ -723,6 +730,7 @@ owerror_t frag_timerq_remove(opentimers_id_t id) {\n}\nvoid frag_timeout_cb(opentimers_id_t id) {\n+ uint32_t j;\nopentimers_id_t expired_timer;\nif ((expired_timer = frag_timerq_dequeue()) == 0) {\n@@ -733,7 +741,7 @@ void frag_timeout_cb(opentimers_id_t id) {\n}\n// find the tag of the expired fragments\n- for (int j = 0; j < FRAGMENT_BUFFER_SIZE; j++) {\n+ for (j = 0; j < FRAGMENT_BUFFER_SIZE; j++) {\nif (frag_vars.fragmentBuf[j].pFragment != NULL && frag_vars.fragmentBuf[j].reassembly_timer == expired_timer) {\nopenserial_printError(COMPONENT_FRAG, ERR_FRAG_REASSEMBLY_OR_VRB_TIMEOUT,\n(errorparameter_t) frag_vars.fragmentBuf[j].datagram_tag,\n@@ -744,7 +752,7 @@ void frag_timeout_cb(opentimers_id_t id) {\n}\n}\n- for (uint8_t j = 0; j < NUM_OF_VRBS; j++) {\n+ for (j = 0; j < NUM_OF_VRBS; j++) {\nif (frag_vars.vrbs[j].tag != 0 && frag_vars.vrbs[j].forward_timer == expired_timer) {\nopenserial_printError(COMPONENT_FRAG, ERR_FRAG_REASSEMBLY_OR_VRB_TIMEOUT,\n(errorparameter_t) frag_vars.vrbs[j].tag,\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/cross-layers/openqueue.c",
"new_path": "openstack/cross-layers/openqueue.c",
"diff": "@@ -105,6 +105,7 @@ OpenQueueEntry_t* openqueue_getFreePacketBuffer(uint8_t creator) {\n}\nOpenQueueEntry_t* openqueue_getFreeBigPacketBuffer(uint8_t creator) {\n+ uint8_t i;\nINTERRUPT_DECLARATION();\nDISABLE_INTERRUPTS();\n@@ -114,7 +115,7 @@ OpenQueueEntry_t* openqueue_getFreeBigPacketBuffer(uint8_t creator) {\nreturn NULL;\n}\n- for (int i = 0; i < BIGQUEUELENGTH; i++) {\n+ for (i = 0; i < BIGQUEUELENGTH; i++) {\nif (openqueue_vars.big_queue[i].standard_entry.owner == COMPONENT_NULL) {\nopenqueue_vars.big_queue[i].standard_entry.creator = creator;\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-863. Formatting code to make it compatible with GCC-4.8
|
491,587 |
19.02.2020 17:25:07
| -3,600 |
8831d05c83b523c81a6aa9fcacff96e981d32213
|
Reformat code openqueue.c
Fix indentation and spacing in the file.
|
[
{
"change_type": "MODIFY",
"old_path": "openstack/cross-layers/openqueue.c",
"new_path": "openstack/cross-layers/openqueue.c",
"diff": "@@ -19,6 +19,7 @@ openqueue_vars_t openqueue_vars;\n//=========================== prototypes ======================================\nvoid openqueue_reset_entry(OpenQueueEntry_t *entry);\n+\nvoid openqueue_reset_big_entry(OpenQueueBigEntry_t *entry);\n//=========================== public ==========================================\n@@ -106,6 +107,7 @@ OpenQueueEntry_t* openqueue_getFreePacketBuffer(uint8_t creator) {\nOpenQueueEntry_t* openqueue_getFreeBigPacketBuffer(uint8_t creator) {\nuint8_t i;\n+\nINTERRUPT_DECLARATION();\nDISABLE_INTERRUPTS();\n@@ -384,6 +386,7 @@ OpenQueueEntry_t* openqueue_macGetDIOPacket(){\nENABLE_INTERRUPTS();\nreturn NULL;\n}\n+\n/**\n\\Brief replace the upstream packet nexthop payload by given newNextHop address\n\\param newNextHop.\n@@ -463,7 +466,9 @@ void openqueue_reset_entry(OpenQueueEntry_t* entry) {\n//admin\nentry->creator = COMPONENT_NULL;\nentry->owner = COMPONENT_NULL;\n- entry->payload = &(entry->packet[IEEE802154_FRAME_SIZE - IEEE802154_SECURITY_TAG_LEN]); // Footer is longer if security is used\n+\n+ // Footer is longer if security is used\n+ entry->payload = &(entry->packet[IEEE802154_FRAME_SIZE - IEEE802154_SECURITY_TAG_LEN]);\nentry->length = 0;\nentry->is_cjoin_response = FALSE;\nentry->is_big_packet = FALSE;\n@@ -492,5 +497,6 @@ void openqueue_reset_entry(OpenQueueEntry_t* entry) {\nvoid openqueue_reset_big_entry(OpenQueueBigEntry_t *entry) {\nopenqueue_reset_entry(&(entry->standard_entry));\n- entry->standard_entry.payload = &(entry->standard_entry.packet[IPV6_PACKET_SIZE]); // make pointer point to the end op the extended buffer\n+ // make pointer point to the end op the extended buffer\n+ entry->standard_entry.payload = &(entry->standard_entry.packet[IPV6_PACKET_SIZE]);\n}\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-863. Reformat code openqueue.c
Fix indentation and spacing in the file.
|
491,587 |
19.02.2020 22:27:28
| -3,600 |
6b4ae6baec63a2a4744af130611f902f2340ac67
|
Bug fix related to "small" big packets
When a module request an OpenQueueBigEntry_t packet, but the total size of the packet did not exceed the fragmentation limit, the packet was never scheduled for transmission by the MAC layer.
|
[
{
"change_type": "MODIFY",
"old_path": "openstack/cross-layers/openqueue.c",
"new_path": "openstack/cross-layers/openqueue.c",
"diff": "@@ -229,6 +229,15 @@ OpenQueueEntry_t* openqueue_sixtopGetSentPacket(void) {\nreturn &openqueue_vars.queue[i];\n}\n}\n+\n+ for (i = 0; i < BIGQUEUELENGTH; i++) {\n+ if (((OpenQueueEntry_t*)&openqueue_vars.big_queue[i])->owner == COMPONENT_IEEE802154E_TO_SIXTOP &&\n+ ((OpenQueueEntry_t*)&openqueue_vars.big_queue[i])->creator != COMPONENT_IEEE802154E) {\n+ ENABLE_INTERRUPTS();\n+ return (OpenQueueEntry_t*)&openqueue_vars.big_queue[i];\n+ }\n+ }\n+\nENABLE_INTERRUPTS();\nreturn NULL;\n}\n@@ -454,6 +463,19 @@ OpenQueueEntry_t* openqueue_macGetUnicastPakcet(open_addr_t* toNeighbor){\nreturn &openqueue_vars.queue[i];\n}\n}\n+\n+ for (i = 0; i < BIGQUEUELENGTH; i++) {\n+ if (\n+ ((OpenQueueEntry_t*)&openqueue_vars.big_queue[i])->owner == COMPONENT_SIXTOP_TO_IEEE802154E &&\n+ (\n+ toNeighbor->type == ADDR_64B &&\n+ packetfunctions_sameAddress(toNeighbor, &((OpenQueueEntry_t*)&openqueue_vars.big_queue[i])->l2_nextORpreviousHop)\n+ )\n+ ) {\n+ ENABLE_INTERRUPTS();\n+ return (OpenQueueEntry_t*)&openqueue_vars.big_queue[i];\n+ }\n+ }\nENABLE_INTERRUPTS();\nreturn NULL;\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/cross-layers/packetfunctions.c",
"new_path": "openstack/cross-layers/packetfunctions.c",
"diff": "@@ -318,12 +318,15 @@ void packetfunctions_tossHeader(OpenQueueEntry_t *pkt, uint16_t header_length) {\nvoid packetfunctions_reserveFooterSize(OpenQueueEntry_t *pkt, uint16_t header_length) {\nuint16_t size;\n- size = pkt->is_big_packet == TRUE ? IPV6_PACKET_SIZE : IEEE802154_FRAME_SIZE;\n+\n+ // this function is only called from the MAC layer,\n+ // there the packets should never be bigger than IEEE802154_FRAME_SIZE\n+ size = IEEE802154_FRAME_SIZE;\npkt->length += header_length;\nif (pkt->length > size) {\n- openserial_printError(COMPONENT_PACKETFUNCTIONS, ERR_HEADER_TOO_LONG,\n+ openserial_printCritical(COMPONENT_PACKETFUNCTIONS, ERR_HEADER_TOO_LONG,\n(errorparameter_t) 2,\n(errorparameter_t) pkt->length);\n}\n@@ -345,10 +348,21 @@ void packetfunctions_tossFooter(OpenQueueEntry_t *pkt, uint16_t header_length) {\n// the frame before transmission (where it can possibly be encrypted).\nvoid packetfunctions_duplicatePacket(OpenQueueEntry_t *dst, OpenQueueEntry_t *src) {\n// make a copy of the frame\n+\n+ if (src->is_big_packet){\n+ memcpy(dst, src, sizeof(OpenQueueEntry_t));\n+\n+ // local copy is never a big packet\n+ dst->is_big_packet = FALSE;\n+ dst->payload -= src->length;\n+ memcpy(dst->payload, src->payload, src->length);\n+\n+ } else {\nmemcpy(dst, src, sizeof(OpenQueueEntry_t));\n// Calculate where payload starts in the buffer\ndst->payload = &dst->packet[src->payload - src->packet]; // update pointers\n+ }\n// update l2_FrameCounter pointer\ndst->l2_FrameCounter = dst->payload + (src->l2_FrameCounter - src->payload);\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-863. Bug fix related to "small" big packets
When a module request an OpenQueueBigEntry_t packet, but the total size of the packet did not exceed the fragmentation limit, the packet was never scheduled for transmission by the MAC layer.
|
491,595 |
21.02.2020 13:43:36
| -3,600 |
60f61937b815c4a43770d73a3801613665bd0152
|
keep listening on sync slot0 after sycnhronized.
|
[
{
"change_type": "MODIFY",
"old_path": "projects/common/01bsp_quick_cal/01bsp_quick_cal.c",
"new_path": "projects/common/01bsp_quick_cal/01bsp_quick_cal.c",
"diff": "@@ -35,25 +35,25 @@ can use this project with any platform.\n// 16 mote eui64\n-#define OTBOX08_MOTE_1 0xb5b3 // COM91\n-#define OTBOX08_MOTE_2 0xb5d0 // COM89\n-#define OTBOX08_MOTE_3 0xb595\n-#define OTBOX08_MOTE_4 0xb5f3\n-\n-#define OTBOX09_MOTE_1 0xb5e7\n-#define OTBOX09_MOTE_2 0xb5d8\n-#define OTBOX09_MOTE_3 0xb55b\n-#define OTBOX09_MOTE_4 0xb558\n-\n-#define OTBOX14_MOTE_1 0xb638\n-#define OTBOX14_MOTE_2 0xb5bf\n-#define OTBOX14_MOTE_3 0xb588\n-#define OTBOX14_MOTE_4 0xb5a3\n-\n-#define OTBOX19_MOTE_1 0xb61a\n-#define OTBOX19_MOTE_2 0xb60b\n-#define OTBOX19_MOTE_3 0xb565\n-#define OTBOX19_MOTE_4 0xb648\n+#define OTBOX08_MOTE_1 0xb5b3 // COM91: b5-b3\n+#define OTBOX08_MOTE_2 0xb5d0 // COM89: b5-d0\n+#define OTBOX08_MOTE_3 0xb595 // 00-12-4b-00-14-b5-b5-95\n+#define OTBOX08_MOTE_4 0xb5f3 // 00-12-4b-00-14-b5-b5-f3\n+\n+#define OTBOX09_MOTE_1 0xb5e7 // 00-12-4b-00-14-b5-b5-e7\n+#define OTBOX09_MOTE_2 0xb5d8 // 00-12-4b-00-14-b5-b5-d8\n+#define OTBOX09_MOTE_3 0xb55b // 00-12-4b-00-14-b5-b5-5b\n+#define OTBOX09_MOTE_4 0xb558 // 00-12-4b-00-14-b5-b5-58\n+\n+#define OTBOX14_MOTE_1 0xb638 // 00-12-4b-00-14-b5-b6-38\n+#define OTBOX14_MOTE_2 0xb5bf // 00-12-4b-00-14-b5-b5-bf\n+#define OTBOX14_MOTE_3 0xb588 // 00-12-4b-00-14-b5-b5-88\n+#define OTBOX14_MOTE_4 0xb5a3 // 00-12-4b-00-14-b5-b5-a3\n+\n+#define OTBOX19_MOTE_1 0xb61a // 00-12-4b-00-14-b5-b6-1a\n+#define OTBOX19_MOTE_2 0xb60b // 00-12-4b-00-14-b5-b6-0b\n+#define OTBOX19_MOTE_3 0xb565 // 00-12-4b-00-14-b5-b5-65\n+#define OTBOX19_MOTE_4 0xb648 // 00-12-4b-00-14-b5-b6-48\n// debugging\n@@ -501,6 +501,37 @@ void cb_endFrame(PORT_TIMER_WIDTH timestamp) {\npkt_seqNum != MAGIC_BYTE\n) {\nsynchronize(app_vars.lastCaptureTime, pkt_channel, pkt_seqNum);\n+\n+ // switch to listen on my channel\n+ radio_rfOn();\n+ radio_setFrequency(app_vars.myChannel);\n+ radio_rxEnable();\n+ radio_rxNow();\n+\n+ app_vars.state = S_LISTENING;\n+\n+ } else {\n+ if (\n+ app_vars.isTimeMaster == FALSE &&\n+ pkt_seqNum == MAGIC_BYTE\n+ ){\n+ // received from SCuM, prepare Ack to send back\n+\n+ // read the freq_offset\n+ freq_offset = radio_getFrequencyOffset();\n+\n+ radio_rfOn();\n+ radio_setFrequency(app_vars.myChannel);\n+\n+ // the ack use freq_offset as second byte\n+ app_vars.packet[1] = (uint8_t)freq_offset;\n+ radio_loadPacket(app_vars.packet, TARGET_PKT_LEN);\n+ radio_txEnable();\n+ radio_txNow();\n+\n+ app_vars.type = T_TX;\n+ app_vars.state = S_ACK_SEND;\n+ }\n}\n} else {\n@@ -542,7 +573,7 @@ void cb_endFrame(PORT_TIMER_WIDTH timestamp) {\n} else {\n- // continous to listen on myChannel\n+ // continuous to listen on myChannel\nradio_rfOn();\nif (app_vars.isSync){\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-862. keep listening on sync slot0 after sycnhronized.
|
491,595 |
21.02.2020 15:18:59
| -3,600 |
861669b92895f36fe5136f9a4d78614b3bb55d46
|
revert the SERIALINHIBITGUARD settings.
|
[
{
"change_type": "MODIFY",
"old_path": "openstack/02a-MAClow/IEEE802154E.h",
"new_path": "openstack/02a-MAClow/IEEE802154E.h",
"diff": "@@ -159,10 +159,10 @@ typedef enum {\nenum ieee154e_atomicdurations_enum {\n// time-slot related\n#if SLOTDURATION==10\n- TsTxOffset = 2120/PORT_US_PER_TICK, // 2120us\n- TsLongGT = 1100/PORT_US_PER_TICK, // 1100us\n- TsTxAckDelay = 1000/PORT_US_PER_TICK, // 1000us\n- TsShortGT = 500/PORT_US_PER_TICK, // 500us, The standardlized value for this is 400/2=200us(7ticks). Currectly 7 doesn't work for short packet, change it back to 7 when found the problem.\n+ TsTxOffset = (2120/PORT_US_PER_TICK), // 2120us\n+ TsLongGT = (1100/PORT_US_PER_TICK), // 1100us\n+ TsTxAckDelay = (1000/PORT_US_PER_TICK), // 1000us\n+ TsShortGT = (500/PORT_US_PER_TICK), // 500us, The standardlized value for this is 400/2=200us(7ticks). Currectly 7 doesn't work for short packet, change it back to 7 when found the problem.\n#endif\n#if SLOTDURATION==20\n@@ -182,9 +182,9 @@ enum ieee154e_atomicdurations_enum {\ndelayTx = PORT_delayTx, // between GO signal and SFD\ndelayRx = PORT_delayRx, // between GO signal and start listening\n// radio watchdog\n- wdRadioTx = 1342/PORT_US_PER_TICK, // 1000us (needs to be >delayTx) (SCuM need a larger value, 45 is tested and works)\n- wdDataDuration = 5000/PORT_US_PER_TICK, // 5000us (measured 4280us with max payload)\n- wdAckDuration = 3000/PORT_US_PER_TICK, // 3000us (measured 1000us)\n+ wdRadioTx = (1342/PORT_US_PER_TICK), // 1000us (needs to be >delayTx) (SCuM need a larger value, 45 is tested and works)\n+ wdDataDuration = (5000/PORT_US_PER_TICK), // 5000us (measured 4280us with max payload)\n+ wdAckDuration = (3000/PORT_US_PER_TICK), // 3000us (measured 1000us)\n};\n//shift of bytes in the linkOption bitmap: draft-ietf-6tisch-minimal-10.txt: page 6\n@@ -215,7 +215,7 @@ enum ieee154e_linkOption_enum {\n#define DURATION_rt7 ieee154e_vars.lastCapturedTime+TsTxAckDelay-delayTx+wdRadioTx\n#define DURATION_rt8 ieee154e_vars.lastCapturedTime+wdAckDuration\n// serialInhibit\n-#define DURATION_si ieee154e_vars.slotDuration-3*SERIALINHIBITGUARD\n+#define DURATION_si ieee154e_vars.slotDuration-SERIALINHIBITGUARD\n//=========================== typedef =========================================\n"
},
{
"change_type": "MODIFY",
"old_path": "projects/scum/README.md",
"new_path": "projects/scum/README.md",
"diff": "@@ -34,6 +34,12 @@ in schedule.h file, such as:\nDo the same thing on OpenMote side as well to communicate with OpenMote\n+5. Xon/Xoff adaptation\n+\n+ SCuM may need more time to support the xon/xoff feature with following changes (in IEEE802154e.h)\n+\n+ #define DURATION_si ieee154e_vars.slotDuration-3*SERIALINHIBITGUARD\n+\nTest\n-------------------------------------------------------------------------------\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-830. revert the SERIALINHIBITGUARD settings.
|
491,595 |
21.02.2020 16:05:10
| -3,600 |
4fc201b6ce82e1038b7491f046bbd33d677111f6
|
use brackets for timing constant.
|
[
{
"change_type": "MODIFY",
"old_path": "openstack/02a-MAClow/IEEE802154E.h",
"new_path": "openstack/02a-MAClow/IEEE802154E.h",
"diff": "@@ -47,7 +47,7 @@ static const uint8_t ebIEsBytestream[] = {\n#define LIMITLARGETIMECORRECTION 5 // threshold number of ticks to declare a timeCorrection \"large\"\n#define LENGTH_IEEE154_MAX 128 // max length of a valid radio packet\n#define DUTY_CYCLE_WINDOW_LIMIT (0xFFFFFFFF>>1) // limit of the dutycycle window\n-#define SERIALINHIBITGUARD 1000/PORT_US_PER_TICK // 32@32kHz ~ 1ms\n+#define SERIALINHIBITGUARD (1000/PORT_US_PER_TICK) // 32@32kHz ~ 1ms\n//15.4e information elements related\n#define IEEE802154E_PAYLOAD_DESC_LEN_SHIFT 0x04\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-830. use brackets for timing constant.
|
491,595 |
21.02.2020 16:47:16
| -3,600 |
b7a58fdf82378eaf18c2c6c952900543c8e2f493
|
add frag file into openwsn project.
|
[
{
"change_type": "MODIFY",
"old_path": "projects/scum/03oos_openwsn/03oos_openwsn.uvprojx",
"new_path": "projects/scum/03oos_openwsn/03oos_openwsn.uvprojx",
"diff": "<FileType>1</FileType>\n<FilePath>..\\..\\..\\openstack\\03a-IPHC\\openbridge.c</FilePath>\n</File>\n+ <File>\n+ <FileName>frag.c</FileName>\n+ <FileType>1</FileType>\n+ <FilePath>..\\..\\..\\openstack\\03a-IPHC\\frag.c</FilePath>\n+ </File>\n</Files>\n</Group>\n<Group>\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-830. add frag file into openwsn project.
|
491,595 |
21.02.2020 17:09:42
| -3,600 |
e4f2c01bedc676f8cc16d0182a06aed68bbe7dd3
|
be compatible with new radio_setFrequency interface.
|
[
{
"change_type": "MODIFY",
"old_path": "bsp/chips/at86rf215/radio.h",
"new_path": "bsp/chips/at86rf215/radio.h",
"diff": "@@ -49,6 +49,11 @@ typedef enum {\nRADIOSTATE_TURNING_OFF = 0x0d, ///< Turning the RF chain off.\n} radio_state_t;\n+typedef enum {\n+ FREQ_TX = 0x01,\n+ FREQ_RX = 0x02,\n+} radio_freq_t;\n+\ntypedef void (*radio_capture_cbt)(PORT_TIMER_WIDTH timestamp);\n//=========================== variables =======================================\n@@ -63,7 +68,7 @@ void radio_setEndFrameCb(radio_capture_cbt cb);\n// reset\nvoid radio_reset(void);\n// RF admin\n-void radio_setFrequency(uint16_t channel);\n+void radio_setFrequency(uint16_t channel, radio_freq_t tx_or_rx);\nvoid radio_rfOn(void);\nvoid radio_rfOff(void);\nvoid radio_change_modulation(registerSetting_t * mod);\n"
},
{
"change_type": "MODIFY",
"old_path": "projects/common/01bsp_radio/01bsp_radio.c",
"new_path": "projects/common/01bsp_radio/01bsp_radio.c",
"diff": "@@ -120,7 +120,8 @@ int mote_main(void) {\n// prepare radio\nradio_rfOn();\n- radio_setFrequency(CHANNEL);\n+ // freq type only effects on scum port\n+ radio_setFrequency(CHANNEL, FREQ_RX);\n// switch in RX by default\nradio_rxEnable();\n"
},
{
"change_type": "MODIFY",
"old_path": "projects/common/01bsp_radio_rx/01bsp_radio_rx.c",
"new_path": "projects/common/01bsp_radio_rx/01bsp_radio_rx.c",
"diff": "@@ -139,7 +139,8 @@ int mote_main(void) {\n// prepare radio\nradio_rfOn();\n- radio_setFrequency(CHANNEL);\n+ // freq type only effects on scum port\n+ radio_setFrequency(CHANNEL, FREQ_RX);\n// switch in RX\nradio_rxEnable();\n"
},
{
"change_type": "MODIFY",
"old_path": "projects/common/01bsp_radio_tx/01bsp_radio_tx.c",
"new_path": "projects/common/01bsp_radio_tx/01bsp_radio_tx.c",
"diff": "@@ -71,7 +71,8 @@ int mote_main(void) {\n// prepare radio\nradio_rfOn();\n- radio_setFrequency(CHANNEL);\n+ // freq type only effects on scum port\n+ radio_setFrequency(CHANNEL, FREQ_TX);\nradio_rfOff();\n// start periodic overflow\n@@ -84,7 +85,8 @@ int mote_main(void) {\nwhile (app_vars.txpk_txNow==0) {\nboard_sleep();\n}\n- radio_setFrequency(CHANNEL);\n+ // freq type only effects on scum port\n+ radio_setFrequency(CHANNEL, FREQ_TX);\n// led\nleds_error_toggle();\n"
},
{
"change_type": "MODIFY",
"old_path": "projects/common/03oos_mercator/03oos_mercator.c",
"new_path": "projects/common/03oos_mercator/03oos_mercator.c",
"diff": "@@ -199,7 +199,8 @@ void serial_rx_REQ_TX(void) {\n// prepare radio\nradio_rfOn();\n- radio_setFrequency(req->frequency);\n+ // freq type only effects on scum port\n+ radio_setFrequency(req->frequency, FREQ_TX);\n// TODO set TX Power\n@@ -254,7 +255,8 @@ void serial_rx_REQ_RX(void) {\n// prepare radio\nradio_rfOn();\n- radio_setFrequency(req->frequency);\n+ // freq type only effects on scum port\n+ radio_setFrequency(req->frequency, FREQ_RX);\n// switch in RX\nradio_rxEnable();\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-830. be compatible with new radio_setFrequency interface.
|
491,587 |
22.02.2020 17:29:30
| -3,600 |
0b329945c3f19e1e025d7b7c08491cc1d7880690
|
Remove obsolete functions and apps from SConscripts
|
[
{
"change_type": "MODIFY",
"old_path": "bsp/boards/python/openwsnmodule_obj.h",
"new_path": "bsp/boards/python/openwsnmodule_obj.h",
"diff": "@@ -235,7 +235,6 @@ struct OpenMote {\ncstorm_vars_t cstorm_vars;\ncwellknown_vars_t cwellknown_vars;\nrrt_vars_t rrt_vars;\n- //tohlone_vars_t tohlone_vars;\ncjoin_vars_t cjoin_vars;\nuecho_vars_t uecho_vars;\nuinject_vars_t uinject_vars;\n"
},
{
"change_type": "MODIFY",
"old_path": "projects/python/SConscript.env",
"new_path": "projects/python/SConscript.env",
"diff": "@@ -83,8 +83,6 @@ buildEnv.Append(\nos.path.join('#','build','python_gcc','openapps','cleds'),\nos.path.join('#','build','python_gcc','openapps','cstorm'),\nos.path.join('#','build','python_gcc','openapps','cwellknown'),\n- #os.path.join('#','build','python_gcc','openapps','techo'),\n- os.path.join('#','build','python_gcc','openapps','tohlone'),\nos.path.join('#','build','python_gcc','openapps','uecho'),\nos.path.join('#','build','python_gcc','openapps','uexpiration'),\nos.path.join('#','build','python_gcc','openapps','uexpiration_monitor'),\n@@ -930,22 +928,6 @@ functionsToChange = [\n'cwellknown_init',\n'cwellknown_receive',\n'cwellknown_sendDone',\n- # techo\n- 'techo_init',\n- 'techo_shouldIlisten',\n- 'techo_receive',\n- 'techo_sendDone',\n- 'techo_connectDone',\n- 'techo_debugPrint',\n- # tohlone\n- 'tohlone_init',\n- 'tohlone_shouldIlisten',\n- 'tohlone_sendpkt',\n- 'tohlone_check4chars',\n- 'tohlone_receive',\n- 'tohlone_sendDone',\n- 'tohlone_connectDone',\n- 'tohlone_debugPrint',\n# uecho\n'uecho_init',\n'uecho_receive',\n@@ -1058,8 +1040,6 @@ headerFiles = [\n'cleds',\n'cstorm',\n'cwellknown',\n- #'techo',\n- 'tohlone',\n'uecho',\n'uinject',\n'userialbridge',\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
Remove obsolete functions and apps from SConscripts
|
491,587 |
06.02.2020 11:44:34
| -3,600 |
3c7e7e3193b73f57b8307732b1c3d677a8b45fd9
|
Remove unused and legacy functions in oos_macpong.c
|
[
{
"change_type": "MODIFY",
"old_path": "projects/common/03oos_macpong/03oos_macpong.c",
"new_path": "projects/common/03oos_macpong/03oos_macpong.c",
"diff": "@@ -190,31 +190,14 @@ bool icmpv6rpl_daoSent(void) {\nreturn TRUE;\n}\nvoid icmpv6rpl_setMyDAGrank(dagrank_t rank) { return; }\n-void icmpv6rpl_killPreferredParent(void) { return; }\nvoid icmpv6rpl_updateMyDAGrankAndParentSelection(void) { return; }\n-void icmpv6rpl_indicateRxDIO(OpenQueueEntry_t* msg) { return; }\nvoid icmpv6echo_setIsReplyEnabled(bool isEnabled) { return; }\n-\n-void opentcp_init(void) { return; }\nvoid openudp_init(void) { return; }\nvoid opencoap_init(void) { return; }\n//===== L7\nvoid openapps_init(void) { return; }\n-void ohlone_init(void) { return; }\n-void tcpecho_init(void) { return; }\n-void tcpinject_init(void) { return; }\n-void tcpinject_trigger(void) { return; }\n-void tcpprint_init(void) { return; }\n-void c6t_init(void) { return; }\n-void cinfo_init(void) { return; }\n-void cleds__init(void) { return; }\n-void cwellknown_init(void) { return; }\n- // TCP\n-void techo_init(void) { return; }\n- // UDP\n-void uecho_init(void) { return; }\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
Remove unused and legacy functions in oos_macpong.c
|
491,595 |
28.02.2020 11:00:20
| -3,600 |
df62328136e481abc97d9e02d4f4b05c24b8c462
|
Update radio_setFrequency interface for bsp_quick_cal project.
|
[
{
"change_type": "MODIFY",
"old_path": "projects/common/01bsp_quick_cal/01bsp_quick_cal.c",
"new_path": "projects/common/01bsp_quick_cal/01bsp_quick_cal.c",
"diff": "@@ -383,6 +383,9 @@ void cb_startFrame(PORT_TIMER_WIDTH timestamp) {\nreturn;\n}\nbreak;\n+ default:\n+ // should never happen\n+ break;\n}\n}\n@@ -413,7 +416,7 @@ void cb_endFrame(PORT_TIMER_WIDTH timestamp) {\n// set radio back to listen on myChannel\nradio_rfOn();\n- radio_setFrequency(app_vars.myChannel);\n+ radio_setFrequency(app_vars.myChannel, FREQ_RX);\nradio_rxEnable();\nradio_rxNow();\n@@ -504,7 +507,7 @@ void cb_endFrame(PORT_TIMER_WIDTH timestamp) {\n// switch to listen on my channel\nradio_rfOn();\n- radio_setFrequency(app_vars.myChannel);\n+ radio_setFrequency(app_vars.myChannel, FREQ_RX);\nradio_rxEnable();\nradio_rxNow();\n@@ -521,7 +524,7 @@ void cb_endFrame(PORT_TIMER_WIDTH timestamp) {\nfreq_offset = radio_getFrequencyOffset();\nradio_rfOn();\n- radio_setFrequency(app_vars.myChannel);\n+ radio_setFrequency(app_vars.myChannel, FREQ_TX);\n// the ack use freq_offset as second byte\napp_vars.packet[1] = (uint8_t)freq_offset;\n@@ -543,7 +546,7 @@ void cb_endFrame(PORT_TIMER_WIDTH timestamp) {\nfreq_offset = radio_getFrequencyOffset();\nradio_rfOn();\n- radio_setFrequency(app_vars.myChannel);\n+ radio_setFrequency(app_vars.myChannel, FREQ_TX);\n// the ack use freq_offset as second byte\napp_vars.packet[1] = (uint8_t)freq_offset;\n@@ -558,7 +561,7 @@ void cb_endFrame(PORT_TIMER_WIDTH timestamp) {\n// not sent by SCuM, keep listening\nradio_rfOn();\n- radio_setFrequency(app_vars.myChannel);\n+ radio_setFrequency(app_vars.myChannel, FREQ_RX);\nradio_rxEnable();\nradio_rxNow();\n@@ -577,9 +580,9 @@ void cb_endFrame(PORT_TIMER_WIDTH timestamp) {\nradio_rfOn();\nif (app_vars.isSync){\n- radio_setFrequency(app_vars.myChannel);\n+ radio_setFrequency(app_vars.myChannel, FREQ_RX);\n} else {\n- radio_setFrequency(SYNC_CHANNEL);\n+ radio_setFrequency(SYNC_CHANNEL, FREQ_RX);\n}\nradio_rxEnable();\nradio_rxNow();\n@@ -623,7 +626,7 @@ void cb_slot_timer(void) {\n// slot to tx\napp_vars.type = T_TX;\n- radio_setFrequency(app_vars.myChannel);\n+ radio_setFrequency(app_vars.myChannel, FREQ_TX);\n// change sctimer callback to sub_slot cb\nsctimer_disable();\n@@ -643,10 +646,10 @@ void cb_slot_timer(void) {\nif (app_vars.currentSlotOffset==0){\n- radio_setFrequency(SYNC_CHANNEL);\n+ radio_setFrequency(SYNC_CHANNEL, FREQ_RX);\n} else {\n- radio_setFrequency(app_vars.myChannel);\n+ radio_setFrequency(app_vars.myChannel, FREQ_RX);\n}\n// start to listen\n@@ -664,7 +667,7 @@ void cb_slot_timer(void) {\nswitch(app_vars.state){\ncase S_IDLE:\n- radio_setFrequency(SYNC_CHANNEL);\n+ radio_setFrequency(SYNC_CHANNEL, FREQ_RX);\n// start to listen\nradio_rxEnable();\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-862. Update radio_setFrequency interface for bsp_quick_cal project.
|
491,603 |
04.03.2020 16:43:21
| -3,600 |
962a42aaa280a7b48edcad6c5e7554670b3b3871
|
160 ms timings
|
[
{
"change_type": "MODIFY",
"old_path": "bsp/boards/openmote-b-subghz/board_info.h",
"new_path": "bsp/boards/openmote-b-subghz/board_info.h",
"diff": "#define PORT_PIN_RADIO_RESET_HIGH() // nothing\n#define PORT_PIN_RADIO_RESET_LOW() // nothing\n-#define SLOTDURATION 20 // in miliseconds\n+#define SLOTDURATION 160 // in miliseconds\n//===== IEEE802154E timing\n#define PORT_delayRx 0 // 0us (can not measure)\n#endif\n+ // experimental: relaxed estimations for fsk1 with fec 25kbps\n+#if SLOTDURATION==160\n+ #define PORT_TsSlotDuration 5300 // 161ms\n+\n+ // execution speed related\n+ #define PORT_maxTxDataPrepare 220\n+ #define PORT_maxRxAckPrepare 250\n+ #define PORT_maxRxDataPrepare 66\n+ #define PORT_maxTxAckPrepare 250\n+ // radio speed related\n+ #define PORT_delayTx 100\n+ #define PORT_delayRx 0\n+#endif\n//===== adaptive_sync accuracy\n#define SYNC_ACCURACY 1 // ticks\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/02a-MAClow/IEEE802154E.h",
"new_path": "openstack/02a-MAClow/IEEE802154E.h",
"diff": "@@ -163,6 +163,9 @@ enum ieee154e_atomicdurations_enum {\nTsLongGT = (1100/PORT_US_PER_TICK), // 1100us\nTsTxAckDelay = (1000/PORT_US_PER_TICK), // 1000us\nTsShortGT = (500/PORT_US_PER_TICK), // 500us, The standardlized value for this is 400/2=200us(7ticks). Currectly 7 doesn't work for short packet, change it back to 7 when found the problem.\n+ wdRadioTx = (1342/PORT_US_PER_TICK), // 1000us (needs to be >delayTx) (SCuM need a larger value, 45 is tested and works)\n+ wdDataDuration = (5000/PORT_US_PER_TICK), // 5000us (measured 4280us with max payload)\n+ wdAckDuration = (3000/PORT_US_PER_TICK), // 3000us (measured 1000us)\n#endif\n#if SLOTDURATION==20\n@@ -170,8 +173,21 @@ enum ieee154e_atomicdurations_enum {\nTsLongGT = (1311/PORT_US_PER_TICK), // 1311us\nTsTxAckDelay = (5521/PORT_US_PER_TICK), // 5521us\nTsShortGT = (700/PORT_US_PER_TICK), // 700us\n+ wdRadioTx = (1342/PORT_US_PER_TICK), // 1000us (needs to be >delayTx) (SCuM need a larger value, 45 is tested and works)\n+ wdDataDuration = (5000/PORT_US_PER_TICK), // 5000us (measured 4280us with max payload)\n+ wdAckDuration = (3000/PORT_US_PER_TICK), // 3000us (measured 1000us)\n#endif\n+#if SLOTDURATION==160\n+ TsTxOffset = 360, // 5215us\n+ TsLongGT = 240, // 1300us\n+ TsTxAckDelay = 362, // 5521us\n+ TsShortGT = 60, // 500us\n+ // radio watchdog\n+ wdRadioTx = 230, // 4500us delayTx+Tx time for 10 bytes( (needs to be >delayTx) (SCuM need a larger value, 45 is tested and works)\n+ wdDataDuration = 2662, // 40320 us (measured with max payload) >> Mina original is 164\n+ wdAckDuration = 600, // 8962us (measured)\n+#endif\nTsSlotDuration = PORT_TsSlotDuration, // 10000us\n// execution speed related\nmaxTxDataPrepare = PORT_maxTxDataPrepare,\n@@ -182,9 +198,7 @@ enum ieee154e_atomicdurations_enum {\ndelayTx = PORT_delayTx, // between GO signal and SFD\ndelayRx = PORT_delayRx, // between GO signal and start listening\n// radio watchdog\n- wdRadioTx = (1342/PORT_US_PER_TICK), // 1000us (needs to be >delayTx) (SCuM need a larger value, 45 is tested and works)\n- wdDataDuration = (5000/PORT_US_PER_TICK), // 5000us (measured 4280us with max payload)\n- wdAckDuration = (3000/PORT_US_PER_TICK), // 3000us (measured 1000us)\n+\n};\n//shift of bytes in the linkOption bitmap: draft-ietf-6tisch-minimal-10.txt: page 6\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
160 ms timings
|
491,603 |
04.03.2020 16:53:16
| -3,600 |
9601ea3d1dff112d3983f01ea054b9a72ce20150
|
ATMEL radio configuration update in accordance to 708 branch + to use 2 byte CRC
|
[
{
"change_type": "MODIFY",
"old_path": "bsp/chips/at86rf215/at86rf215.h",
"new_path": "bsp/chips/at86rf215/at86rf215.h",
"diff": "@@ -3990,36 +3990,38 @@ void at86rf215_readBurst(uint16_t reg, uint8_t* regValueRead, uint16_t size);\n//------------------------------------ FSK --------------------------------//\n+\n+\nstatic const registerSetting_t basic_settings_fsk_option1 []={\n{RG_RF09_CMD, 0x02}, //we make sure we are in the trxoff state\n- {RG_RF09_IRQM, 0x00}, // TRXERR, BATLOW, EDC, TRXRDY, WAKEUP interrupts disabled\n+ {RG_RF09_IRQM, 0x1F}, // TRXERR, BATLOW, EDC, TRXRDY, WAKEUP interrupts enabled\n{RG_RF24_IRQM, 0x00},\n{RG_RF09_RXBWC, 0x00},\n- {RG_RF09_RXDFE, 0x2A}, // RCUT = 1 , SR = 10\n+ {RG_RF09_RXDFE, 0x2A},\n{RG_RF09_AGCC, 0x01},\n{RG_RF09_AGCS, 0x37},\n{RG_RF09_EDD, 0x7A},\n{RG_RF09_TXCUTC, 0xC0},\n{RG_RF09_TXDFE, 0x98},\n- {RG_RF09_PAC, 0x7F},// 0x7F=> bit6-5(0b11): No power amplifier current reduction (max. transmit small signal gain) bit 4-0(0b11111): maxmium tx power\n+ {RG_RF09_PAC, 0x7F},// Tx Power 5 bits >>. 0x64 = txPwr=>0x04, max: 0x1F.\n{RG_BBC0_IRQM, 0x1F},// TXFE, RXEM, RXAM, RXFE, RXFS interrupts enabled\n{RG_BBC1_IRQM, 0x00},\n- {RG_BBC0_PC, 0x15},// No FCS filter, 32 bits FCS, FSK.\n+ {RG_BBC0_PC, 0x1D},// No FCS filter, 32 bits FCS, FSK. >Mina: used to be 15. Set to 1D to use 16 bit FCS\n{RG_BBC0_FSKDM, 0x01},//Direct modulation and preemphasis enabled.\n{RG_BBC0_FSKC0, 0xD6},\n{RG_BBC0_FSKC1, 0x00},\n- {RG_BBC0_FSKC2, 0x41},\n+// {RG_BBC0_FSKC2, 0x00},\n{RG_BBC0_FSKC3, 0x85},\n- {RG_BBC0_FSKC4, 0x0A}, //FEC enable. IEEE MODE\n+ {RG_BBC0_FSKC4, 0x00}, //FEC enabled. IEEE MODE\n{RG_BBC0_FSKPE0, 0x02},\n{RG_BBC0_FSKPE1, 0x03},\n{RG_BBC0_FSKPE2, 0xFC},\n- {RG_BBC0_FSKPHRTX, 0x00}, // if FEC is enable, SFD0 is used, according to JM\n+ {RG_BBC0_FSKPHRTX, 0x08},// No data whitening SFD0 used.\n};\nstatic const registerSetting_t basic_settings_fsk_option2 []={\n{RG_RF09_CMD, 0x02}, //we make sure we are in the trxoff state\n- {RG_RF09_IRQM, 0x00}, // TRXERR, BATLOW, EDC, TRXRDY, WAKEUP interrupts disabled\n+ {RG_RF09_IRQM, 0x1F}, // TRXERR, BATLOW, EDC, TRXRDY, WAKEUP interrupts enabled\n{RG_RF24_IRQM, 0x00},\n{RG_RF09_RXBWC, 0x03},\n{RG_RF09_RXDFE, 0x15},\n@@ -4045,7 +4047,7 @@ static const registerSetting_t basic_settings_fsk_option2 []={\nstatic const registerSetting_t basic_settings_fsk_option3 []={ //DO NOT USE\n{RG_RF09_CMD, 0x02}, //we make sure we are in the trxoff state\n- {RG_RF09_IRQM, 0x00}, // TRXERR, BATLOW, EDC, TRXRDY, WAKEUP interrupts disabled\n+ {RG_RF09_IRQM, 0x1F}, // TRXERR, BATLOW, EDC, TRXRDY, WAKEUP interrupts enabled\n{RG_RF24_IRQM, 0x00},\n{RG_RF09_RXBWC, 0x03}, //IF shift, 200 kHz bandwidth\n{RG_RF09_RXDFE, 0x24}, //find the right values\n@@ -4053,7 +4055,7 @@ static const registerSetting_t basic_settings_fsk_option3 []={ //DO NOT USE\n{RG_RF09_EDD, 0x7A},\n{RG_RF09_TXCUTC, 0x84}, //find the right values\n{RG_RF09_TXDFE, 0x12}, //find the right values\n- {RG_RF09_PAC, 0x64},// Tx Power 5 bits >>. 0x64 = txPwr=>0x04, max: 0x1F.\n+ {RG_RF09_PAC, 0x7F},// Tx Power 5 bits >>. 0x64 = txPwr=>0x04, max: 0x1F.\n{RG_BBC0_IRQM, 0x1F},// TXFE, RXEM, RXAM, RXFE, RXFS interrupts enabled\n{RG_BBC1_IRQM, 0x00},\n{RG_BBC0_PC, 0x15},// No FCS filter, 32 bits FCS, FSK.\n@@ -4078,7 +4080,7 @@ static const registerSetting_t basic_settings_oqpsk_rate1[] = {\n// {RG_BBC0_OQPSKC3, 0x00}, // legacy OQPSK, search for SFD_1 only\n{RG_BBC0_IRQM, 0x13}, // TXFE, RXFE, RXFS interrupts enabled\n{RG_BBC1_IRQM, 0x00},\n- {RG_RF09_IRQM, 0x00}, // TRXERR, BATLOW, EDC, TRXRDY, WAKEUP interrupts disabled\n+ {RG_RF09_IRQM, 0x12}, // TRXERR, TRXRDY interrupts enabled\n{RG_RF24_IRQM, 0x00},\n{RG_RF09_RXBWC, 0x00}, // Rx BW 160kHz, IF 250kHz\n{RG_RF09_RXDFE, 0x2A}, //\n@@ -4087,7 +4089,7 @@ static const registerSetting_t basic_settings_oqpsk_rate1[] = {\n{RG_RF09_AGCS, 0x77},\n{RG_RF09_TXCUTC, 0xC7}, // .PARAMP = 3, .LPFCUT = 7\n{RG_RF09_TXDFE, 0x7A}, // .SR = 0xA, .RCUT = 3\n- {RG_RF09_PAC, 0x64},// Tx Power 5 bits >>. 0x64 = txPwr=>0x04, max: 0x1F.\n+ {RG_RF09_PAC, 0x7F},// Tx Power 5 bits >>. 0x64 = txPwr=>0x04, max: 0x1F.\n};\nstatic const registerSetting_t basic_settings_oqpsk_rate2[] = {\n@@ -4099,7 +4101,7 @@ static const registerSetting_t basic_settings_oqpsk_rate2[] = {\n// {RG_BBC0_OQPSKC3, 0x00}, // legacy OQPSK, search for SFD_1 only\n{RG_BBC0_IRQM, 0x13}, // TXFE, RXFE, RXFS interrupts enabled\n{RG_BBC1_IRQM, 0x00},\n- {RG_RF09_IRQM, 0x00}, // TRXERR, BATLOW, EDC, TRXRDY, WAKEUP interrupts disabled\n+ {RG_RF09_IRQM, 0x12}, // TRXERR, TRXRDY interrupts enabled\n{RG_RF24_IRQM, 0x00},\n{RG_RF09_RXBWC, 0x00}, // Rx BW 160kHz, IF 250kHz\n{RG_RF09_RXDFE, 0x2A}, //\n@@ -4108,11 +4110,11 @@ static const registerSetting_t basic_settings_oqpsk_rate2[] = {\n{RG_RF09_AGCS, 0x77},\n{RG_RF09_TXCUTC, 0xC7}, // .PARAMP = 3, .LPFCUT = 7\n{RG_RF09_TXDFE, 0x7A}, // .SR = 0xA, .RCUT = 3\n- {RG_RF09_PAC, 0x64},// Tx Power 5 bits >>. 0x64 = txPwr=>0x04, max: 0x1F.\n+ {RG_RF09_PAC, 0x7F},// Tx Power 5 bits >>. 0x64 = txPwr=>0x04, max: 0x1F.\n};\nstatic const registerSetting_t basic_settings_oqpsk_rate3[] = {\n- {RG_BBC0_PC, 0x17},\n+ {RG_BBC0_PC, 0x1F}, // Mina: used to be 17 but change to 1F make 2B FCS\n{RG_BBC0_OQPSKPHRTX, 0x04}, // MR-OQPSK, rate mode 0\n{RG_BBC0_OQPSKC0, 0x10}, // 100kchips/s, RC-0.8 shaping, direct-modulation enabled\n// {RG_BBC0_OQPSKC1, 0x3F}, // MINIMUM preamble-detection sensitivities, rx-override disabled\n@@ -4120,7 +4122,7 @@ static const registerSetting_t basic_settings_oqpsk_rate3[] = {\n// {RG_BBC0_OQPSKC3, 0x00}, // legacy OQPSK, search for SFD_1 only\n{RG_BBC0_IRQM, 0x13}, // TXFE, RXFE, RXFS interrupts enabled\n{RG_BBC1_IRQM, 0x00},\n- {RG_RF09_IRQM, 0x00}, // TRXERR, BATLOW, EDC, TRXRDY, WAKEUP interrupts disabled\n+ {RG_RF09_IRQM, 0x12}, // TRXERR, TRXRDY interrupts enabled\n{RG_RF24_IRQM, 0x00},\n{RG_RF09_RXBWC, 0x00}, // Rx BW 160kHz, IF 250kHz\n{RG_RF09_RXDFE, 0x2A}, //\n@@ -4129,7 +4131,7 @@ static const registerSetting_t basic_settings_oqpsk_rate3[] = {\n{RG_RF09_AGCS, 0x77},\n{RG_RF09_TXCUTC, 0xC7}, // .PARAMP = 3, .LPFCUT = 7\n{RG_RF09_TXDFE, 0x7A}, // .SR = 0xA, .RCUT = 3\n- {RG_RF09_PAC, 0x64},// Tx Power 5 bits >>. 0x64 = txPwr=>0x04, max: 0x1F.\n+ {RG_RF09_PAC, 0x7F},// Tx Power 5 bits >>. 0x64 = txPwr=>0x04, max: 0x1F.\n};\nstatic const registerSetting_t basic_settings_oqpsk_rate4[] = {\n@@ -4141,7 +4143,7 @@ static const registerSetting_t basic_settings_oqpsk_rate4[] = {\n// {RG_BBC0_OQPSKC3, 0x00}, // legacy OQPSK, search for SFD_1 only\n{RG_BBC0_IRQM, 0x13}, // TXFE, RXFE, RXFS interrupts enabled\n{RG_BBC1_IRQM, 0x00},\n- {RG_RF09_IRQM, 0x00}, // TRXERR, BATLOW, EDC, TRXRDY, WAKEUP interrupts disabled\n+ {RG_RF09_IRQM, 0x12}, // TRXERR, TRXRDY interrupts enabled\n{RG_RF24_IRQM, 0x00},\n{RG_RF09_RXBWC, 0x00}, // Rx BW 160kHz, IF 250kHz\n{RG_RF09_RXDFE, 0x2A}, //\n@@ -4150,7 +4152,7 @@ static const registerSetting_t basic_settings_oqpsk_rate4[] = {\n{RG_RF09_AGCS, 0x77},\n{RG_RF09_TXCUTC, 0xC7}, // .PARAMP = 3, .LPFCUT = 7\n{RG_RF09_TXDFE, 0x7A}, // .SR = 0xA, .RCUT = 3\n- {RG_RF09_PAC, 0x64},// Tx Power 5 bits >>. 0x64 = txPwr=>0x04, max: 0x1F.\n+ {RG_RF09_PAC, 0x7F},// Tx Power 5 bits >>. 0x64 = txPwr=>0x04, max: 0x1F.\n};\nstatic const registerSetting_t basic_settings_oqpsk_250kbps[] = {\n@@ -4178,25 +4180,25 @@ static const registerSetting_t basic_settings_oqpsk_250kbps[] = {\nstatic const registerSetting_t basic_settings_ofdm_1_mcs0[] = {\n{RG_RF09_CMD, 0x02},\n- {RG_RF09_IRQM, 0x00},\n+ {RG_RF09_IRQM, 0x1F},\n{RG_RF24_IRQM, 0x00},\n- {RG_RF09_RXBWC, 0x00},\n+ {RG_RF09_RXBWC, 0x19},\n{RG_RF09_RXDFE, 0x83},\n{RG_RF09_AGCC, 0x11},\n{RG_RF09_EDD, 0x7A},\n{RG_RF09_TXCUTC, 0x0A},//recommended value (0x0B)\n{RG_RF09_TXDFE, 0x83},\n- {RG_RF09_PAC, 0x64},// Tx Power 5 bits >>. 0x64 = txPwr=>0x04, max: 0x1F. // 0x64 - 0dBm mettre 0x7F\n+ {RG_RF09_PAC, 0x7F},// Tx Power 5 bits >>. 0x64 = txPwr=>0x04, max: 0x1F. // 0x64 - 0dBm mettre 0x7F\n{RG_BBC0_IRQM, 0x1F},\n{RG_BBC1_IRQM, 0x00},\n- {RG_BBC0_PC, 0x16},//NO FCS FILTER\n+ {RG_BBC0_PC, 0x1E},//NO FCS FILTER, used to be 0x16, now 0x1E to allow 2byte FCS\n{RG_BBC0_OFDMC, 0x00},\n{RG_BBC0_OFDMPHRTX, 0x00},\n};\nstatic const registerSetting_t basic_settings_ofdm_1_mcs1[] = {\n{RG_RF09_CMD, 0x02},\n- {RG_RF09_IRQM, 0x00},\n+ {RG_RF09_IRQM, 0x1F},\n{RG_RF24_IRQM, 0x00},\n{RG_RF09_RXBWC, 0x19},\n{RG_RF09_RXDFE, 0x83},\n@@ -4204,17 +4206,17 @@ static const registerSetting_t basic_settings_ofdm_1_mcs1[] = {\n{RG_RF09_EDD, 0x7A},\n{RG_RF09_TXCUTC, 0x0A},//recommended value (0x0B)\n{RG_RF09_TXDFE, 0x83},\n- {RG_RF09_PAC, 0x64},// Tx Power 5 bits >>. 0x64 = txPwr=>0x04, max: 0x1F. // 0x64 - 0dBm mettre 0x7F\n+ {RG_RF09_PAC, 0x7F},// Tx Power 5 bits >>. 0x64 = txPwr=>0x04, max: 0x1F. // 0x64 - 0dBm mettre 0x7F\n{RG_BBC0_IRQM, 0x1F},\n{RG_BBC1_IRQM, 0x00},\n- {RG_BBC0_PC, 0x16},//NO FCS FILTER\n+ {RG_BBC0_PC, 0x1E},//NO FCS FILTER, used to be 0x16, now 0x1E to allow 2byte FCS\n{RG_BBC0_OFDMC, 0x00},\n{RG_BBC0_OFDMPHRTX, 0x01},\n};\nstatic const registerSetting_t basic_settings_ofdm_1_mcs2[] = {\n{RG_RF09_CMD, 0x02},\n- {RG_RF09_IRQM, 0x00},\n+ {RG_RF09_IRQM, 0x1F},\n{RG_RF24_IRQM, 0x00},\n{RG_RF09_RXBWC, 0x19},\n{RG_RF09_RXDFE, 0x83},\n@@ -4222,17 +4224,17 @@ static const registerSetting_t basic_settings_ofdm_1_mcs2[] = {\n{RG_RF09_EDD, 0x7A},\n{RG_RF09_TXCUTC, 0x0A},//recommended value (0x0B)\n{RG_RF09_TXDFE, 0x83},\n- {RG_RF09_PAC, 0x64},// Tx Power 5 bits >>. 0x64 = txPwr=>0x04, max: 0x1F. // 0x64 - 0dBm mettre 0x7F\n+ {RG_RF09_PAC, 0x7F},// Tx Power 5 bits >>. 0x64 = txPwr=>0x04, max: 0x1F. // 0x64 - 0dBm mettre 0x7F\n{RG_BBC0_IRQM, 0x1F},\n{RG_BBC1_IRQM, 0x00},\n- {RG_BBC0_PC, 0x16},//NO FCS FILTER\n+ {RG_BBC0_PC, 0x1E},//NO FCS FILTER, used to be 0x16, now 0x1E to allow 2byte FCS\n{RG_BBC0_OFDMC, 0x00},\n{RG_BBC0_OFDMPHRTX, 0x02},\n};\nstatic const registerSetting_t basic_settings_ofdm_1_mcs3[] = { //TODO\n{RG_RF09_CMD, 0x02},\n- {RG_RF09_IRQM, 0x00},\n+ {RG_RF09_IRQM, 0x1F},\n{RG_RF24_IRQM, 0x00},\n{RG_RF09_RXBWC, 0x19},\n{RG_RF09_RXDFE, 0x83},\n@@ -4240,17 +4242,17 @@ static const registerSetting_t basic_settings_ofdm_1_mcs3[] = { //TODO\n{RG_RF09_EDD, 0x7A},\n{RG_RF09_TXCUTC, 0x0A},//recommended value (0x0B)\n{RG_RF09_TXDFE, 0x83},\n- {RG_RF09_PAC, 0x64},// Tx Power 5 bits >>. 0x64 = txPwr=>0x04, max: 0x1F. // 0x64 - 0dBm mettre 0x7F\n+ {RG_RF09_PAC, 0x7F},// Tx Power 5 bits >>. 0x64 = txPwr=>0x04, max: 0x1F. // 0x64 - 0dBm mettre 0x7F\n{RG_BBC0_IRQM, 0x1F},\n{RG_BBC1_IRQM, 0x00},\n- {RG_BBC0_PC, 0x16},//NO FCS FILTER\n+ {RG_BBC0_PC, 0x1E},//NO FCS FILTER, used to be 0x16, now 0x1E to allow 2byte FCS\n{RG_BBC0_OFDMC, 0x00},\n{RG_BBC0_OFDMPHRTX, 0x03},\n};\nstatic const registerSetting_t basic_settings_ofdm_2_mcs0[] = {\n{RG_RF09_CMD, 0x02},\n- {RG_RF09_IRQM, 0x00},\n+ {RG_RF09_IRQM, 0x1F},\n{RG_RF24_IRQM, 0x00},\n{RG_RF09_RXBWC, 0x17},\n{RG_RF09_RXDFE, 0x43},\n@@ -4268,7 +4270,7 @@ static const registerSetting_t basic_settings_ofdm_2_mcs0[] = {\nstatic const registerSetting_t basic_settings_ofdm_2_mcs1[] = {\n{RG_RF09_CMD, 0x02},\n- {RG_RF09_IRQM, 0x00},\n+ {RG_RF09_IRQM, 0x1F},\n{RG_RF24_IRQM, 0x00},\n{RG_RF09_RXBWC, 0x17},\n{RG_RF09_RXDFE, 0x43},\n@@ -4286,7 +4288,7 @@ static const registerSetting_t basic_settings_ofdm_2_mcs1[] = {\nstatic const registerSetting_t basic_settings_ofdm_2_mcs2[] = {\n{RG_RF09_CMD, 0x02},\n- {RG_RF09_IRQM, 0x00},\n+ {RG_RF09_IRQM, 0x1F},\n{RG_RF24_IRQM, 0x00},\n{RG_RF09_RXBWC, 0x17},\n{RG_RF09_RXDFE, 0x43},\n@@ -4304,7 +4306,7 @@ static const registerSetting_t basic_settings_ofdm_2_mcs2[] = {\nstatic const registerSetting_t basic_settings_ofdm_2_mcs3[] = {\n{RG_RF09_CMD, 0x02},\n- {RG_RF09_IRQM, 0x00},\n+ {RG_RF09_IRQM, 0x1F},\n{RG_RF24_IRQM, 0x00},\n{RG_RF09_RXBWC, 0x17},\n{RG_RF09_RXDFE, 0x43},\n@@ -4322,7 +4324,7 @@ static const registerSetting_t basic_settings_ofdm_2_mcs3[] = {\nstatic const registerSetting_t basic_settings_ofdm_2_mcs4[] = {\n{RG_RF09_CMD, 0x02},\n- {RG_RF09_IRQM, 0x00},\n+ {RG_RF09_IRQM, 0x1F},\n{RG_RF24_IRQM, 0x00},\n{RG_RF09_RXBWC, 0x17},\n{RG_RF09_RXDFE, 0x43},\n@@ -4340,7 +4342,7 @@ static const registerSetting_t basic_settings_ofdm_2_mcs4[] = {\nstatic const registerSetting_t basic_settings_ofdm_2_mcs5[] = {\n{RG_RF09_CMD, 0x02},\n- {RG_RF09_IRQM, 0x00},\n+ {RG_RF09_IRQM, 0x1F},\n{RG_RF24_IRQM, 0x00},\n{RG_RF09_RXBWC, 0x17},\n{RG_RF09_RXDFE, 0x43},\n@@ -4358,7 +4360,7 @@ static const registerSetting_t basic_settings_ofdm_2_mcs5[] = {\nstatic const registerSetting_t basic_settings_ofdm_3_mcs1[] = { //TODO\n{RG_RF09_CMD, 0x02},\n- {RG_RF09_IRQM, 0x00},\n+ {RG_RF09_IRQM, 0x1F},\n{RG_RF24_IRQM, 0x00},\n{RG_RF09_RXBWC, 0x04},\n{RG_RF09_RXDFE, 0x46},\n@@ -4376,7 +4378,7 @@ static const registerSetting_t basic_settings_ofdm_3_mcs1[] = { //TODO\nstatic const registerSetting_t basic_settings_ofdm_3_mcs2[] = { //TODO\n{RG_RF09_CMD, 0x02},\n- {RG_RF09_IRQM, 0x00},\n+ {RG_RF09_IRQM, 0x1F},\n{RG_RF24_IRQM, 0x00},\n{RG_RF09_RXBWC, 0x04},\n{RG_RF09_RXDFE, 0x46},\n@@ -4394,7 +4396,7 @@ static const registerSetting_t basic_settings_ofdm_3_mcs2[] = { //TODO\nstatic const registerSetting_t basic_settings_ofdm_3_mcs3[] = { //TODO\n{RG_RF09_CMD, 0x02},\n- {RG_RF09_IRQM, 0x00},\n+ {RG_RF09_IRQM, 0x1F},\n{RG_RF24_IRQM, 0x00},\n{RG_RF09_RXBWC, 0x04},\n{RG_RF09_RXDFE, 0x46},\n@@ -4412,7 +4414,7 @@ static const registerSetting_t basic_settings_ofdm_3_mcs3[] = { //TODO\nstatic const registerSetting_t basic_settings_ofdm_3_mcs4[] = { //TODO\n{RG_RF09_CMD, 0x02},\n- {RG_RF09_IRQM, 0x00},\n+ {RG_RF09_IRQM, 0x1F},\n{RG_RF24_IRQM, 0x00},\n{RG_RF09_RXBWC, 0x04},\n{RG_RF09_RXDFE, 0x46},\n@@ -4430,7 +4432,7 @@ static const registerSetting_t basic_settings_ofdm_3_mcs4[] = { //TODO\nstatic const registerSetting_t basic_settings_ofdm_3_mcs5[] = { //TODO\n{RG_RF09_CMD, 0x02},\n- {RG_RF09_IRQM, 0x00},\n+ {RG_RF09_IRQM, 0x1F},\n{RG_RF24_IRQM, 0x00},\n{RG_RF09_RXBWC, 0x04},\n{RG_RF09_RXDFE, 0x46},\n@@ -4448,7 +4450,7 @@ static const registerSetting_t basic_settings_ofdm_3_mcs5[] = { //TODO\nstatic const registerSetting_t basic_settings_ofdm_3_mcs6[] = { //TODO\n{RG_RF09_CMD, 0x02},\n- {RG_RF09_IRQM, 0x00},\n+ {RG_RF09_IRQM, 0x1F},\n{RG_RF24_IRQM, 0x00},\n{RG_RF09_RXBWC, 0x04},\n{RG_RF09_RXDFE, 0x46},\n@@ -4466,7 +4468,7 @@ static const registerSetting_t basic_settings_ofdm_3_mcs6[] = { //TODO\nstatic const registerSetting_t basic_settings_ofdm_4_mcs2[] = { //TODO\n{RG_RF09_CMD, 0x02},\n- {RG_RF09_IRQM, 0x00},\n+ {RG_RF09_IRQM, 0x1F},\n{RG_RF24_IRQM, 0x00},\n{RG_RF09_RXBWC, 0x12},\n{RG_RF09_RXDFE, 0x26},\n@@ -4484,7 +4486,7 @@ static const registerSetting_t basic_settings_ofdm_4_mcs2[] = { //TODO\nstatic const registerSetting_t basic_settings_ofdm_4_mcs3[] = { //TODO\n{RG_RF09_CMD, 0x02},\n- {RG_RF09_IRQM, 0x00},\n+ {RG_RF09_IRQM, 0x1F},\n{RG_RF24_IRQM, 0x00},\n{RG_RF09_RXBWC, 0x12},\n{RG_RF09_RXDFE, 0x26},\n@@ -4502,7 +4504,7 @@ static const registerSetting_t basic_settings_ofdm_4_mcs3[] = { //TODO\nstatic const registerSetting_t basic_settings_ofdm_4_mcs4[] = { //TODO\n{RG_RF09_CMD, 0x02},\n- {RG_RF09_IRQM, 0x00},\n+ {RG_RF09_IRQM, 0x1F},\n{RG_RF24_IRQM, 0x00},\n{RG_RF09_RXBWC, 0x12},\n{RG_RF09_RXDFE, 0x26},\n@@ -4520,7 +4522,7 @@ static const registerSetting_t basic_settings_ofdm_4_mcs4[] = { //TODO\nstatic const registerSetting_t basic_settings_ofdm_4_mcs5[] = { //TODO\n{RG_RF09_CMD, 0x02},\n- {RG_RF09_IRQM, 0x00},\n+ {RG_RF09_IRQM, 0x1F},\n{RG_RF24_IRQM, 0x00},\n{RG_RF09_RXBWC, 0x12},\n{RG_RF09_RXDFE, 0x26},\n@@ -4538,7 +4540,7 @@ static const registerSetting_t basic_settings_ofdm_4_mcs5[] = { //TODO\nstatic const registerSetting_t basic_settings_ofdm_4_mcs6[] = { //TODO\n{RG_RF09_CMD, 0x02},\n- {RG_RF09_IRQM, 0x00},\n+ {RG_RF09_IRQM, 0x1F},\n{RG_RF24_IRQM, 0x00},\n{RG_RF09_RXBWC, 0x12},\n{RG_RF09_RXDFE, 0x26},\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
ATMEL radio configuration update in accordance to 708 branch + to use 2 byte CRC
|
491,603 |
05.03.2020 13:23:42
| -3,600 |
e71de6b3bece4642581c64b1a65f4cd1f7b6faac
|
fixing configurations for experiments
|
[
{
"change_type": "MODIFY",
"old_path": "bsp/chips/at86rf215/radio.h",
"new_path": "bsp/chips/at86rf215/radio.h",
"diff": "//=========================== define ==========================================\n-#define LENGTH_CRC 4\n+#define LENGTH_CRC 2\n//=========================== typedef =========================================\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/02a-MAClow/IEEE802154E.h",
"new_path": "openstack/02a-MAClow/IEEE802154E.h",
"diff": "@@ -41,7 +41,7 @@ static const uint8_t ebIEsBytestream[] = {\n#define TXRETRIES 15 // number of MAC retries before declaring failed\n#define TX_POWER 31 // 1=-25dBm, 31=0dBm (max value)\n#define RESYNCHRONIZATIONGUARD 5 // in 32kHz ticks. min distance to the end of the slot to successfully synchronize\n-#define EB_PORTION 10 // set EB on minimal cell for 1/EB_PORTION portion\n+#define EB_PORTION 4 // set EB on minimal cell for 1/EB_PORTION portion\n#define MAXKAPERIOD 1000 // in slots: 1500@20ms per slot -> ~30 seconds. Max value used by adaptive synchronization.\n#define DESYNCTIMEOUT 1750 // in slots: 1750@20ms per slot -> ~35 seconds. A larger DESYNCTIMEOUT is needed if using a larger KATIMEOUT.\n#define LIMITLARGETIMECORRECTION 5 // threshold number of ticks to declare a timeCorrection \"large\"\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/02b-MAChigh/schedule.h",
"new_path": "openstack/02b-MAChigh/schedule.h",
"diff": "The superframe reappears over time and can be arbitrarily long.\n*/\n-#define SLOTFRAME_LENGTH 101 //should be 101\n+#define SLOTFRAME_LENGTH 11 //should be 101\n//draft-ietf-6tisch-minimal-06\n#define SCHEDULE_MINIMAL_6TISCH_ACTIVE_CELLS 1\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
fixing configurations for experiments
|
491,603 |
06.03.2020 14:14:55
| -3,600 |
09c6e8a30ae80abfef04f4a3b98968e2cd64c8b9
|
reverting slot and eb configurations to original configs
|
[
{
"change_type": "MODIFY",
"old_path": "openstack/02a-MAClow/IEEE802154E.h",
"new_path": "openstack/02a-MAClow/IEEE802154E.h",
"diff": "@@ -41,7 +41,7 @@ static const uint8_t ebIEsBytestream[] = {\n#define TXRETRIES 15 // number of MAC retries before declaring failed\n#define TX_POWER 31 // 1=-25dBm, 31=0dBm (max value)\n#define RESYNCHRONIZATIONGUARD 5 // in 32kHz ticks. min distance to the end of the slot to successfully synchronize\n-#define EB_PORTION 4 // set EB on minimal cell for 1/EB_PORTION portion\n+#define EB_PORTION 10 // set EB on minimal cell for 1/EB_PORTION portion\n#define MAXKAPERIOD 1000 // in slots: 1500@20ms per slot -> ~30 seconds. Max value used by adaptive synchronization.\n#define DESYNCTIMEOUT 1750 // in slots: 1750@20ms per slot -> ~35 seconds. A larger DESYNCTIMEOUT is needed if using a larger KATIMEOUT.\n#define LIMITLARGETIMECORRECTION 5 // threshold number of ticks to declare a timeCorrection \"large\"\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/02b-MAChigh/schedule.h",
"new_path": "openstack/02b-MAChigh/schedule.h",
"diff": "The superframe reappears over time and can be arbitrarily long.\n*/\n-#define SLOTFRAME_LENGTH 11 //should be 101\n+#define SLOTFRAME_LENGTH 101 //should be 101\n//draft-ietf-6tisch-minimal-06\n#define SCHEDULE_MINIMAL_6TISCH_ACTIVE_CELLS 1\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
reverting slot and eb configurations to original configs
|
491,595 |
01.04.2020 12:30:33
| -7,200 |
cae1d7625ac842a2b20dd35a39140fa471a0c24a
|
add new em project (test).
|
[
{
"change_type": "ADD",
"old_path": null,
"new_path": "projects/nrf52840/nrf52840.emProject",
"diff": "+<!DOCTYPE CrossStudio_Project_File>\n+<solution\n+ Name=\"nordicopenwsn_03oos_openwsn_pca10056\"\n+ target=\"8\"\n+ version=\"2\">\n+ <project Name=\"01bsp_uart\">\n+ <configuration\n+ Name=\"Common\"\n+ arm_architecture=\"v7EM\"\n+ arm_core_type=\"Cortex-M4\"\n+ arm_endian=\"Little\"\n+ arm_fp_abi=\"Hard\"\n+ arm_fpu_type=\"FPv4-SP-D16\"\n+ arm_linker_heap_size=\"131072\"\n+ arm_linker_process_stack_size=\"0\"\n+ arm_linker_stack_size=\"65536\"\n+ arm_linker_treat_warnings_as_errors=\"No\"\n+ arm_simulator_memory_simulation_parameter=\"RWX 00000000,00100000,FFFFFFFF;RWX 20000000,00010000,CDCDCDCD\"\n+ arm_target_device_name=\"nRF52840_xxAA\"\n+ arm_target_interface_type=\"SWD\"\n+ c_preprocessor_definitions=\"BSP_DEFINES_ONLY;FLOAT_ABI_HARD;INITIALIZE_USER_SECTIONS;NO_VTOR_CONFIG;ARM_MATH_CM4;__FPU_PRESENT=1;USE_APP_CONFIG=1;NRF52840_XXAA=1;BOARD_PCA10056=1;CONFIG_GPIO_AS_PINRESET=1;DAGROOT=1\"\n+ c_user_include_directories=\"../../../drivers/common;../../../inc;../../../kernel;../../../openapps;../../../openapps/c6t;../../../openapps/cinfo;../../../openapps/cjoin;../../../openapps/cleds;../../../openapps/cwellknown;../../../openapps/opencoap;../../../openapps/rrt;../../../openapps/uecho;../../../openapps/uexpiration;../../../openapps/uexpiration_monitor;../../../openapps/uinject;../../../openapps/userialbridge;../../../openstack;../../../openstack/02a-MAClow;../../../openstack/02b-MAChigh;../../../openstack/03a-IPHC;../../../openstack/03b-IPv6;../../../openstack/04-TRAN;../../../openstack/cross-layers;../../../bsp/boards/nrf52840;../../../bsp/boards/nrf52840/sdk/config/nrf52840/config;../../../bsp/boards/nrf52840/sdk/integration/nrfx;../../../bsp/boards/nrf52840/sdk/components/toolchain/cmsis/include;../../../bsp/boards/nrf52840/sdk/components/drivers_nrf/nrf_soc_nosd;../../../bsp/boards/nrf52840/sdk/components/libraries/atomic;../../../bsp/boards/nrf52840/sdk/components/libraries/balloc;../../../bsp/boards/nrf52840/sdk/components/libraries/delay;../../../bsp/boards/nrf52840/sdk/components/libraries/experimental_log;../../../bsp/boards/nrf52840/sdk/components/libraries/experimental_log/src;../../../bsp/boards/nrf52840/sdk/components/libraries/experimental_memobj;../../../bsp/boards/nrf52840/sdk/components/libraries/experimental_section_vars;../../../bsp/boards/nrf52840/sdk/components/libraries/mutex;../../../bsp/boards/nrf52840/sdk/components/libraries/strerror;../../../bsp/boards/nrf52840/sdk/components/libraries/uart;../../../bsp/boards/nrf52840/sdk/components/libraries/util;../../../bsp/boards/nrf52840/sdk/integration/nrfx/legacy;../../../bsp/boards/nrf52840/sdk/modules/nrfx;../../../bsp/boards/nrf52840/sdk/modules/nrfx/drivers;../../../bsp/boards/nrf52840/sdk/modules/nrfx/drivers/include;../../../bsp/boards/nrf52840/sdk/modules/nrfx/drivers/src;../../../bsp/boards/nrf52840/sdk/modules/nrfx/drivers/src/prs;../../../bsp/boards/nrf52840/sdk/modules/nrfx/hal;../../../bsp/boards/nrf52840/sdk/modules/nrfx/mdk;../../../bsp/boards/nrf52840/sdk/modules/nrfx/soc;../../../bsp/boards/nrf52840/sdk/modules/nrfx/templates;../../../bsp/boards/nrf52840/sdk/components/drivers_nrf/radio_config;../../../bsp/boards\"\n+ debug_register_definition_file=\"../../../bsp/boards/nrf52840/sdk/modules/nrfx/mdk/nrf52840.svd\"\n+ debug_start_from_entry_point_symbol=\"No\"\n+ debug_target_connection=\"J-Link\"\n+ gcc_debugging_level=\"Level 3\"\n+ gcc_entry_point=\"Reset_Handler\"\n+ linker_output_format=\"hex\"\n+ linker_printf_fmt_level=\"long\"\n+ linker_printf_fp_enabled=\"Float\"\n+ linker_printf_width_precision_supported=\"Yes\"\n+ linker_section_placement_file=\"flash_placement.xml\"\n+ linker_section_placement_macros=\"FLASH_PH_START=0x0;FLASH_PH_SIZE=0x100000;RAM_PH_START=0x20000000;RAM_PH_SIZE=0x40000;FLASH_START=0x0;FLASH_SIZE=0x100000;RAM_START=0x20000000;RAM_SIZE=0x40000\"\n+ linker_section_placements_segments=\"FLASH RX 0x0 0x100000;RAM RWX 0x20000000 0x40000\"\n+ macros=\"CMSIS_CONFIG_TOOL=../../../bsp/boards/nrf52840/sdk/external_tools/cmsisconfig/CMSIS_Configuration_Wizard.jar\"\n+ project_directory=\"\"\n+ project_type=\"Executable\" />\n+ <folder Name=\"Application\">\n+ <file file_name=\"../../../bsp/boards/nrf52840/app_config.h\" />\n+ <file file_name=\"../../../projects/common/03oos_openwsn/03oos_openwsn.c\" />\n+ </folder>\n+ <folder Name=\"Segger ES Specific\">\n+ <file file_name=\"../../../bsp/boards/nrf52840/sdk/modules/nrfx/mdk/ses_nRF_Startup.s\" />\n+ <file file_name=\"../../../bsp/boards/nrf52840/sdk/modules/nrfx/mdk/ses_nrf52840_Vectors.s\" />\n+ <file file_name=\"../../../bsp/boards/nrf52840/sdk/modules/nrfx/mdk/system_nrf52840.c\" />\n+ <folder Name=\"Segger Startup Files\">\n+ <file file_name=\"$(StudioDir)/source/thumb_crt0.s\" />\n+ </folder>\n+ </folder>\n+ <folder Name=\"OpenWSN\" />\n+ <folder Name=\"Nordic SDK15 Specific\">\n+ <folder Name=\"nRF_Drivers\">\n+ <file file_name=\"../../../bsp/boards/nrf52840/sdk/integration/nrfx/legacy/nrf_drv_spi.c\" />\n+ <file file_name=\"../../../bsp/boards/nrf52840/sdk/integration/nrfx/legacy/nrf_drv_uart.c\" />\n+ <file file_name=\"../../../bsp/boards/nrf52840/sdk/modules/nrfx/drivers/src/nrfx_spi.c\" />\n+ <file file_name=\"../../../bsp/boards/nrf52840/sdk/modules/nrfx/drivers/src/nrfx_uart.c\" />\n+ <file file_name=\"../../../bsp/boards/nrf52840/sdk/modules/nrfx/drivers/src/nrfx_clock.c\" />\n+ <file file_name=\"../../../bsp/boards/nrf52840/sdk/components/libraries/experimental_section_vars/nrf_section_iter.c\" />\n+ <file file_name=\"../../../bsp/boards/nrf52840/sdk/components/libraries/pwr_mgmt/nrf_pwr_mgmt.c\" />\n+ <file file_name=\"../../../bsp/boards/nrf52840/sdk/components/libraries/uart/app_uart.c\" />\n+ <file file_name=\"../../../bsp/boards/nrf52840/sdk/components/libraries/util/app_util_platform.c\" />\n+ <file file_name=\"../../../bsp/boards/nrf52840/sdk/integration/nrfx/legacy/nrf_drv_clock.c\" />\n+ <file file_name=\"../../../bsp/boards/nrf52840/sdk/modules/nrfx/drivers/src/nrfx_power.c\" />\n+ <file file_name=\"../../../bsp/boards/nrf52840/sdk/components/libraries/util/nrf_assert.c\" />\n+ <file file_name=\"../../../bsp/boards/nrf52840/sdk/components/libraries/util/app_error.c\" />\n+ <file file_name=\"../../../bsp/boards/nrf52840/sdk/components/libraries/util/app_error_handler_gcc.c\" />\n+ <file file_name=\"../../../bsp/boards/nrf52840/sdk/components/libraries/util/app_error_weak.c\" />\n+ <file file_name=\"../../../bsp/boards/nrf52840/sdk/components/libraries/strerror/nrf_strerror.c\" />\n+ <file file_name=\"../../../bsp/boards/nrf52840/nrfx_rtc_hack.c\" />\n+ <file file_name=\"../../../bsp/boards/nrf52840/sdk/modules/nrfx/drivers/src/nrfx_twi.c\" />\n+ <file file_name=\"../../../bsp/boards/nrf52840/sdk/modules/nrfx/drivers/src/nrfx_systick.c\" />\n+ <file file_name=\"../../../bsp/boards/nrf52840/sdk/modules/nrfx/drivers/src/nrfx_saadc.c\" />\n+ </folder>\n+ <folder Name=\"nRF_Libraries\" />\n+ <folder Name=\"Board Definition\">\n+ <file file_name=\"../../../bsp/boards/nrf52840/sdk/components/boards/boards.c\" />\n+ </folder>\n+ <folder Name=\"CMSIS DSP\">\n+ <file file_name=\"../../../bsp/boards/nrf52840/sdk/components/toolchain/cmsis/include/arm_math.h\" />\n+ <file file_name=\"../../../bsp/boards/nrf52840/sdk/components/toolchain/cmsis/include/core_cm4.h\" />\n+ </folder>\n+ </folder>\n+ <configuration Name=\"Debug\" gcc_optimization_level=\"None\" />\n+ <configuration Name=\"Release\" gcc_optimization_level=\"Level 3\" />\n+ <folder Name=\"bsp\">\n+ <file file_name=\"../../../bsp/boards/nrf52840/board.c\" />\n+ <file file_name=\"../../../bsp/boards/nrf52840/board_info.h\" />\n+ <file file_name=\"../../../bsp/boards/nrf52840/debugpins.c\" />\n+ <file file_name=\"../../../bsp/boards/nrf52840/eui64.c\" />\n+ <file file_name=\"../../../bsp/boards/nrf52840/leds.c\" />\n+ <file file_name=\"../../../bsp/boards/nrf52840/radio.c\" />\n+ <file file_name=\"../../../bsp/boards/nrf52840/sctimer.c\" />\n+ <file file_name=\"../../../bsp/boards/nrf52840/spi.c\" />\n+ <file file_name=\"../../../bsp/boards/nrf52840/uart.c\" />\n+ <file file_name=\"../../../bsp/boards/board.h\" />\n+ <file file_name=\"../../../bsp/boards/cryptoengine.h\" />\n+ <file file_name=\"../../../bsp/boards/debugpins.h\" />\n+ <file file_name=\"../../../bsp/boards/eui64.h\" />\n+ <file file_name=\"../../../bsp/boards/i2c.h\" />\n+ <file file_name=\"../../../bsp/boards/leds.h\" />\n+ <file file_name=\"../../../bsp/boards/radio.h\" />\n+ <file file_name=\"../../../bsp/boards/sctimer.h\" />\n+ <file file_name=\"../../../bsp/boards/sensors.h\" />\n+ <file file_name=\"../../../bsp/boards/spi.h\" />\n+ <file file_name=\"../../../bsp/boards/toolchain_defs.h\" />\n+ <file file_name=\"../../../bsp/boards/uart.h\" />\n+ <file file_name=\"../../../bsp/boards/nrf52840/cryptoengine.c\" />\n+ <file file_name=\"../../../bsp/boards/nrf52840/adc_sensor.c\" />\n+ <file file_name=\"../../../bsp/boards/nrf52840/i2c.c\" />\n+ <file file_name=\"../../../bsp/boards/nrf52840/sensors.c\" />\n+ </folder>\n+ </project>\n+ <configuration\n+ Name=\"Release\"\n+ c_preprocessor_definitions=\"NDEBUG\"\n+ gcc_optimization_level=\"Optimize For Size\" />\n+ <configuration\n+ Name=\"Debug\"\n+ c_preprocessor_definitions=\"DEBUG; DEBUG_NRF\"\n+ gcc_optimization_level=\"None\" />\n+</solution>\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-751. add new em project (test).
|
491,595 |
01.04.2020 15:09:28
| -7,200 |
0ac461718174cd22221ef6e1762ce78b03786c1d
|
update uart implementation.
|
[
{
"change_type": "MODIFY",
"old_path": "bsp/boards/nrf52840/uart.c",
"new_path": "bsp/boards/nrf52840/uart.c",
"diff": "@@ -40,6 +40,8 @@ typedef struct\n{\nuart_tx_cbt txCb;\nuart_rx_cbt rxCb;\n+ bool fXonXoffEscaping;\n+ uint8_t xonXoffEscapedByte;\n} uart_vars_t;\nuart_vars_t uart_vars;\n@@ -61,8 +63,7 @@ static app_uart_comm_params_t const app_config =\n.flow_control= UART_DEFAULT_CONFIG_HWFC // defaults to false\n};\n-static void uart_reinit(void)\n-{\n+static void uart_reinit(void) {\n// for the case that the UART has previously been initialized, uninitialize it first\napp_uart_close();\n@@ -82,15 +83,13 @@ static void uart_reinit(void)\nmemset(tx_buf, 0, sizeof(tx_buf));\n// if UART cannot be initialized, blink error LED for 10s, and then reset\n- if (NRF_SUCCESS != app_uart_init(&app_config, &app_uart_buffers, uart_event_handler, (app_irq_priority_t) NRFX_UART_DEFAULT_CONFIG_IRQ_PRIORITY))\n- {\n+ if (NRF_SUCCESS != app_uart_init(&app_config, &app_uart_buffers, uart_event_handler, (app_irq_priority_t) NRFX_UART_DEFAULT_CONFIG_IRQ_PRIORITY)) {\nleds_error_blink();\nboard_reset();\n}\n}\n-void uart_init(void)\n-{\n+void uart_init(void) {\n// reset local variables\nmemset(&uart_vars,0,sizeof(uart_vars_t));\n@@ -107,51 +106,48 @@ void uart_init(void)\nuart_reinit();\n}\n-void uart_setCallbacks(uart_tx_cbt txCb, uart_rx_cbt rxCb)\n-{\n+void uart_setCallbacks(uart_tx_cbt txCb, uart_rx_cbt rxCb) {\nuart_vars.txCb = txCb;\nuart_vars.rxCb = rxCb;\n}\n-void uart_enableInterrupts(void)\n-{\n- // nrf_uart_int_enable(..., NRF_UART_INT_MASK_TXDRDY | NRF_UART_INT_MASK_RXDRDY | NRF_UART_INT_MASK_RXTO | NRF_UART_INT_MASK_ERROR);\n+void uart_enableInterrupts(void) {\n+ nrf_uart_int_enable(NRF_UART0, NRF_UART_INT_MASK_TXDRDY | NRF_UART_INT_MASK_RXDRDY | NRF_UART_INT_MASK_RXTO | NRF_UART_INT_MASK_ERROR);\n}\n-void uart_disableInterrupts(void)\n-{\n- // nrf_uart_int_disable(..., NRF_UART_INT_MASK_TXDRDY | NRF_UART_INT_MASK_RXDRDY | NRF_UART_INT_MASK_RXTO | NRF_UART_INT_MASK_ERROR);\n+void uart_disableInterrupts(void) {\n+ nrf_uart_int_disable(NRF_UART0, NRF_UART_INT_MASK_TXDRDY | NRF_UART_INT_MASK_RXDRDY | NRF_UART_INT_MASK_RXTO | NRF_UART_INT_MASK_ERROR);\n}\n-void uart_clearRxInterrupts(void)\n-{\n+void uart_clearRxInterrupts(void) {\n// is handled within app_uart\n}\n-void uart_clearTxInterrupts(void)\n-{\n+void uart_clearTxInterrupts(void) {\n// is handled within app_uart\n}\n-void uart_setCTS(bool state)\n-{\n- if (state==0x01)\n- {\n+void uart_setCTS(bool state) {\n+ if (state==0x01) {\napp_uart_put(XON);\n- }\n- else\n- {\n+ } else {\napp_uart_put(XOFF);\n}\n}\n-void uart_writeByte(uint8_t byteToWrite)\n-{\n+void uart_writeByte(uint8_t byteToWrite) {\napp_uart_put(byteToWrite);\n+\n+ if (byteToWrite==XON || byteToWrite==XOFF || byteToWrite==XONXOFF_ESCAPE) {\n+ uart_vars.fXonXoffEscaping = 0x01;\n+ uart_vars.xonXoffEscapedByte = byteToWrite;\n+ app_uart_put(XONXOFF_ESCAPE);\n+ } else {\n+ app_uart_put(byteToWrite);\n+ }\n}\n-uint8_t uart_readByte(void)\n-{\n+uint8_t uart_readByte(void) {\nuint8_t newChar;\napp_uart_get(&newChar);\nreturn (newChar);\n@@ -159,8 +155,7 @@ uint8_t uart_readByte(void)\n//=========================== interrupt handlers ==============================\n-void uart_event_handler(app_uart_evt_t * p_event)\n-{\n+void uart_event_handler(app_uart_evt_t * p_event) {\n// debugpins_isr_set();\nif ((p_event->evt_type == APP_UART_COMMUNICATION_ERROR) || (p_event->evt_type == APP_UART_FIFO_ERROR))\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-751. update uart implementation.
|
491,595 |
01.04.2020 18:19:40
| -7,200 |
9edf416dfc8c6e5c3e42674abf202c18b3191b08
|
fix macpong project.
|
[
{
"change_type": "MODIFY",
"old_path": "projects/common/03oos_macpong/03oos_macpong.c",
"new_path": "projects/common/03oos_macpong/03oos_macpong.c",
"diff": "@@ -105,13 +105,13 @@ void macpong_send(uint8_t payloadCtr) {\n//===== FRAG\n-void frag_init(void) {return; }\n-void frag_sendDone(OpenQueueEntry_t *msg, owerror_t sendError) {return; }\n-void frag_receive(OpenQueueEntry_t *msg) {return; }\n+void iphc_init(void) {return; }\n+void iphc_sendDone(OpenQueueEntry_t *msg, owerror_t sendError) {return; }\n+void iphc_receive(OpenQueueEntry_t *msg) {return; }\n//===== IPHC\n-void iphc_init(void) {\n+void frag_init(void) {\nmacpong_vars.timerId = opentimers_create(TIMER_GENERAL_PURPOSE, TASKPRIO_IPHC);\nopentimers_scheduleIn(\nmacpong_vars.timerId, // timerId\n@@ -122,12 +122,12 @@ void iphc_init(void) {\n);\n}\n-void iphc_sendDone(OpenQueueEntry_t* msg, owerror_t error) {\n+void frag_sendDone(OpenQueueEntry_t* msg, owerror_t error) {\nmsg->owner = COMPONENT_IPHC;\nopenqueue_freePacketBuffer(msg);\n}\n-void iphc_receive(OpenQueueEntry_t* msg) {\n+void frag_receive(OpenQueueEntry_t* msg) {\nmsg->owner = COMPONENT_IPHC;\nmacpong_send(++msg->payload[0]);\nopenqueue_freePacketBuffer(msg);\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-873. fix macpong project.
|
491,595 |
09.04.2020 11:06:29
| -7,200 |
765db32531d64cd5ecb3c4771e6b23a04b23d0a0
|
formatting radio.c
|
[
{
"change_type": "MODIFY",
"old_path": "bsp/boards/nrf52840/radio.c",
"new_path": "bsp/boards/nrf52840/radio.c",
"diff": "//=========================== variables =======================================\n-typedef struct\n-{\n+enum transciever_state_t {\n+ TS_OFF,\n+ TS_TX,\n+ TS_RX\n+}\n+\n+typedef struct {\nradio_capture_cbt startFrame_cb;\nradio_capture_cbt endFrame_cb;\nradio_state_t state;\nuint8_t payload[1+MAX_PACKET_SIZE] __attribute__ ((aligned));\n- enum Transciever_state { TS_OFF, TS_TX, TS_RX } transciever_state;\n+ transciever_state transciever_state;\nbool hfc_started;\n// volatile bool event_ready;\n} radio_vars_t;\n@@ -68,8 +73,7 @@ static uint32_t bytewise_bitswap(uint32_t inp);\n//=========================== public ==========================================\n-void radio_init(void)\n-{\n+void radio_init(void) {\n#if 0\n// start 16 MHz crystal oscillator\nNRF_CLOCK->EVENTS_HFCLKSTARTED = 0;\n@@ -164,33 +168,30 @@ void radio_init(void)\n}\n-void radio_setStartFrameCb(radio_capture_cbt cb)\n-{\n+void radio_setStartFrameCb(radio_capture_cbt cb) {\nradio_vars.startFrame_cb = cb;\n}\n-void radio_setEndFrameCb(radio_capture_cbt cb)\n-{\n+void radio_setEndFrameCb(radio_capture_cbt cb) {\nradio_vars.endFrame_cb = cb;\n}\n-void radio_reset(void)\n-{\n+void radio_reset(void) {\nradio_rfOff();\nradio_init();\n}\n-void radio_setFrequency(uint8_t frequency, radio_freq_t tx_or_rx)\n-{\n+void radio_setFrequency(uint8_t frequency, radio_freq_t tx_or_rx) {\nNRF_RADIO->FREQUENCY = FREQUENCY_STEP*(frequency-FREQUENCY_OFFSET); ///< IEEE 802.15.4 frequency channel, see http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52840.ps/radio.html?cp=2_0_0_5_19_11_1#ieee802154_freq\n}\n+int8_t radio_getFrequencyOffset(void){ return 0; }\n-void radio_rfOn(void)\n-{\n+\n+void radio_rfOn(void) {\n/**\n* \\var hfclk_request_timeout_us\n*\n@@ -202,26 +203,26 @@ void radio_rfOn(void)\n*/\n#define hfclk_request_timeout_us 380\n-\nnrfx_systick_state_t systick_time;\nNRFX_CRITICAL_SECTION_ENTER();\n// as a prerequisite for the radio, we start the high frequency clock now, if not yet running, this can take about 350 us on the Dongle\n- if (!radio_vars.hfc_started)\n- {\n+ if (!radio_vars.hfc_started) {\n+\nnrfx_systick_get(&systick_time);\nnrf_drv_clock_hfclk_request(NULL);\n- while ((!nrf_drv_clock_hfclk_is_running()) && (!nrfx_systick_test(&systick_time, hfclk_request_timeout_us)))\n- {\n+ while (\n+ (!nrf_drv_clock_hfclk_is_running()) &&\n+ (!nrfx_systick_test(&systick_time, hfclk_request_timeout_us))\n+ ) {\n// nrfx_systick_get(&systick_time2);\n// lastDelay= ((systick_time.time-systick_time2.time) & 0x00FFFFFF)/(SystemCoreClock/1000000);\n}\n- if (!nrf_drv_clock_hfclk_is_running())\n- {\n+ if (!nrf_drv_clock_hfclk_is_running()) {\n// this seems to happen a few times an hour, though the HFCLK *IS* running\n// leds_error_blink();\n}\n@@ -240,10 +241,11 @@ NRFX_CRITICAL_SECTION_EXIT();\n}\n-void radio_rfOff(void)\n-{\n- if (radio_vars.transciever_state == TS_OFF) { return; }\n+void radio_rfOff(void) {\n+ if (radio_vars.transciever_state == TS_OFF) {\n+ return;\n+ }\nNRFX_CRITICAL_SECTION_ENTER();\n@@ -254,8 +256,7 @@ NRFX_CRITICAL_SECTION_ENTER();\nNVIC_DisableIRQ(RADIO_IRQn);\n// release the high frequency clock\n- if (radio_vars.hfc_started)\n- {\n+ if (radio_vars.hfc_started {\nnrf_drv_clock_hfclk_release();\nradio_vars.hfc_started= false;\n}\n@@ -278,14 +279,14 @@ NRFX_CRITICAL_SECTION_EXIT();\nleds_radio_off();\ndebugpins_radio_clr();\n-\n}\n-void radio_loadPacket(uint8_t* packet, uint16_t len)\n-{\n- if ((len > 0) && (len <= MAX_PACKET_SIZE)) ///< note: 1st byte should be the payload size (for Nordic), and the two last bytes are used by the MAC layer for CRC\n- {\n+void radio_loadPacket(uint8_t* packet, uint16_t len) {\n+\n+ ///< note: 1st byte should be the payload size (for Nordic), and\n+ /// the two last bytes are used by the MAC layer for CRC\n+ if ((len > 0) && (len <= MAX_PACKET_SIZE)) {\nradio_vars.payload[0]= len;\nmemcpy(&radio_vars.payload[1], packet, len);\n}\n@@ -295,10 +296,11 @@ void radio_loadPacket(uint8_t* packet, uint16_t len)\n}\n-void radio_txEnable(void)\n-{\n+void radio_txEnable(void) {\n// M1-START\n- if (radio_vars.transciever_state == TS_TX) { return; }\n+ if (radio_vars.transciever_state == TS_TX) {\n+ return;\n+ }\nradio_rfOn();\n@@ -307,10 +309,11 @@ void radio_txEnable(void)\n}\n-void radio_txNow(void)\n-{\n+void radio_txNow(void) {\n// M2-START\n- if (radio_vars.transciever_state != TS_TX) { return; }\n+ if (radio_vars.transciever_state != TS_TX) {\n+ return;\n+ }\nleds_radio_on();\n@@ -324,9 +327,11 @@ void radio_txNow(void)\n}\n-void radio_rxEnable(void)\n-{\n- if (radio_vars.transciever_state == TS_RX) { return; }\n+void radio_rxEnable(void) {\n+\n+ if (radio_vars.transciever_state == TS_RX) {\n+ return;\n+ }\nradio_rfOn();\n@@ -334,9 +339,11 @@ void radio_rxEnable(void)\n}\n-void radio_rxNow(void)\n-{\n- if (radio_vars.transciever_state != TS_RX) { return; }\n+void radio_rxNow(void) {\n+\n+ if (radio_vars.transciever_state != TS_RX) {\n+ return;\n+ }\nleds_radio_on();\n@@ -363,9 +370,17 @@ void radio_getReceivedFrame(uint8_t* pBufRead,\n{\n// check for length parameter; if too long, payload won't fit into memory\nuint8_t len= radio_vars.payload[0];\n- if (len == 0) { return; }\n- if (len > MAX_PACKET_SIZE) { len= MAX_PACKET_SIZE; }\n- if (len > maxBufLen) { len= maxBufLen; }\n+ if (len == 0) {\n+ return;\n+ }\n+\n+ if (len > MAX_PACKET_SIZE) {\n+ len= MAX_PACKET_SIZE;\n+ }\n+\n+ if (len > maxBufLen) {\n+ len= maxBufLen;\n+ }\n// copy payload\nmemcpy(pBufRead, &radio_vars.payload[1], len);\n@@ -388,15 +403,14 @@ void radio_getReceivedFrame(uint8_t* pBufRead,\n//=========================== private =========================================\n-static uint32_t swap_bits(uint32_t inp)\n-{\n+static uint32_t swap_bits(uint32_t inp) {\n+\nuint32_t i;\nuint32_t retval = 0;\ninp = (inp & 0x000000FFUL);\n- for (i = 0; i < 8; i++)\n- {\n+ for (i = 0; i < 8; i++) {\nretval |= ((inp >> i) & 0x01) << (7 - i);\n}\n@@ -404,8 +418,8 @@ static uint32_t swap_bits(uint32_t inp)\n}\n-static uint32_t bytewise_bitswap(uint32_t inp)\n-{\n+static uint32_t bytewise_bitswap(uint32_t inp) {\n+\nreturn (swap_bits(inp >> 24) << 24)\n| (swap_bits(inp >> 16) << 16)\n| (swap_bits(inp >> 8) << 8)\n@@ -417,26 +431,24 @@ static uint32_t bytewise_bitswap(uint32_t inp)\n//=========================== interrupt handlers ==============================\n-void RADIO_IRQHandler(void)\n-{\n- if (NRF_RADIO->EVENTS_ADDRESS)\n- {\n+void RADIO_IRQHandler(void) {\n+\n+ if (NRF_RADIO->EVENTS_ADDRESS) {\n+\nNRF_RADIO->EVENTS_ADDRESS = 0;\n// M2-END\n- if (radio_vars.startFrame_cb)\n- {\n+ if (radio_vars.startFrame_cb) {\nradio_vars.startFrame_cb(sctimer_readCounter());\n}\n}\n- if (NRF_RADIO->EVENTS_END)\n- {\n+ if (NRF_RADIO->EVENTS_END) {\n+\nNRF_RADIO->EVENTS_END = 0;\n- if (radio_vars.endFrame_cb)\n- {\n+ if (radio_vars.endFrame_cb) {\nradio_vars.endFrame_cb(sctimer_readCounter());\n}\n}\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-751. formatting radio.c
|
491,595 |
09.04.2020 12:41:06
| -7,200 |
4bea728215ab240510fe96c3e5b7f7efbd20f4dc
|
update board.c and radio.c
|
[
{
"change_type": "MODIFY",
"old_path": "bsp/boards/nrf52840/board.c",
"new_path": "bsp/boards/nrf52840/board.c",
"diff": "@@ -43,21 +43,20 @@ static void button_init(void);\nextern int mote_main(void);\n-int main(void)\n-{\n+int main(void) {\nreturn mote_main();\n}\n//=========================== public ==========================================\n-void board_init(void)\n-{\n+void board_init(void) {\n+\n// start low-frequency clock (LFCLK)\nnrf_drv_clock_init();\nNRF_CLOCK->EVENTS_LFCLKSTARTED= 0; ///< part of workaround for 3.1 [20] RTC: Register values are invalid from http://infocenter.nordicsemi.com/pdf/nRF52840_Rev_1_Errata_v1.1.pdf\nnrf_drv_clock_lfclk_request(NULL);\n- while (!nrf_drv_clock_lfclk_is_running()) { }\n+ while (!nrf_drv_clock_lfclk_is_running());\nNRF_RTC0->TASKS_STOP= 0; ///< part of workaround for 3.1 [20] RTC: Register values are invalid from http://infocenter.nordicsemi.com/pdf/nRF52840_Rev_1_Errata_v1.1.pdf\nnrfx_systick_init();\n@@ -96,8 +95,7 @@ void board_init(void)\n/**\n* Puts the board to sleep\n*/\n-void board_sleep(void)\n-{\n+void board_sleep(void) {\nnrf_pwr_mgmt_run();\n/*\n@@ -118,8 +116,7 @@ void board_sleep(void)\n/**\n* Resets the board\n*/\n-void board_reset(void)\n-{\n+void board_reset(void) {\nNVIC_SystemReset();\n}\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-751. update board.c and radio.c
|
491,595 |
09.04.2020 12:50:03
| -7,200 |
c4b435b235e5fea8274b77c69d02587dca5c82f0
|
update drv_openserial project.
|
[
{
"change_type": "MODIFY",
"old_path": "projects/nrf52840/02drv_openserial/02drv_openserial.emProject",
"new_path": "projects/nrf52840/02drv_openserial/02drv_openserial.emProject",
"diff": "<folder Name=\"kernel\">\n<file file_name=\"../../../kernel/openos/scheduler.c\" />\n</folder>\n- <folder Name=\"openstack\">\n- <file file_name=\"../../../openstack/openstack.c\" />\n- <file file_name=\"../../../openstack/cross-layers/idmanager.c\" />\n- <file file_name=\"../../../openstack/03b-IPv6/icmpv6rpl.c\" />\n- <file file_name=\"../../../openstack/03a-IPHC/openbridge.c\" />\n- <file file_name=\"../../../openstack/04-TRAN/openudp.c\" />\n- <file file_name=\"../../../openstack/cross-layers/openqueue.c\" />\n- <file file_name=\"../../../openstack/02b-MAChigh/msf.c\" />\n- <file file_name=\"../../../openstack/02b-MAChigh/neighbors.c\" />\n- <file file_name=\"../../../openstack/02b-MAChigh/schedule.c\" />\n- <file file_name=\"../../../openstack/02b-MAChigh/sixtop.c\" />\n- <file file_name=\"../../../openstack/02a-MAClow/adaptive_sync.c\" />\n- <file file_name=\"../../../openstack/02a-MAClow/IEEE802154.c\" />\n- <file file_name=\"../../../openstack/02a-MAClow/IEEE802154_security.c\" />\n- <file file_name=\"../../../openstack/02a-MAClow/IEEE802154E.c\" />\n- <file file_name=\"../../../openstack/02a-MAClow/topology.c\" />\n- <file file_name=\"../../../openstack/03a-IPHC/iphc.c\" />\n- <file file_name=\"../../../openstack/03b-IPv6/forwarding.c\" />\n- <file file_name=\"../../../openstack/03b-IPv6/icmpv6.c\" />\n- <file file_name=\"../../../openstack/03b-IPv6/icmpv6echo.c\" />\n- <file file_name=\"../../../openstack/cross-layers/openrandom.c\" />\n- <file file_name=\"../../../openstack/cross-layers/packetfunctions.c\" />\n- </folder>\n<folder Name=\"drivers\">\n<file file_name=\"../../../drivers/common/openserial.c\" />\n<file file_name=\"../../../drivers/common/opentimers.c\" />\n<file file_name=\"../../../drivers/common/openhdlc.c\" />\n</folder>\n- <folder Name=\"openapps\">\n- <file file_name=\"../../../openapps/openapps.c\" />\n- <file file_name=\"../../../openapps/c6t/c6t.c\">\n- <configuration Name=\"Debug\" build_exclude_from_build=\"Yes\" />\n- </file>\n- <file file_name=\"../../../openapps/cinfo/cinfo.c\">\n- <configuration Name=\"Debug\" build_exclude_from_build=\"Yes\" />\n- </file>\n- <file file_name=\"../../../openapps/cjoin/cjoin.c\">\n- <configuration Name=\"Debug\" build_exclude_from_build=\"Yes\" />\n- </file>\n- <file file_name=\"../../../openapps/cleds/cleds.c\">\n- <configuration Name=\"Debug\" build_exclude_from_build=\"Yes\" />\n- </file>\n- <file file_name=\"../../../openapps/cwellknown/cwellknown.c\">\n- <configuration Name=\"Debug\" build_exclude_from_build=\"Yes\" />\n- </file>\n- <file file_name=\"../../../openapps/opencoap/opencoap.c\">\n- <configuration Name=\"Debug\" build_exclude_from_build=\"Yes\" />\n- </file>\n- <file file_name=\"../../../openapps/rrt/rrt.c\">\n- <configuration Name=\"Debug\" build_exclude_from_build=\"Yes\" />\n- </file>\n- <file file_name=\"../../../openapps/uecho/uecho.c\">\n- <configuration Name=\"Debug\" build_exclude_from_build=\"Yes\" />\n- </file>\n- <file file_name=\"../../../openapps/uexpiration/uexpiration.c\">\n- <configuration Name=\"Debug\" build_exclude_from_build=\"Yes\" />\n- </file>\n- <file file_name=\"../../../openapps/uexpiration_monitor/uexpiration_monitor.c\">\n- <configuration Name=\"Debug\" build_exclude_from_build=\"Yes\" />\n- </file>\n- <file file_name=\"../../../openapps/uinject/uinject.c\">\n- <configuration Name=\"Debug\" build_exclude_from_build=\"Yes\" />\n- </file>\n- <file file_name=\"../../../openapps/userialbridge/userialbridge.c\">\n- <configuration Name=\"Debug\" build_exclude_from_build=\"Yes\" />\n- </file>\n- <file file_name=\"../../../openapps/opencoap/openoscoap.c\">\n- <configuration Name=\"Debug\" build_exclude_from_build=\"Yes\" />\n- </file>\n- <file file_name=\"../../../openapps/opencoap/cborencoder.c\">\n- <configuration Name=\"Debug\" build_exclude_from_build=\"Yes\" />\n- </file>\n- </folder>\n</folder>\n<folder Name=\"Nordic SDK15 Specific\">\n<folder Name=\"nRF_Drivers\">\n<file file_name=\"../../../bsp/boards/nrf52840/sdk/components/toolchain/cmsis/include/core_cm4.h\" />\n</folder>\n</folder>\n- <configuration Name=\"Debug\" gcc_optimization_level=\"None\" />\n+ <configuration\n+ Name=\"Debug\"\n+ c_preprocessor_definitions=\"OPENSERIAL_PRINTF\"\n+ gcc_optimization_level=\"None\" />\n<configuration Name=\"Release\" gcc_optimization_level=\"Level 3\" />\n</project>\n<configuration\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-751. update drv_openserial project.
|
491,595 |
09.04.2020 12:56:37
| -7,200 |
3178396723fdaadedc723a10464271eb2016e239
|
update drv_opentimers project.
|
[
{
"change_type": "RENAME",
"old_path": "projects/nrf52840/02drv_opentimers/NordicOpenWSN_02drv_opentimers_DK.emProject",
"new_path": "projects/nrf52840/02drv_opentimers/02drv_opentimers.emProject",
"diff": "<!DOCTYPE CrossStudio_Project_File>\n-<solution\n- Name=\"nordicopenwsn_02drv_opentimers_pca10056\"\n- target=\"8\"\n- version=\"2\">\n- <project Name=\"nordicopenwsn_02drv_opentimers_pca10056\">\n+<solution Name=\"02drv_opentimers\" target=\"8\" version=\"2\">\n+ <project Name=\"02drv_opentimers\">\n<configuration\nName=\"Common\"\narm_architecture=\"v7EM\"\nproject_type=\"Executable\" />\n<folder Name=\"Application\">\n<file file_name=\"../../../bsp/boards/nrf52840/app_config.h\" />\n- <file file_name=\"drv_opentimers.c\" />\n+ <file file_name=\"../../common/02drv_opentimers/02drv_opentimers.c\" />\n</folder>\n<folder Name=\"Segger ES Specific\">\n<file file_name=\"../../../bsp/boards/nrf52840/sdk/modules/nrfx/mdk/ses_nRF_Startup.s\" />\n<folder Name=\"kernel\">\n<file file_name=\"../../../kernel/openos/scheduler.c\" />\n</folder>\n- <folder Name=\"openstack\">\n- <file file_name=\"../../../openstack/openstack.c\" />\n- <file file_name=\"../../../openstack/cross-layers/idmanager.c\" />\n- <file file_name=\"../../../openstack/03b-IPv6/icmpv6rpl.c\" />\n- <file file_name=\"../../../openstack/03a-IPHC/openbridge.c\" />\n- <file file_name=\"../../../openstack/04-TRAN/openudp.c\" />\n- <file file_name=\"../../../openstack/cross-layers/openqueue.c\" />\n- <file file_name=\"../../../openstack/02b-MAChigh/msf.c\" />\n- <file file_name=\"../../../openstack/02b-MAChigh/neighbors.c\" />\n- <file file_name=\"../../../openstack/02b-MAChigh/schedule.c\" />\n- <file file_name=\"../../../openstack/02b-MAChigh/sixtop.c\" />\n- <file file_name=\"../../../openstack/02a-MAClow/adaptive_sync.c\" />\n- <file file_name=\"../../../openstack/02a-MAClow/IEEE802154.c\" />\n- <file file_name=\"../../../openstack/02a-MAClow/IEEE802154_security.c\" />\n- <file file_name=\"../../../openstack/02a-MAClow/IEEE802154E.c\" />\n- <file file_name=\"../../../openstack/02a-MAClow/topology.c\" />\n- <file file_name=\"../../../openstack/03a-IPHC/iphc.c\" />\n- <file file_name=\"../../../openstack/03b-IPv6/forwarding.c\" />\n- <file file_name=\"../../../openstack/03b-IPv6/icmpv6.c\" />\n- <file file_name=\"../../../openstack/03b-IPv6/icmpv6echo.c\" />\n- <file file_name=\"../../../openstack/cross-layers/openrandom.c\" />\n- <file file_name=\"../../../openstack/cross-layers/packetfunctions.c\" />\n- </folder>\n<folder Name=\"drivers\">\n<file file_name=\"../../../drivers/common/openserial.c\" />\n<file file_name=\"../../../drivers/common/opentimers.c\" />\n<file file_name=\"../../../drivers/common/openhdlc.c\" />\n</folder>\n- <folder Name=\"openapps\">\n- <file file_name=\"../../../openapps/openapps.c\" />\n- <file file_name=\"../../../openapps/c6t/c6t.c\">\n- <configuration Name=\"Debug\" build_exclude_from_build=\"Yes\" />\n- </file>\n- <file file_name=\"../../../openapps/cinfo/cinfo.c\">\n- <configuration Name=\"Debug\" build_exclude_from_build=\"Yes\" />\n- </file>\n- <file file_name=\"../../../openapps/cjoin/cjoin.c\">\n- <configuration Name=\"Debug\" build_exclude_from_build=\"Yes\" />\n- </file>\n- <file file_name=\"../../../openapps/cleds/cleds.c\">\n- <configuration Name=\"Debug\" build_exclude_from_build=\"Yes\" />\n- </file>\n- <file file_name=\"../../../openapps/cwellknown/cwellknown.c\">\n- <configuration Name=\"Debug\" build_exclude_from_build=\"Yes\" />\n- </file>\n- <file file_name=\"../../../openapps/opencoap/opencoap.c\">\n- <configuration Name=\"Debug\" build_exclude_from_build=\"Yes\" />\n- </file>\n- <file file_name=\"../../../openapps/rrt/rrt.c\">\n- <configuration Name=\"Debug\" build_exclude_from_build=\"Yes\" />\n- </file>\n- <file file_name=\"../../../openapps/uecho/uecho.c\">\n- <configuration Name=\"Debug\" build_exclude_from_build=\"Yes\" />\n- </file>\n- <file file_name=\"../../../openapps/uexpiration/uexpiration.c\">\n- <configuration Name=\"Debug\" build_exclude_from_build=\"Yes\" />\n- </file>\n- <file file_name=\"../../../openapps/uexpiration_monitor/uexpiration_monitor.c\">\n- <configuration Name=\"Debug\" build_exclude_from_build=\"Yes\" />\n- </file>\n- <file file_name=\"../../../openapps/uinject/uinject.c\">\n- <configuration Name=\"Debug\" build_exclude_from_build=\"Yes\" />\n- </file>\n- <file file_name=\"../../../openapps/userialbridge/userialbridge.c\">\n- <configuration Name=\"Debug\" build_exclude_from_build=\"Yes\" />\n- </file>\n- <file file_name=\"../../../openapps/opencoap/openoscoap.c\">\n- <configuration Name=\"Debug\" build_exclude_from_build=\"Yes\" />\n- </file>\n- <file file_name=\"../../../openapps/opencoap/cborencoder.c\">\n- <configuration Name=\"Debug\" build_exclude_from_build=\"Yes\" />\n- </file>\n- </folder>\n</folder>\n<folder Name=\"Nordic SDK15 Specific\">\n<folder Name=\"nRF_Drivers\">\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-751. update drv_opentimers project.
|
491,595 |
10.04.2020 17:26:44
| -7,200 |
a39726d5afd81d4f6eee38a0f854cf5f78539ef0
|
update uart isr.
|
[
{
"change_type": "MODIFY",
"old_path": "bsp/boards/nrf52840/uart.c",
"new_path": "bsp/boards/nrf52840/uart.c",
"diff": "@@ -83,7 +83,13 @@ static void uart_reinit(void) {\nmemset(tx_buf, 0, sizeof(tx_buf));\n// if UART cannot be initialized, blink error LED for 10s, and then reset\n- if (NRF_SUCCESS != app_uart_init(&app_config, &app_uart_buffers, uart_event_handler, (app_irq_priority_t) NRFX_UART_DEFAULT_CONFIG_IRQ_PRIORITY)) {\n+ if (\n+ NRF_SUCCESS != app_uart_init(\n+ &app_config,\n+ &app_uart_buffers,\n+ uart_event_handler,\n+ (app_irq_priority_t) NRFX_UART_DEFAULT_CONFIG_IRQ_PRIORITY)\n+ ) {\nleds_error_blink();\nboard_reset();\n}\n@@ -112,19 +118,21 @@ void uart_setCallbacks(uart_tx_cbt txCb, uart_rx_cbt rxCb) {\n}\nvoid uart_enableInterrupts(void) {\n- nrf_uart_int_enable(NRF_UART0, NRF_UART_INT_MASK_TXDRDY | NRF_UART_INT_MASK_RXDRDY | NRF_UART_INT_MASK_RXTO | NRF_UART_INT_MASK_ERROR);\n+ nrf_uart_int_enable(NRF_UART0, NRF_UART_INT_MASK_TXDRDY | NRF_UART_INT_MASK_RXDRDY);\n}\nvoid uart_disableInterrupts(void) {\n- nrf_uart_int_disable(NRF_UART0, NRF_UART_INT_MASK_TXDRDY | NRF_UART_INT_MASK_RXDRDY | NRF_UART_INT_MASK_RXTO | NRF_UART_INT_MASK_ERROR);\n+ nrf_uart_int_disable(NRF_UART0, NRF_UART_INT_MASK_TXDRDY | NRF_UART_INT_MASK_RXDRDY);\n}\nvoid uart_clearRxInterrupts(void) {\n- // is handled within app_uart\n+\n+ NRF_UART0->EVENTS_RXDRDY = (uint32_t)0;\n}\nvoid uart_clearTxInterrupts(void) {\n- // is handled within app_uart\n+\n+ NRF_UART0->EVENTS_TXDRDY = (uint32_t)0;\n}\nvoid uart_setCTS(bool state) {\n@@ -136,7 +144,6 @@ void uart_setCTS(bool state) {\n}\nvoid uart_writeByte(uint8_t byteToWrite) {\n- app_uart_put(byteToWrite);\nif (byteToWrite==XON || byteToWrite==XOFF || byteToWrite==XONXOFF_ESCAPE) {\nuart_vars.fXonXoffEscaping = 0x01;\n@@ -156,56 +163,54 @@ uint8_t uart_readByte(void) {\n//=========================== interrupt handlers ==============================\nvoid uart_event_handler(app_uart_evt_t * p_event) {\n-// debugpins_isr_set();\n- if ((p_event->evt_type == APP_UART_COMMUNICATION_ERROR) || (p_event->evt_type == APP_UART_FIFO_ERROR))\n- {\n- // handle error ...\n- // leds_error_blink();\n- leds_error_toggle();\n- uart_reinit();\n- }\n- else if ((p_event->evt_type == APP_UART_DATA) || (p_event->evt_type == APP_UART_DATA_READY))\n- {\n+ debugpins_isr_set();\n+\n+ if (\n+ (p_event->evt_type == APP_UART_DATA) ||\n+ (p_event->evt_type == APP_UART_DATA_READY)\n+ ) {\n// RX data has been received\nuart_rx_isr();\n- }\n- else if (p_event->evt_type == APP_UART_TX_EMPTY)\n- {\n+ } else if (p_event->evt_type == APP_UART_TX_EMPTY) {\n// TX data has been sent\nuart_tx_isr();\n}\n-// debugpins_isr_clr();\n+ debugpins_isr_clr();\n}\n-kick_scheduler_t uart_tx_isr(void)\n-{\n+kick_scheduler_t uart_tx_isr(void) {\n+\nuart_clearTxInterrupts();\n- if (uart_vars.txCb != NULL)\n- {\n+ if (uart_vars.fXonXoffEscaping==0x01) {\n+ uart_vars.fXonXoffEscaping = 0x00;\n+ app_uart_put(uart_vars.xonXoffEscapedByte^XONXOFF_MASK);\n+ } else {\n+ if (uart_vars.txCb != NULL){\nuart_vars.txCb();\n+ return KICK_SCHEDULER;\n+ }\n}\nreturn DO_NOT_KICK_SCHEDULER;\n}\n-kick_scheduler_t uart_rx_isr(void)\n-{\n+kick_scheduler_t uart_rx_isr(void) {\n+\nuart_clearRxInterrupts();\n- if (uart_vars.rxCb != NULL)\n- {\n+ if (uart_vars.rxCb != NULL) {\nuart_vars.rxCb();\n+ return KICK_SCHEDULER;\n}\nreturn DO_NOT_KICK_SCHEDULER;\n}\n-void app_error_fault_handler(uint32_t id, uint32_t pc, uint32_t info)\n-{\n+void app_error_fault_handler(uint32_t id, uint32_t pc, uint32_t info) {\n// handle error ...\n}\n#endif // UART_DISABLED\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-751. update uart isr.
|
491,595 |
10.04.2020 17:27:32
| -7,200 |
52d29c690c9ef64135aeea0453b8f0f8a82ae3f8
|
update timing and format eui64
|
[
{
"change_type": "MODIFY",
"old_path": "bsp/boards/nrf52840/board_info.h",
"new_path": "bsp/boards/nrf52840/board_info.h",
"diff": "#define PORT_maxTxAckPrepare 13 // ~397us (measured 364us)\n// radio speed related\n- #define PORT_delayTx 10 // 305us (measured 282us; radio_txNow() to RADIO_IRQHandler() / NRF_RADIO->EVENTS_READY)\n- #define PORT_delayRx 5 // ~153us (measured 147us; radio_rxNow() to RADIO_IRQHandler() / NRF_RADIO->EVENTS_READY)\n+ #define PORT_delayTx 1 // 305us (measured 282us; radio_txNow() to RADIO_IRQHandler() / NRF_RADIO->EVENTS_READY)\n+ #define PORT_delayRx 0 // ~153us (measured 147us; radio_rxNow() to RADIO_IRQHandler() / NRF_RADIO->EVENTS_READY)\n#endif\n#if BOARD_PCA10059\n// nrf52840-DONGLE\n"
},
{
"change_type": "MODIFY",
"old_path": "bsp/boards/nrf52840/eui64.c",
"new_path": "bsp/boards/nrf52840/eui64.c",
"diff": "@@ -25,18 +25,16 @@ static bool m_deviceIDRead= false; ///< will become true once the device ID h\n//=========================== public ==========================================\n-void eui64_get(uint8_t* addressToWrite)\n-{\n- if (!m_deviceIDRead)\n- {\n+void eui64_get(uint8_t* addressToWrite) {\n+\n+ if (!m_deviceIDRead) {\n// get ID from Nordic chip\nm_deviceID[0]= NRF_FICR->DEVICEID[0];\nm_deviceID[1]= NRF_FICR->DEVICEID[1];\nm_deviceIDRead= true;\n}\n- if (addressToWrite)\n- {\n+ if (addressToWrite) {\nmemcpy(addressToWrite, m_deviceID, 2*sizeof(uint32_t));\n}\n}\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-751. update timing and format eui64
|
491,595 |
10.04.2020 17:28:17
| -7,200 |
9ebd85ce9ff64cfe74293b4084a2708f95dc6edd
|
fix the bsp_radio and drv_openserial project.
|
[
{
"change_type": "MODIFY",
"old_path": "projects/common/01bsp_radio/01bsp_radio.c",
"new_path": "projects/common/01bsp_radio/01bsp_radio.c",
"diff": "@@ -244,6 +244,7 @@ int mote_main(void) {\n// switch to RX mode\nradio_rxEnable();\n+ radio_rxNow();\napp_vars.state = APP_STATE_RX;\n// led\n"
},
{
"change_type": "MODIFY",
"old_path": "projects/common/02drv_openserial/02drv_openserial.c",
"new_path": "projects/common/02drv_openserial/02drv_openserial.c",
"diff": "@@ -101,8 +101,6 @@ open_addr_t* idmanager_getMyID(uint8_t type) {\nreturn &app_vars.addr;\n}\n-void scheduler_push_task(task_cbt task_cb, task_prio_t prio){}\n-\nvoid ieee154e_getAsn(uint8_t* array) {\narray[0] = 0x00;\narray[1] = 0x01;\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-751. fix the bsp_radio and drv_openserial project.
|
491,595 |
10.04.2020 17:33:55
| -7,200 |
077028c6c60a343d23311168c74dbfc103fe5435
|
add 03macpong_project.
|
[
{
"change_type": "ADD",
"old_path": null,
"new_path": "projects/nrf52840/03oos_macpong/03oos_macpong.emProject",
"diff": "+<!DOCTYPE CrossStudio_Project_File>\n+<solution Name=\"03oos_macpong\" target=\"8\" version=\"2\">\n+ <project Name=\"03oos_macpong\">\n+ <configuration\n+ Name=\"Common\"\n+ arm_architecture=\"v7EM\"\n+ arm_core_type=\"Cortex-M4\"\n+ arm_endian=\"Little\"\n+ arm_fp_abi=\"Hard\"\n+ arm_fpu_type=\"FPv4-SP-D16\"\n+ arm_linker_heap_size=\"131072\"\n+ arm_linker_process_stack_size=\"0\"\n+ arm_linker_stack_size=\"65536\"\n+ arm_linker_treat_warnings_as_errors=\"No\"\n+ arm_simulator_memory_simulation_parameter=\"RWX 00000000,00100000,FFFFFFFF;RWX 20000000,00010000,CDCDCDCD\"\n+ arm_target_device_name=\"nRF52840_xxAA\"\n+ arm_target_interface_type=\"SWD\"\n+ c_preprocessor_definitions=\"BSP_DEFINES_ONLY;FLOAT_ABI_HARD;INITIALIZE_USER_SECTIONS;NO_VTOR_CONFIG;ARM_MATH_CM4;__FPU_PRESENT=1;USE_APP_CONFIG=1;NRF52840_XXAA=1;BOARD_PCA10056=1;CONFIG_GPIO_AS_PINRESET=1\"\n+ c_user_include_directories=\"../../../drivers/common;../../../inc;../../../kernel;../../../openapps;../../../openapps/c6t;../../../openapps/cinfo;../../../openapps/cjoin;../../../openapps/cleds;../../../openapps/cwellknown;../../../openapps/opencoap;../../../openapps/rrt;../../../openapps/uecho;../../../openapps/uexpiration;../../../openapps/uexpiration_monitor;../../../openapps/uinject;../../../openapps/userialbridge;../../../openstack;../../../openstack/02a-MAClow;../../../openstack/02b-MAChigh;../../../openstack/03a-IPHC;../../../openstack/03b-IPv6;../../../openstack/04-TRAN;../../../openstack/cross-layers;../../../bsp/boards/nrf52840;../../../bsp/boards/nrf52840/sdk/config/nrf52840/config;../../../bsp/boards/nrf52840/sdk/integration/nrfx;../../../bsp/boards/nrf52840/sdk/components/toolchain/cmsis/include;../../../bsp/boards/nrf52840/sdk/components/drivers_nrf/nrf_soc_nosd;../../../bsp/boards/nrf52840/sdk/components/libraries/atomic;../../../bsp/boards/nrf52840/sdk/components/libraries/balloc;../../../bsp/boards/nrf52840/sdk/components/libraries/delay;../../../bsp/boards/nrf52840/sdk/components/libraries/experimental_log;../../../bsp/boards/nrf52840/sdk/components/libraries/experimental_log/src;../../../bsp/boards/nrf52840/sdk/components/libraries/experimental_memobj;../../../bsp/boards/nrf52840/sdk/components/libraries/experimental_section_vars;../../../bsp/boards/nrf52840/sdk/components/libraries/mutex;../../../bsp/boards/nrf52840/sdk/components/libraries/strerror;../../../bsp/boards/nrf52840/sdk/components/libraries/uart;../../../bsp/boards/nrf52840/sdk/components/libraries/util;../../../bsp/boards/nrf52840/sdk/integration/nrfx/legacy;../../../bsp/boards/nrf52840/sdk/modules/nrfx;../../../bsp/boards/nrf52840/sdk/modules/nrfx/drivers;../../../bsp/boards/nrf52840/sdk/modules/nrfx/drivers/include;../../../bsp/boards/nrf52840/sdk/modules/nrfx/drivers/src;../../../bsp/boards/nrf52840/sdk/modules/nrfx/drivers/src/prs;../../../bsp/boards/nrf52840/sdk/modules/nrfx/hal;../../../bsp/boards/nrf52840/sdk/modules/nrfx/mdk;../../../bsp/boards/nrf52840/sdk/modules/nrfx/soc;../../../bsp/boards/nrf52840/sdk/modules/nrfx/templates;../../../bsp/boards/nrf52840/sdk/components/drivers_nrf/radio_config;../../../bsp/boards\"\n+ debug_register_definition_file=\"../../../bsp/boards/nrf52840/sdk/modules/nrfx/mdk/nrf52840.svd\"\n+ debug_start_from_entry_point_symbol=\"No\"\n+ debug_target_connection=\"J-Link\"\n+ gcc_debugging_level=\"Level 3\"\n+ gcc_entry_point=\"Reset_Handler\"\n+ linker_output_format=\"hex\"\n+ linker_printf_fmt_level=\"long\"\n+ linker_printf_fp_enabled=\"Float\"\n+ linker_printf_width_precision_supported=\"Yes\"\n+ linker_section_placement_file=\"flash_placement.xml\"\n+ linker_section_placement_macros=\"FLASH_PH_START=0x0;FLASH_PH_SIZE=0x100000;RAM_PH_START=0x20000000;RAM_PH_SIZE=0x40000;FLASH_START=0x0;FLASH_SIZE=0x100000;RAM_START=0x20000000;RAM_SIZE=0x40000\"\n+ linker_section_placements_segments=\"FLASH RX 0x0 0x100000;RAM RWX 0x20000000 0x40000\"\n+ macros=\"CMSIS_CONFIG_TOOL=../../../bsp/boards/nrf52840/sdk/external_tools/cmsisconfig/CMSIS_Configuration_Wizard.jar\"\n+ project_directory=\"\"\n+ project_type=\"Executable\" />\n+ <folder Name=\"Application\">\n+ <file file_name=\"../../../bsp/boards/nrf52840/app_config.h\" />\n+ <file file_name=\"../../../projects/common/03oos_macpong/03oos_macpong.c\" />\n+ </folder>\n+ <folder Name=\"Segger ES Specific\">\n+ <file file_name=\"../../../bsp/boards/nrf52840/sdk/modules/nrfx/mdk/ses_nRF_Startup.s\" />\n+ <file file_name=\"../../../bsp/boards/nrf52840/sdk/modules/nrfx/mdk/ses_nrf52840_Vectors.s\" />\n+ <file file_name=\"../../../bsp/boards/nrf52840/sdk/modules/nrfx/mdk/system_nrf52840.c\" />\n+ <folder Name=\"Segger Startup Files\">\n+ <file file_name=\"$(StudioDir)/source/thumb_crt0.s\" />\n+ </folder>\n+ </folder>\n+ <folder Name=\"OpenWSN\">\n+ <folder Name=\"bsp\">\n+ <file file_name=\"../../../bsp/boards/nrf52840/board.c\" />\n+ <file file_name=\"../../../bsp/boards/nrf52840/board_info.h\" />\n+ <file file_name=\"../../../bsp/boards/nrf52840/debugpins.c\" />\n+ <file file_name=\"../../../bsp/boards/nrf52840/eui64.c\" />\n+ <file file_name=\"../../../bsp/boards/nrf52840/leds.c\" />\n+ <file file_name=\"../../../bsp/boards/nrf52840/radio.c\" />\n+ <file file_name=\"../../../bsp/boards/nrf52840/sctimer.c\" />\n+ <file file_name=\"../../../bsp/boards/nrf52840/spi.c\" />\n+ <file file_name=\"../../../bsp/boards/nrf52840/uart.c\" />\n+ <file file_name=\"../../../bsp/boards/board.h\" />\n+ <file file_name=\"../../../bsp/boards/cryptoengine.h\" />\n+ <file file_name=\"../../../bsp/boards/debugpins.h\" />\n+ <file file_name=\"../../../bsp/boards/eui64.h\" />\n+ <file file_name=\"../../../bsp/boards/i2c.h\" />\n+ <file file_name=\"../../../bsp/boards/leds.h\" />\n+ <file file_name=\"../../../bsp/boards/radio.h\" />\n+ <file file_name=\"../../../bsp/boards/sctimer.h\" />\n+ <file file_name=\"../../../bsp/boards/sensors.h\" />\n+ <file file_name=\"../../../bsp/boards/spi.h\" />\n+ <file file_name=\"../../../bsp/boards/toolchain_defs.h\" />\n+ <file file_name=\"../../../bsp/boards/uart.h\" />\n+ <file file_name=\"../../../bsp/boards/nrf52840/cryptoengine.c\" />\n+ <file file_name=\"../../../bsp/boards/nrf52840/adc_sensor.c\" />\n+ <file file_name=\"../../../bsp/boards/nrf52840/i2c.c\" />\n+ <file file_name=\"../../../bsp/boards/nrf52840/sensors.c\" />\n+ </folder>\n+ <folder Name=\"kernel\">\n+ <file file_name=\"../../../kernel/openos/scheduler.c\" />\n+ </folder>\n+ <folder Name=\"openstack\">\n+ <file file_name=\"../../../openstack/openstack.c\" />\n+ <file file_name=\"../../../openstack/cross-layers/idmanager.c\" />\n+ <file file_name=\"../../../openstack/cross-layers/openqueue.c\" />\n+ <file file_name=\"../../../openstack/02b-MAChigh/msf.c\" />\n+ <file file_name=\"../../../openstack/02b-MAChigh/neighbors.c\" />\n+ <file file_name=\"../../../openstack/02b-MAChigh/schedule.c\" />\n+ <file file_name=\"../../../openstack/02b-MAChigh/sixtop.c\" />\n+ <file file_name=\"../../../openstack/02a-MAClow/adaptive_sync.c\" />\n+ <file file_name=\"../../../openstack/02a-MAClow/IEEE802154.c\" />\n+ <file file_name=\"../../../openstack/02a-MAClow/IEEE802154_security.c\" />\n+ <file file_name=\"../../../openstack/02a-MAClow/IEEE802154E.c\" />\n+ <file file_name=\"../../../openstack/02a-MAClow/topology.c\" />\n+ <file file_name=\"../../../openstack/cross-layers/openrandom.c\" />\n+ <file file_name=\"../../../openstack/cross-layers/packetfunctions.c\" />\n+ </folder>\n+ <folder Name=\"drivers\">\n+ <file file_name=\"../../../drivers/common/openserial.c\" />\n+ <file file_name=\"../../../drivers/common/opentimers.c\" />\n+ <file file_name=\"../../../drivers/common/openhdlc.c\" />\n+ </folder>\n+ </folder>\n+ <folder Name=\"Nordic SDK15 Specific\">\n+ <folder Name=\"nRF_Drivers\">\n+ <file file_name=\"../../../bsp/boards/nrf52840/sdk/integration/nrfx/legacy/nrf_drv_spi.c\" />\n+ <file file_name=\"../../../bsp/boards/nrf52840/sdk/integration/nrfx/legacy/nrf_drv_uart.c\" />\n+ <file file_name=\"../../../bsp/boards/nrf52840/sdk/modules/nrfx/drivers/src/nrfx_spi.c\" />\n+ <file file_name=\"../../../bsp/boards/nrf52840/sdk/modules/nrfx/drivers/src/nrfx_uart.c\" />\n+ <file file_name=\"../../../bsp/boards/nrf52840/sdk/modules/nrfx/drivers/src/nrfx_clock.c\" />\n+ <file file_name=\"../../../bsp/boards/nrf52840/sdk/components/libraries/experimental_section_vars/nrf_section_iter.c\" />\n+ <file file_name=\"../../../bsp/boards/nrf52840/sdk/components/libraries/pwr_mgmt/nrf_pwr_mgmt.c\" />\n+ <file file_name=\"../../../bsp/boards/nrf52840/sdk/components/libraries/uart/app_uart.c\" />\n+ <file file_name=\"../../../bsp/boards/nrf52840/sdk/components/libraries/util/app_util_platform.c\" />\n+ <file file_name=\"../../../bsp/boards/nrf52840/sdk/integration/nrfx/legacy/nrf_drv_clock.c\" />\n+ <file file_name=\"../../../bsp/boards/nrf52840/sdk/modules/nrfx/drivers/src/nrfx_power.c\" />\n+ <file file_name=\"../../../bsp/boards/nrf52840/sdk/components/libraries/util/nrf_assert.c\" />\n+ <file file_name=\"../../../bsp/boards/nrf52840/sdk/components/libraries/util/app_error.c\" />\n+ <file file_name=\"../../../bsp/boards/nrf52840/sdk/components/libraries/util/app_error_handler_gcc.c\" />\n+ <file file_name=\"../../../bsp/boards/nrf52840/sdk/components/libraries/util/app_error_weak.c\" />\n+ <file file_name=\"../../../bsp/boards/nrf52840/sdk/components/libraries/strerror/nrf_strerror.c\" />\n+ <file file_name=\"../../../bsp/boards/nrf52840/nrfx_rtc_hack.c\" />\n+ <file file_name=\"../../../bsp/boards/nrf52840/sdk/modules/nrfx/drivers/src/nrfx_twi.c\" />\n+ <file file_name=\"../../../bsp/boards/nrf52840/sdk/modules/nrfx/drivers/src/nrfx_systick.c\" />\n+ <file file_name=\"../../../bsp/boards/nrf52840/sdk/modules/nrfx/drivers/src/nrfx_saadc.c\" />\n+ </folder>\n+ <folder Name=\"nRF_Libraries\" />\n+ <folder Name=\"Board Definition\">\n+ <file file_name=\"../../../bsp/boards/nrf52840/sdk/components/boards/boards.c\" />\n+ </folder>\n+ <folder Name=\"CMSIS DSP\">\n+ <file file_name=\"../../../bsp/boards/nrf52840/sdk/components/toolchain/cmsis/include/arm_math.h\" />\n+ <file file_name=\"../../../bsp/boards/nrf52840/sdk/components/toolchain/cmsis/include/core_cm4.h\" />\n+ </folder>\n+ </folder>\n+ <configuration Name=\"Debug\" gcc_optimization_level=\"None\" />\n+ <configuration Name=\"Release\" gcc_optimization_level=\"Level 3\" />\n+ </project>\n+ <configuration\n+ Name=\"Release\"\n+ c_preprocessor_definitions=\"NDEBUG\"\n+ gcc_optimization_level=\"Optimize For Size\" />\n+ <configuration\n+ Name=\"Debug\"\n+ c_preprocessor_definitions=\"DEBUG; DEBUG_NRF\"\n+ gcc_optimization_level=\"None\" />\n+</solution>\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "projects/nrf52840/03oos_macpong/flash_placement.xml",
"diff": "+<!DOCTYPE Linker_Placement_File>\n+<Root name=\"Flash Section Placement\">\n+ <MemorySegment name=\"FLASH\" start=\"$(FLASH_PH_START)\" size=\"$(FLASH_PH_SIZE)\">\n+ <ProgramSection alignment=\"0x100\" load=\"Yes\" name=\".vectors\" start=\"$(FLASH_START)\" />\n+ <ProgramSection alignment=\"4\" load=\"Yes\" name=\".init\" />\n+ <ProgramSection alignment=\"4\" load=\"Yes\" name=\".init_rodata\" />\n+ <ProgramSection alignment=\"4\" load=\"Yes\" name=\".text\" />\n+ <ProgramSection alignment=\"4\" keep=\"Yes\" load=\"Yes\" name=\".log_const_data\" inputsections=\"*(SORT(.log_const_data*))\" address_symbol=\"__start_log_const_data\" end_symbol=\"__stop_log_const_data\" />\n+ <ProgramSection alignment=\"4\" keep=\"Yes\" load=\"Yes\" name=\".nrf_balloc\" inputsections=\"*(.nrf_balloc*)\" address_symbol=\"__start_nrf_balloc\" end_symbol=\"__stop_nrf_balloc\" />\n+ <ProgramSection alignment=\"4\" keep=\"Yes\" load=\"No\" name=\".nrf_sections\" address_symbol=\"__start_nrf_sections\" />\n+ <ProgramSection alignment=\"4\" keep=\"Yes\" load=\"Yes\" name=\".log_dynamic_data\" inputsections=\"*(SORT(.log_dynamic_data*))\" runin=\".log_dynamic_data_run\"/>\n+ <ProgramSection alignment=\"4\" load=\"Yes\" name=\".dtors\" />\n+ <ProgramSection alignment=\"4\" load=\"Yes\" name=\".ctors\" />\n+ <ProgramSection alignment=\"4\" load=\"Yes\" name=\".rodata\" />\n+ <ProgramSection alignment=\"4\" load=\"Yes\" name=\".ARM.exidx\" address_symbol=\"__exidx_start\" end_symbol=\"__exidx_end\" />\n+ <ProgramSection alignment=\"4\" load=\"Yes\" runin=\".fast_run\" name=\".fast\" />\n+ <ProgramSection alignment=\"4\" load=\"Yes\" runin=\".data_run\" name=\".data\" />\n+ <ProgramSection alignment=\"4\" load=\"Yes\" runin=\".tdata_run\" name=\".tdata\" />\n+ <ProgramSection alignment=\"4\" load=\"Yes\" name=\".pwr_mgmt_data\" address_symbol=\"__start_pwr_mgmt_data\" end_symbol=\"__stop_pwr_mgmt_data\" />\n+ </MemorySegment>\n+ <MemorySegment name=\"RAM\" start=\"$(RAM_PH_START)\" size=\"$(RAM_PH_SIZE)\">\n+ <ProgramSection alignment=\"0x100\" load=\"No\" name=\".vectors_ram\" start=\"$(RAM_START)\" address_symbol=\"__app_ram_start__\"/>\n+ <ProgramSection alignment=\"4\" keep=\"Yes\" load=\"No\" name=\".nrf_sections_run\" address_symbol=\"__start_nrf_sections_run\" />\n+ <ProgramSection alignment=\"4\" keep=\"Yes\" load=\"No\" name=\".log_dynamic_data_run\" address_symbol=\"__start_log_dynamic_data\" end_symbol=\"__stop_log_dynamic_data\" />\n+ <ProgramSection alignment=\"4\" keep=\"Yes\" load=\"No\" name=\".nrf_sections_run_end\" address_symbol=\"__end_nrf_sections_run\" />\n+ <ProgramSection alignment=\"4\" load=\"No\" name=\".fast_run\" />\n+ <ProgramSection alignment=\"4\" load=\"No\" name=\".data_run\" />\n+ <ProgramSection alignment=\"4\" load=\"No\" name=\".tdata_run\" />\n+ <ProgramSection alignment=\"4\" load=\"No\" name=\".bss\" />\n+ <ProgramSection alignment=\"4\" load=\"No\" name=\".tbss\" />\n+ <ProgramSection alignment=\"4\" load=\"No\" name=\".non_init\" />\n+ <ProgramSection alignment=\"4\" size=\"__HEAPSIZE__\" load=\"No\" name=\".heap\" />\n+ <ProgramSection alignment=\"8\" size=\"__STACKSIZE__\" load=\"No\" place_from_segment_end=\"Yes\" name=\".stack\" address_symbol=\"__StackLimit\" end_symbol=\"__StackTop\"/>\n+ <ProgramSection alignment=\"8\" size=\"__STACKSIZE_PROCESS__\" load=\"No\" name=\".stack_process\" />\n+ </MemorySegment>\n+</Root>\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-751. add 03macpong_project.
|
491,595 |
10.04.2020 17:46:36
| -7,200 |
5ae60ca0c4a8a4c632292d43763dfdb5a2f77f0d
|
remove DAGROOT definitions.
|
[
{
"change_type": "MODIFY",
"old_path": "projects/nrf52840/03oos_openwsn/03oos_openwsn_DK.emProject",
"new_path": "projects/nrf52840/03oos_openwsn/03oos_openwsn_DK.emProject",
"diff": "<!DOCTYPE CrossStudio_Project_File>\n-<solution\n- Name=\"nordicopenwsn_03oos_openwsn_pca10056\"\n- target=\"8\"\n- version=\"2\">\n- <project Name=\"nordicopenwsn_03oos_openwsn_pca10056\">\n+<solution Name=\"03oos_openwsn\" target=\"8\" version=\"2\">\n+ <project Name=\"03oos_openwsn\">\n<configuration\nName=\"Common\"\narm_architecture=\"v7EM\"\narm_simulator_memory_simulation_parameter=\"RWX 00000000,00100000,FFFFFFFF;RWX 20000000,00010000,CDCDCDCD\"\narm_target_device_name=\"nRF52840_xxAA\"\narm_target_interface_type=\"SWD\"\n- c_preprocessor_definitions=\"BSP_DEFINES_ONLY;FLOAT_ABI_HARD;INITIALIZE_USER_SECTIONS;NO_VTOR_CONFIG;ARM_MATH_CM4;__FPU_PRESENT=1;USE_APP_CONFIG=1;NRF52840_XXAA=1;BOARD_PCA10056=1;CONFIG_GPIO_AS_PINRESET=1;DAGROOT=1\"\n+ c_preprocessor_definitions=\"BSP_DEFINES_ONLY;FLOAT_ABI_HARD;INITIALIZE_USER_SECTIONS;NO_VTOR_CONFIG;ARM_MATH_CM4;__FPU_PRESENT=1;USE_APP_CONFIG=1;NRF52840_XXAA=1;BOARD_PCA10056=1;CONFIG_GPIO_AS_PINRESET=1\"\nc_user_include_directories=\"../../../drivers/common;../../../inc;../../../kernel;../../../openapps;../../../openapps/c6t;../../../openapps/cinfo;../../../openapps/cjoin;../../../openapps/cleds;../../../openapps/cwellknown;../../../openapps/opencoap;../../../openapps/rrt;../../../openapps/uecho;../../../openapps/uexpiration;../../../openapps/uexpiration_monitor;../../../openapps/uinject;../../../openapps/userialbridge;../../../openstack;../../../openstack/02a-MAClow;../../../openstack/02b-MAChigh;../../../openstack/03a-IPHC;../../../openstack/03b-IPv6;../../../openstack/04-TRAN;../../../openstack/cross-layers;../../../bsp/boards/nrf52840;../../../bsp/boards/nrf52840/sdk/config/nrf52840/config;../../../bsp/boards/nrf52840/sdk/integration/nrfx;../../../bsp/boards/nrf52840/sdk/components/toolchain/cmsis/include;../../../bsp/boards/nrf52840/sdk/components/drivers_nrf/nrf_soc_nosd;../../../bsp/boards/nrf52840/sdk/components/libraries/atomic;../../../bsp/boards/nrf52840/sdk/components/libraries/balloc;../../../bsp/boards/nrf52840/sdk/components/libraries/delay;../../../bsp/boards/nrf52840/sdk/components/libraries/experimental_log;../../../bsp/boards/nrf52840/sdk/components/libraries/experimental_log/src;../../../bsp/boards/nrf52840/sdk/components/libraries/experimental_memobj;../../../bsp/boards/nrf52840/sdk/components/libraries/experimental_section_vars;../../../bsp/boards/nrf52840/sdk/components/libraries/mutex;../../../bsp/boards/nrf52840/sdk/components/libraries/strerror;../../../bsp/boards/nrf52840/sdk/components/libraries/uart;../../../bsp/boards/nrf52840/sdk/components/libraries/util;../../../bsp/boards/nrf52840/sdk/integration/nrfx/legacy;../../../bsp/boards/nrf52840/sdk/modules/nrfx;../../../bsp/boards/nrf52840/sdk/modules/nrfx/drivers;../../../bsp/boards/nrf52840/sdk/modules/nrfx/drivers/include;../../../bsp/boards/nrf52840/sdk/modules/nrfx/drivers/src;../../../bsp/boards/nrf52840/sdk/modules/nrfx/drivers/src/prs;../../../bsp/boards/nrf52840/sdk/modules/nrfx/hal;../../../bsp/boards/nrf52840/sdk/modules/nrfx/mdk;../../../bsp/boards/nrf52840/sdk/modules/nrfx/soc;../../../bsp/boards/nrf52840/sdk/modules/nrfx/templates;../../../bsp/boards/nrf52840/sdk/components/drivers_nrf/radio_config;../../../bsp/boards\"\ndebug_register_definition_file=\"../../../bsp/boards/nrf52840/sdk/modules/nrfx/mdk/nrf52840.svd\"\ndebug_start_from_entry_point_symbol=\"No\"\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-751. remove DAGROOT definitions.
|
491,595 |
12.04.2020 23:13:20
| -7,200 |
d1ba672dd3431506bf565032eb713118e67708f6
|
add folders for each layers.
|
[
{
"change_type": "MODIFY",
"old_path": "projects/nrf52840/03oos_openwsn/03oos_openwsn_DK.emProject",
"new_path": "projects/nrf52840/03oos_openwsn/03oos_openwsn_DK.emProject",
"diff": "<file file_name=\"../../../kernel/openos/scheduler.c\" />\n</folder>\n<folder Name=\"openstack\">\n- <file file_name=\"../../../openstack/openstack.c\" />\n- <file file_name=\"../../../openstack/cross-layers/idmanager.c\" />\n- <file file_name=\"../../../openstack/03b-IPv6/icmpv6rpl.c\" />\n- <file file_name=\"../../../openstack/03a-IPHC/openbridge.c\" />\n- <file file_name=\"../../../openstack/04-TRAN/openudp.c\" />\n- <file file_name=\"../../../openstack/cross-layers/openqueue.c\" />\n- <file file_name=\"../../../openstack/02b-MAChigh/msf.c\" />\n- <file file_name=\"../../../openstack/02b-MAChigh/neighbors.c\" />\n- <file file_name=\"../../../openstack/02b-MAChigh/schedule.c\" />\n- <file file_name=\"../../../openstack/02b-MAChigh/sixtop.c\" />\n+ <folder Name=\"02a-MAClow\">\n<file file_name=\"../../../openstack/02a-MAClow/adaptive_sync.c\" />\n<file file_name=\"../../../openstack/02a-MAClow/IEEE802154.c\" />\n<file file_name=\"../../../openstack/02a-MAClow/IEEE802154_security.c\" />\n<file file_name=\"../../../openstack/02a-MAClow/IEEE802154E.c\" />\n<file file_name=\"../../../openstack/02a-MAClow/topology.c\" />\n+ </folder>\n+ <folder Name=\"02b-MAChigh\">\n+ <file file_name=\"../../../openstack/02b-MAChigh/msf.c\" />\n+ <file file_name=\"../../../openstack/02b-MAChigh/neighbors.c\" />\n+ <file file_name=\"../../../openstack/02b-MAChigh/sixtop.c\" />\n+ <file file_name=\"../../../openstack/02b-MAChigh/schedule.c\" />\n+ </folder>\n+ <folder Name=\"03a-IPHC\">\n+ <file file_name=\"../../../openstack/03a-IPHC/frag.c\" />\n<file file_name=\"../../../openstack/03a-IPHC/iphc.c\" />\n+ <file file_name=\"../../../openstack/03a-IPHC/openbridge.c\" />\n+ </folder>\n+ <folder Name=\"03b-IPv6\">\n<file file_name=\"../../../openstack/03b-IPv6/forwarding.c\" />\n<file file_name=\"../../../openstack/03b-IPv6/icmpv6.c\" />\n<file file_name=\"../../../openstack/03b-IPv6/icmpv6echo.c\" />\n+ <file file_name=\"../../../openstack/03b-IPv6/icmpv6rpl.c\" />\n+ </folder>\n+ <folder Name=\"04-TRAN\">\n+ <file file_name=\"../../../openstack/04-TRAN/openudp.c\" />\n+ </folder>\n+ <folder Name=\"cross-layers\">\n+ <file file_name=\"../../../openstack/cross-layers/idmanager.c\" />\n+ <file file_name=\"../../../openstack/cross-layers/openqueue.c\" />\n<file file_name=\"../../../openstack/cross-layers/openrandom.c\" />\n<file file_name=\"../../../openstack/cross-layers/packetfunctions.c\" />\n- <file file_name=\"../../../openstack/03a-IPHC/frag.c\" />\n+ </folder>\n+ <file file_name=\"../../../openstack/openstack.c\" />\n</folder>\n<folder Name=\"drivers\">\n<file file_name=\"../../../drivers/common/openserial.c\" />\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-751. add folders for each layers.
|
491,595 |
13.04.2020 21:38:06
| -7,200 |
db0ffba041c36c17bc388548f27681b100cf1344
|
fix the uart communication error (ERRORSRC=1 (runover))
|
[
{
"change_type": "MODIFY",
"old_path": "bsp/boards/nrf52840/sdk/modules/nrfx/drivers/src/nrfx_uart.c",
"new_path": "bsp/boards/nrf52840/sdk/modules/nrfx/drivers/src/nrfx_uart.c",
"diff": "@@ -639,11 +639,11 @@ static void uart_irq_handler(NRF_UART_Type * p_uart,\n}\n}\n-#if NRFX_CHECK(NRFX_UART0_ENABLED)\n-void nrfx_uart_0_irq_handler(void)\n-{\n- uart_irq_handler(NRF_UART0, &m_cb[NRFX_UART0_INST_IDX]);\n-}\n-#endif\n+//#if NRFX_CHECK(NRFX_UART0_ENABLED)\n+//void nrfx_uart_0_irq_handler(void)\n+//{\n+// uart_irq_handler(NRF_UART0, &m_cb[NRFX_UART0_INST_IDX]);\n+//}\n+//#endif\n#endif // NRFX_CHECK(NRFX_UART_ENABLED)\n"
},
{
"change_type": "MODIFY",
"old_path": "bsp/boards/nrf52840/uart.c",
"new_path": "bsp/boards/nrf52840/uart.c",
"diff": "#include \"sdk/modules/nrfx/hal/nrf_uart.h\"\n#include \"sdk/integration/nrfx/legacy/nrf_drv_clock.h\"\n#include \"sdk/modules/nrfx/drivers/include/nrfx_systick.h\"\n+#include \"sdk/modules/nrfx/mdk/nrf52840_bitfields.h\"\n+#include \"sdk/modules/nrfx/mdk/nrf52840.h\"\n#include \"board.h\"\n#include \"leds.h\"\n#define CTS_PIN_NUMBER UART_PIN_DISCONNECTED\n#endif\n+#define NRF_GPIO_PIN_MAP(port, pin) (((port) << 5) | ((pin) & 0x1F))\n+\n+#define UART_RX_PIN NRF_GPIO_PIN_MAP(0,8) // p0.08\n+#define UART_TX_PIN NRF_GPIO_PIN_MAP(0,6) // p0.06\n+#define UART_CTS_PIN NRF_GPIO_PIN_MAP(0,7) // p0.07\n+#define UART_RTS_PIN NRF_GPIO_PIN_MAP(0,5) // p0.05\n+\n+#define UART_BAUDRATE_115200 0x01D7E000 // Baud 115200\n+#define UART_BAUDRATE_1M 0x10000000 // Baud 1M\n+\n+#define UART_PRIORITY 2\n+\n+#define UART_INTEN_RXDRDY_POS 2\n+#define UART_INTEN_TXDRDY_POS 7\n+\n+#define UART_CONFIG_PARITY 0 // excluded\n+#define UART_CONFIG_PARITY_POS 1\n+#define UART_CONFIG_HWFC 0\n+#define UART_CONFIG_HWFC_POS 0\n//=========================== variables =======================================\n@@ -109,7 +130,55 @@ void uart_init(void) {\nwhile ((!nrf_drv_clock_hfclk_is_running()) && (!nrfx_systick_test(&systick_time, hfclk_request_timeout_us))) {}\n}\n- uart_reinit();\n+// configure txd and rxd pin\n+ NRF_P0->OUTSET = 1 << UART_TX_PIN;\n+\n+ // tx pin configured as output\n+ NRF_P0->PIN_CNF[UART_TX_PIN] = \\\n+ ((uint32_t)GPIO_PIN_CNF_DIR_Output << GPIO_PIN_CNF_DIR_Pos)\n+ | ((uint32_t)GPIO_PIN_CNF_INPUT_Disconnect << GPIO_PIN_CNF_INPUT_Pos)\n+ | ((uint32_t)GPIO_PIN_CNF_PULL_Disabled << GPIO_PIN_CNF_PULL_Pos)\n+ | ((uint32_t)GPIO_PIN_CNF_DRIVE_S0S1 << GPIO_PIN_CNF_DRIVE_Pos)\n+ | ((uint32_t)GPIO_PIN_CNF_SENSE_Disabled << GPIO_PIN_CNF_SENSE_Pos);\n+\n+ // rx pin configured as input\n+ NRF_P0->PIN_CNF[UART_RX_PIN] = \\\n+ ((uint32_t)GPIO_PIN_CNF_DIR_Input << GPIO_PIN_CNF_DIR_Pos)\n+ | ((uint32_t)GPIO_PIN_CNF_INPUT_Connect << GPIO_PIN_CNF_INPUT_Pos)\n+ | ((uint32_t)GPIO_PIN_CNF_PULL_Disabled << GPIO_PIN_CNF_PULL_Pos)\n+ | ((uint32_t)GPIO_PIN_CNF_DRIVE_S0S1 << GPIO_PIN_CNF_DRIVE_Pos)\n+ | ((uint32_t)GPIO_PIN_CNF_SENSE_Disabled << GPIO_PIN_CNF_SENSE_Pos);\n+\n+ // configure uart\n+ NRF_UART0->BAUDRATE = (uint32_t)(UART_BAUDRATE_115200);\n+ NRF_UART0->CONFIG =\n+ (uint32_t)(UART_CONFIG_PARITY << UART_CONFIG_PARITY_POS)\n+ | (uint32_t)(UART_CONFIG_HWFC << UART_CONFIG_HWFC_POS);\n+ NRF_UART0->PSEL.RXD = (uint32_t)UART_RX_PIN;\n+ NRF_UART0->PSEL.TXD = (uint32_t)UART_TX_PIN;\n+\n+ // enable UART rx done ready and tx done ready interrupts\n+\n+ NRF_UART0->INTENSET =\n+ (uint32_t)(1<<UART_INTEN_RXDRDY_POS)\n+ | (uint32_t)(1<<UART_INTEN_TXDRDY_POS);\n+\n+ // set priority and enable interrupt in NVIC\n+ NVIC->IP[((uint32_t)UARTE0_UART0_IRQn)] =\n+ (uint8_t)(\n+ (\n+ UART_PRIORITY << (8 - __NVIC_PRIO_BITS)\n+ ) & (uint32_t)0xff\n+ );\n+ NVIC->ISER[((uint32_t)UARTE0_UART0_IRQn)>>5] =\n+ ((uint32_t)1) << ( ((uint32_t)UARTE0_UART0_IRQn) & 0x1f);\n+\n+ // enable uart\n+ NRF_UART0->ENABLE = (uint32_t)UART_ENABLE_ENABLE_Enabled;\n+\n+ // start to tx and rx\n+ NRF_UART0->TASKS_STARTTX = (uint32_t)1;\n+ NRF_UART0->TASKS_STARTRX = (uint32_t)1;\n}\nvoid uart_setCallbacks(uart_tx_cbt txCb, uart_rx_cbt rxCb) {\n@@ -118,11 +187,10 @@ void uart_setCallbacks(uart_tx_cbt txCb, uart_rx_cbt rxCb) {\n}\nvoid uart_enableInterrupts(void) {\n- nrf_uart_int_enable(NRF_UART0, NRF_UART_INT_MASK_TXDRDY | NRF_UART_INT_MASK_RXDRDY);\n-}\n-void uart_disableInterrupts(void) {\n- nrf_uart_int_disable(NRF_UART0, NRF_UART_INT_MASK_TXDRDY | NRF_UART_INT_MASK_RXDRDY);\n+ NRF_UART0->INTENSET =\n+ (uint32_t)(1<<UART_INTEN_RXDRDY_POS)\n+ | (uint32_t)(1<<UART_INTEN_TXDRDY_POS);\n}\nvoid uart_clearRxInterrupts(void) {\n@@ -136,10 +204,11 @@ void uart_clearTxInterrupts(void) {\n}\nvoid uart_setCTS(bool state) {\n+\nif (state==0x01) {\n- app_uart_put(XON);\n+ NRF_UART0->TXD = XON;\n} else {\n- app_uart_put(XOFF);\n+ NRF_UART0->TXD = XOFF;\n}\n}\n@@ -148,46 +217,46 @@ void uart_writeByte(uint8_t byteToWrite) {\nif (byteToWrite==XON || byteToWrite==XOFF || byteToWrite==XONXOFF_ESCAPE) {\nuart_vars.fXonXoffEscaping = 0x01;\nuart_vars.xonXoffEscapedByte = byteToWrite;\n- app_uart_put(XONXOFF_ESCAPE);\n+ NRF_UART0->TXD = XONXOFF_ESCAPE;\n} else {\n- app_uart_put(byteToWrite);\n+ NRF_UART0->TXD = byteToWrite;\n}\n}\nuint8_t uart_readByte(void) {\n- uint8_t newChar;\n- app_uart_get(&newChar);\n- return (newChar);\n+\n+ return NRF_UART0->RXD;\n}\n-//=========================== interrupt handlers ==============================\n+//=========================== private =========================================\n-void uart_event_handler(app_uart_evt_t * p_event) {\n+void UARTE0_UART0_IRQHandler(void) {\ndebugpins_isr_set();\n- if (\n- (p_event->evt_type == APP_UART_DATA) ||\n- (p_event->evt_type == APP_UART_DATA_READY)\n- ) {\n- // RX data has been received\n+ if (NRF_UART0->EVENTS_RXDRDY) {\n+\n+ NRF_UART0->EVENTS_RXDRDY = (uint32_t)0;\nuart_rx_isr();\n- } else if (p_event->evt_type == APP_UART_TX_EMPTY) {\n- // TX data has been sent\n+ }\n+\n+\n+ if (NRF_UART0->EVENTS_TXDRDY) {\n+\n+ NRF_UART0->EVENTS_TXDRDY = (uint32_t)0;\nuart_tx_isr();\n}\ndebugpins_isr_clr();\n}\n+//=========================== interrupt handlers ==============================\nkick_scheduler_t uart_tx_isr(void) {\n- uart_clearTxInterrupts();\n-\nif (uart_vars.fXonXoffEscaping==0x01) {\nuart_vars.fXonXoffEscaping = 0x00;\n- app_uart_put(uart_vars.xonXoffEscapedByte^XONXOFF_MASK);\n+ NRF_UART0->TXD = uart_vars.xonXoffEscapedByte^XONXOFF_MASK;\n} else {\nif (uart_vars.txCb != NULL){\nuart_vars.txCb();\n@@ -200,8 +269,6 @@ kick_scheduler_t uart_tx_isr(void) {\nkick_scheduler_t uart_rx_isr(void) {\n- uart_clearRxInterrupts();\n-\nif (uart_vars.rxCb != NULL){\nuart_vars.rxCb();\nreturn KICK_SCHEDULER;\n@@ -209,8 +276,4 @@ kick_scheduler_t uart_rx_isr(void) {\nreturn DO_NOT_KICK_SCHEDULER;\n}\n-\n-void app_error_fault_handler(uint32_t id, uint32_t pc, uint32_t info) {\n- // handle error ...\n-}\n#endif // UART_DISABLED\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-751. fix the uart communication error (ERRORSRC=1 (runover))
|
491,595 |
13.04.2020 21:42:20
| -7,200 |
07c34b9c9ae68d4551136989deb785caa0d2a046
|
update openwsn project
|
[
{
"change_type": "MODIFY",
"old_path": "projects/nrf52840/03oos_openwsn/03oos_openwsn_DK.emProject",
"new_path": "projects/nrf52840/03oos_openwsn/03oos_openwsn_DK.emProject",
"diff": "<folder Name=\"OpenWSN\">\n<folder Name=\"bsp\">\n<file file_name=\"../../../bsp/boards/nrf52840/board.c\" />\n- <file file_name=\"../../../bsp/boards/nrf52840/board_info.h\" />\n<file file_name=\"../../../bsp/boards/nrf52840/debugpins.c\" />\n<file file_name=\"../../../bsp/boards/nrf52840/eui64.c\" />\n<file file_name=\"../../../bsp/boards/nrf52840/leds.c\" />\n<file file_name=\"../../../bsp/boards/nrf52840/adc_sensor.c\" />\n<file file_name=\"../../../bsp/boards/nrf52840/i2c.c\" />\n<file file_name=\"../../../bsp/boards/nrf52840/sensors.c\" />\n+ <file file_name=\"../../../bsp/boards/nrf52840/board_info.h\" />\n</folder>\n<folder Name=\"kernel\">\n<file file_name=\"../../../kernel/openos/scheduler.c\" />\n<configuration Name=\"Debug\" build_exclude_from_build=\"Yes\" />\n</file>\n<file file_name=\"../../../openapps/cinfo/cinfo.c\">\n- <configuration Name=\"Debug\" build_exclude_from_build=\"Yes\" />\n+ <configuration Name=\"Debug\" build_exclude_from_build=\"No\" />\n</file>\n<file file_name=\"../../../openapps/cjoin/cjoin.c\">\n- <configuration Name=\"Debug\" build_exclude_from_build=\"Yes\" />\n+ <configuration Name=\"Debug\" build_exclude_from_build=\"No\" />\n</file>\n<file file_name=\"../../../openapps/cleds/cleds.c\">\n- <configuration Name=\"Debug\" build_exclude_from_build=\"Yes\" />\n+ <configuration Name=\"Debug\" build_exclude_from_build=\"No\" />\n</file>\n<file file_name=\"../../../openapps/cwellknown/cwellknown.c\">\n- <configuration Name=\"Debug\" build_exclude_from_build=\"Yes\" />\n- </file>\n- <file file_name=\"../../../openapps/opencoap/opencoap.c\">\n- <configuration Name=\"Debug\" build_exclude_from_build=\"Yes\" />\n+ <configuration Name=\"Debug\" build_exclude_from_build=\"No\" />\n</file>\n<file file_name=\"../../../openapps/rrt/rrt.c\">\n<configuration Name=\"Debug\" build_exclude_from_build=\"Yes\" />\n<file file_name=\"../../../openapps/userialbridge/userialbridge.c\">\n<configuration Name=\"Debug\" build_exclude_from_build=\"Yes\" />\n</file>\n+ <file file_name=\"../../../openapps/cjoin/cojp_cbor.c\" />\n+ <folder Name=\"opencoap\">\n+ <file file_name=\"../../../openapps/opencoap/cborencoder.c\">\n+ <configuration Name=\"Debug\" build_exclude_from_build=\"No\" />\n+ </file>\n<file file_name=\"../../../openapps/opencoap/openoscoap.c\">\n- <configuration Name=\"Debug\" build_exclude_from_build=\"Yes\" />\n+ <configuration Name=\"Debug\" build_exclude_from_build=\"No\" />\n</file>\n- <file file_name=\"../../../openapps/opencoap/cborencoder.c\">\n- <configuration Name=\"Debug\" build_exclude_from_build=\"Yes\" />\n+ <file file_name=\"../../../openapps/opencoap/opencoap.c\">\n+ <configuration Name=\"Debug\" build_exclude_from_build=\"No\" />\n</file>\n+ <file file_name=\"../../../openapps/opencoap/hkdf.c\" />\n+ <file file_name=\"../../../openapps/opencoap/hmac.c\" />\n+ <file file_name=\"../../../openapps/opencoap/sha224-256.c\" />\n+ <file file_name=\"../../../openapps/opencoap/usha.c\" />\n+ </folder>\n</folder>\n</folder>\n<folder Name=\"Nordic SDK15 Specific\">\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-751. update openwsn project
|
491,595 |
13.04.2020 22:22:55
| -7,200 |
16f0abb610c425c5fa98f4a4691b80e09a1ea11e
|
add README.md for nRF52840 port.
|
[
{
"change_type": "ADD",
"old_path": null,
"new_path": "projects/nrf52840/README.md",
"diff": "+# Running OpenWSN on nRF52840\n+\n+The nRF52840 port of OpenWSN uses SEGGER Embedded Studio as its IDE.\n+The current version doesn't support the L2_security yet.\n+To run an OpenWSN network, cjoin needs to be disabled by commenting out the\n+\n+ void openapps_init(void) {\n+\n+ ...\n+ ...\n+\n+ // cjoin_init();\n+\n+ ...\n+ ...\n+ }\n+\n+in [openapp.c](https://github.com/openwsn-berkeley/openwsn-fw/blob/develop/openapps/openapps.c#L40) file.\n\\ No newline at end of file\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-751. add README.md for nRF52840 port.
|
491,595 |
14.04.2020 13:34:31
| -7,200 |
e8839fc582146080a6f929d0afb8fef66d0c5147
|
update the uart interrupt priority.
|
[
{
"change_type": "MODIFY",
"old_path": "bsp/boards/nrf52840/uart.c",
"new_path": "bsp/boards/nrf52840/uart.c",
"diff": "#define UART_BAUDRATE_115200 0x01D7E000 // Baud 115200\n#define UART_BAUDRATE_1M 0x10000000 // Baud 1M\n-#define UART_PRIORITY 2\n-\n#define UART_INTEN_RXDRDY_POS 2\n#define UART_INTEN_TXDRDY_POS 7\n@@ -121,12 +119,8 @@ void uart_init(void) {\n| (uint32_t)(1<<UART_INTEN_TXDRDY_POS);\n// set priority and enable interrupt in NVIC\n- NVIC->IP[((uint32_t)UARTE0_UART0_IRQn)] =\n- (uint8_t)(\n- (\n- UART_PRIORITY << (8 - __NVIC_PRIO_BITS)\n- ) & (uint32_t)0xff\n- );\n+ NVIC_SetPriority(UARTE0_UART0_IRQn, NRFX_UART_DEFAULT_CONFIG_IRQ_PRIORITY);\n+\nNVIC->ISER[((uint32_t)UARTE0_UART0_IRQn)>>5] =\n((uint32_t)1) << ( ((uint32_t)UARTE0_UART0_IRQn) & 0x1f);\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-751. update the uart interrupt priority.
|
491,595 |
15.04.2020 10:25:08
| -7,200 |
e33efc8214a871295ea3254c86dc687d1e345e86
|
remove unrelated configuration.
|
[
{
"change_type": "MODIFY",
"old_path": "bsp/boards/nrf52840/radio.c",
"new_path": "bsp/boards/nrf52840/radio.c",
"diff": "@@ -88,26 +88,6 @@ void radio_init(void) {\n// set radio mode to IEEE 802.15.4\nNRF_RADIO->MODE = (RADIO_MODE_MODE_Ieee802154_250Kbit << RADIO_MODE_MODE_Pos);\n- // - - - - - - The followings may be unneeded - - - - - ->\n- // radio address config\n- NRF_RADIO->PREFIX0 =\n- ((uint32_t)swap_bits(0xC3) << 24) // Prefix byte of address 3 converted to nRF24L series format\n- | ((uint32_t)swap_bits(0xC2) << 16) // Prefix byte of address 2 converted to nRF24L series format\n- | ((uint32_t)swap_bits(0xC1) << 8) // Prefix byte of address 1 converted to nRF24L series format\n- | ((uint32_t)swap_bits(0xC0) << 0); // Prefix byte of address 0 converted to nRF24L series format\n-\n- NRF_RADIO->PREFIX1 =\n- ((uint32_t)swap_bits(0xC7) << 24) // Prefix byte of address 7 converted to nRF24L series format\n- | ((uint32_t)swap_bits(0xC6) << 16) // Prefix byte of address 6 converted to nRF24L series format\n- | ((uint32_t)swap_bits(0xC4) << 0); // Prefix byte of address 4 converted to nRF24L series format\n-\n- NRF_RADIO->BASE0 = bytewise_bitswap(0x01234567UL); // Base address for prefix 0 converted to nRF24L series format\n- NRF_RADIO->BASE1 = bytewise_bitswap(0x89ABCDEFUL); // Base address for prefix 1-7 converted to nRF24L series format\n-\n- NRF_RADIO->TXADDRESS = 0x00UL; // Set device address 0 to use when transmitting\n- NRF_RADIO->RXADDRESSES = 0x01UL; // Enable device address 0 to use to select which addresses to receive\n- // <- - - - - - - - - - until here - - - - - - - - - - - -\n-\n// set config field length to 8\nNRF_RADIO->PCNF0 &= (~RADIO_PCNF0_LFLEN_Msk);\nNRF_RADIO->PCNF0 |= (((uint32_t)8) << RADIO_PCNF0_LFLEN_Pos);\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-751. remove unrelated configuration.
|
491,595 |
15.04.2020 10:45:31
| -7,200 |
340788da69e542c5f11e9b0764db0430f0640bd6
|
update drv_openserial project for nrf52840.
|
[
{
"change_type": "MODIFY",
"old_path": "projects/common/02drv_openserial/02drv_openserial.c",
"new_path": "projects/common/02drv_openserial/02drv_openserial.c",
"diff": "@@ -101,6 +101,8 @@ open_addr_t* idmanager_getMyID(uint8_t type) {\nreturn &app_vars.addr;\n}\n+void scheduler_push_task(task_cbt task_cb, task_prio_t prio){}\n+\nvoid ieee154e_getAsn(uint8_t* array) {\narray[0] = 0x00;\narray[1] = 0x01;\n"
},
{
"change_type": "MODIFY",
"old_path": "projects/nrf52840/02drv_openserial/02drv_openserial.emProject",
"new_path": "projects/nrf52840/02drv_openserial/02drv_openserial.emProject",
"diff": "<file file_name=\"../../../bsp/boards/nrf52840/sensors.c\" />\n<file file_name=\"../../../bsp/boards/nrf52840/adc_sensor.c\" />\n</folder>\n- <folder Name=\"kernel\">\n- <file file_name=\"../../../kernel/openos/scheduler.c\" />\n- </folder>\n<folder Name=\"drivers\">\n<file file_name=\"../../../drivers/common/openserial.c\" />\n<file file_name=\"../../../drivers/common/opentimers.c\" />\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-751. update drv_openserial project for nrf52840.
|
491,595 |
15.04.2020 10:59:01
| -7,200 |
b7370b697480e63d0c1ea01a38c66ae5cb35c6b7
|
remove timing template for 15ms (not used).
|
[
{
"change_type": "MODIFY",
"old_path": "openstack/02a-MAClow/IEEE802154E.h",
"new_path": "openstack/02a-MAClow/IEEE802154E.h",
"diff": "@@ -169,16 +169,6 @@ enum ieee154e_atomicdurations_enum {\nwdAckDuration = (3000/PORT_US_PER_TICK), // 3000us (measured 1000us)\n#endif\n-#if SLOTDURATION==15\n- TsTxOffset = (4000/PORT_US_PER_TICK), // 4000us\n- TsLongGT = (1300/PORT_US_PER_TICK), // 1300us\n- TsTxAckDelay = (4606/PORT_US_PER_TICK), // 4606us\n- TsShortGT = (500/PORT_US_PER_TICK), // 500us\n- wdRadioTx = (1342/PORT_US_PER_TICK), // 1342us (needs to be >delayTx) (SCuM need a larger value, 45 is tested and works)\n- wdDataDuration = (5000/PORT_US_PER_TICK), // 5000us (measured 4280us with max payload)\n- wdAckDuration = (3000/PORT_US_PER_TICK), // 3000us (measured 1000us)\n-#endif\n-\n#if SLOTDURATION==20\nTsTxOffset = (5215/PORT_US_PER_TICK), // 5215us\nTsLongGT = (1311/PORT_US_PER_TICK), // 1311us\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-751. remove timing template for 15ms (not used).
|
491,595 |
30.04.2020 12:05:10
| -7,200 |
cbcf622bd9369fcfc8455a5fb9349de2ed3c3a46
|
update opentestbed program timeout to 40 seconds.
|
[
{
"change_type": "MODIFY",
"old_path": "bootloader/openmote-cc2538/ot_program.py",
"new_path": "bootloader/openmote-cc2538/ot_program.py",
"diff": "@@ -18,7 +18,7 @@ class program_over_testbed(object):\nCMD = 'program'\n# in seconds, should be larger than the time starting from publishing message until receiving the response\n- MESSAGE_RESP_TIMEOUT = 30\n+ MESSAGE_RESP_TIMEOUT = 40\ndef __init__(self, mote, image_path):\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-875. update opentestbed program timeout to 40 seconds.
|
491,587 |
05.03.2020 10:25:02
| -3,600 |
b1153ffc73b767f136669b8e95e1e3e160610740
|
Add CoAP and cjoin to configuration file
|
[
{
"change_type": "MODIFY",
"old_path": "opencoap/applayer.c",
"new_path": "opencoap/applayer.c",
"diff": "#include \"applayer.h\"\n+#if defined(OPENWSN_COAP_C)\n#include \"coap.h\"\n+#endif\n+\n+#if defined(OPENWSN_CJOIN_C)\n#include \"cjoin.h\"\n+#endif\nvoid applayer_init() {\n+\n+#if defined(OPENWSN_COAP_C)\ncoap_init();\n+#endif\n+\n+#if defined(OPENWSN_CJOIN_C)\ncjoin_init();\n+#endif\n+\n}\n\\ No newline at end of file\n"
},
{
"change_type": "MODIFY",
"old_path": "opencoap/opencoap/coap.c",
"new_path": "opencoap/opencoap/coap.c",
"diff": "+#include \"config.h\"\n+\n+#if defined(OPENWSN_COAP_C)\n+\n#include \"opendefs.h\"\n#include \"coap.h\"\n#include \"openoscoap.h\"\n@@ -1245,3 +1249,5 @@ void coap_forward_message(OpenQueueEntry_t *msg,\nopenqueue_freePacketBuffer(outgoingPacket);\n}\n}\n+\n+#endif /* OPENWSN_COAP_C */\n"
},
{
"change_type": "MODIFY",
"old_path": "opencoap/opencoap/coap.h",
"new_path": "opencoap/opencoap/coap.h",
"diff": "\\{\n*/\n+#include \"config.h\"\n#include \"opentimers.h\"\n#include \"openudp.h\"\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-867. Add CoAP and cjoin to configuration file
|
491,587 |
05.03.2020 10:25:57
| -3,600 |
fce1312d3f1edd55cdd28047e81f6b549ec22af6
|
Update root level SConstruct and SConscript
|
[
{
"change_type": "MODIFY",
"old_path": "SConscript",
"new_path": "SConscript",
"diff": "@@ -58,7 +58,7 @@ if env['l2_security']==1:\nenv.Append(CPPDEFINES = 'L2_SECURITY_ACTIVE')\nif env['fix_channel']>=11 and env['fix_channel']<=26:\nenv.Append(CPPDEFINES = {'IEEE802154E_SINGLE_CHANNEL' : env['fix_channel']})\n-if env['msf_adapting_to_traffic']==1:\n+if env['msf_adaptive']==1:\nenv.Append(CPPDEFINES = 'MSF_ADAPTING_TO_TRAFFIC')\nif env['printf']==1:\nenv.Append(CPPDEFINES = 'OPENSERIAL_PRINTF')\n"
},
{
"change_type": "MODIFY",
"old_path": "SConstruct",
"new_path": "SConstruct",
"diff": "@@ -79,7 +79,7 @@ project:\nnoadaptivesync Do not use adaptive synchronization.\nl2_security Use hop-by-hop encryption and authentication.\n0 (off), 1 (on)\n- msf_adapting_to_traffic enable/disable MSF for adding/deleting cell to adapt to traffic\n+ msf_adaptive Enable/disable MSF for adding/deleting cell to adapt to traffic\n0 (disable), 1 (enable)\nprintf Sends the string messages to openvisualizer\n0 (off ), 1 (on, default)\n@@ -141,7 +141,7 @@ command_line_options = {\n],\n'fet_version': ['2','3'],\n'verbose': ['0','1'],\n- 'fastsim': ['1','0'],\n+ 'fastsim': ['0','1'],\n'simhost': ['amd64-linux','x86-linux','amd64-windows','x86-windows'],\n'simhostpy': [''], # No reasonable default\n'panid': [''],\n@@ -152,8 +152,8 @@ command_line_options = {\n'noadaptivesync': ['0','1'],\n'l2_security': ['0','1'],\n'fix_channel': ['0'] + map(str, range(11, 27)),\n- 'msf_adapting_to_traffic': ['0','1'],\n- 'printf': ['1','0'], # 1=on (default), 0=off\n+ 'msf_adaptive': ['0','1'],\n+ 'printf': ['0','1'],\n'deadline_option': ['0','1'],\n'ide': ['none','qtcreator'],\n'revision': ['']\n@@ -165,22 +165,6 @@ def validate_option(key, value, env):\nif value not in command_line_options[key]:\nraise ValueError(\"Unknown {0} \\\"{1}\\\". Options are {2}.\\n\\n\".format(key,value,','.join(command_line_options[key])))\n-def validate_apps(key, value, env):\n- assert key=='apps'\n- if not value.strip():\n- return\n- requestedApps = value.split(',')\n- availableApps = [f for f in os.listdir('openapps') if not os.path.isfile(os.path.join('openapps',f))]\n- unknownApps = list(set(requestedApps) - set(availableApps))\n-\n- if unknownApps:\n- raise ValueError(\n- \"Unknown app(s) {0}. Available apps are {1}.\\n\\n\".format(\n- ','.join(unknownApps),\n- ','.join(availableApps),\n- )\n- )\n-\n# Define default value for simhost option\nif os.name=='nt':\ndefaultHost = 2\n@@ -241,7 +225,7 @@ command_line_vars.AddVariables(\n(\n'fastsim', # key\n'', # help\n- command_line_options['fastsim'][0], # default\n+ command_line_options['fastsim'][1], # default\nvalidate_option, # validator\nint, # converter\n),\n@@ -316,9 +300,9 @@ command_line_vars.AddVariables(\nint, # converter\n),\n(\n- 'msf_adapting_to_traffic', # key\n+ 'msf_adaptive', # key\n'', # help\n- command_line_options['msf_adapting_to_traffic'][1],# default\n+ command_line_options['msf_adaptive'][1], # default\nvalidate_option, # validator\nint, # converter\n),\n@@ -437,17 +421,10 @@ command_line_vars.AddVariables(\n(\n'deadline_option', # key\n'', # help\n- command_line_options['deadline_option'][1], # default\n+ command_line_options['deadline_option'][0], # default\nvalidate_option, # validator\nint, # converter\n),\n- (\n- 'apps', # key\n- 'comma-separated list of user applications', # help\n- '', # default\n- validate_apps, # validator\n- None, # converter\n- ),\n(\n'ide', # key\n'qtcreator by now', # help\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-867. Update root level SConstruct and SConscript
|
491,587 |
06.03.2020 11:11:16
| -3,600 |
b9a1f0c085ba554151da7b0b334e2b344c525168
|
Enable/Disable openudp through config.h
|
[
{
"change_type": "MODIFY",
"old_path": "inc/SConscript",
"new_path": "inc/SConscript",
"diff": "@@ -5,6 +5,8 @@ Import('env')\nlocalEnv = env.Clone()\nsources_h = [\n+ 'config.h',\n+ 'check_config.h',\n'opendefs.h',\n]\n"
},
{
"change_type": "MODIFY",
"old_path": "inc/config.h",
"new_path": "inc/config.h",
"diff": "*\n*\n*\n- * Requires: OPENWSN_UDP_C\n+ * Requires: OPENWSN_OPENUDP_C\n*\n*/\n// ========================== Application Layer ==========================\n+/**\n+ * \\def OPENWSN_COAP_C\n+ *\n+ * Implementation of the CoAP protocol.\n+ *\n+ */\n+\n// #define OPENWSN_COAP_C\n/**\n// #define OPENWSN_CJOIN_C\n+// ======================== Stack configuration ========================\n+\n+/**\n+ * \\def OPENWSN_OPENUDP_C\n+ *\n+ * Implementation of the UDP protocol.\n+ *\n+ */\n+\n+// #define OPENWSN_OPENUDP_C\n#include \"check_config.h\"\n"
},
{
"change_type": "MODIFY",
"old_path": "inc/opendefs.h",
"new_path": "inc/opendefs.h",
"diff": "// general\n#include <stdint.h> // needed for uin8_t, uint16_t\n+#include \"config.h\"\n#include \"toolchain_defs.h\"\n#include \"board_info.h\"\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/03b-IPv6/forwarding.c",
"new_path": "openstack/03b-IPv6/forwarding.c",
"diff": "@@ -246,9 +246,11 @@ void forwarding_sendDone(OpenQueueEntry_t *msg, owerror_t error) {\n// indicate sendDone to upper layer\nswitch (msg->l4_protocol) {\n+#ifdef OPENWSN_OPENUDP_C\ncase IANA_UDP:\nopenudp_sendDone(msg, error);\nbreak;\n+#endif\ncase IANA_ICMPv6:\nicmpv6_sendDone(msg, error);\nbreak;\n@@ -316,9 +318,11 @@ void forwarding_receive(\npacketfunctions_tossHeader(msg, ipv6_inner_header->header_length);\n// indicate received packet to upper layer\nswitch (msg->l4_protocol) {\n+#ifdef OPENWSN_OPENUDP_C\ncase IANA_UDP:\nopenudp_receive(msg);\nbreak;\n+#endif\ncase IANA_ICMPv6:\nicmpv6_receive(msg);\nbreak;\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/04-TRAN/openudp.c",
"new_path": "openstack/04-TRAN/openudp.c",
"diff": "+#include \"config.h\"\n+\n+#if defined(OPENWSN_OPENUDP_C)\n+\n#include \"opendefs.h\"\n#include \"openudp.h\"\n#include \"openserial.h\"\n@@ -241,4 +245,4 @@ static void openudp_receive_default_handler(OpenQueueEntry_t* msg) {\nopenqueue_freePacketBuffer(msg);\n}\n-\n+#endif /* OPENWSN_OPENUDP_C */\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/04-TRAN/openudp.h",
"new_path": "openstack/04-TRAN/openudp.h",
"diff": "\\{\n*/\n+#include \"config.h\"\n//=========================== define ==========================================\nenum UDP_enums {\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/openstack.c",
"new_path": "openstack/openstack.c",
"diff": "\\author Thomas Watteyne <watteyne@eecs.berkeley.edu>, October 2014.\n*/\n+#include \"config.h\"\n#include \"opendefs.h\"\n//===== drivers\n#include \"openserial.h\"\n#include \"icmpv6echo.h\"\n#include \"icmpv6rpl.h\"\n//-- 04-TRAN\n+\n+#if defined(OPENWSN_OPENUDP_C)\n#include \"openudp.h\"\n+#endif\n//===== coap-layer\n#include \"applayer.h\"\n@@ -79,7 +83,10 @@ void openstack_init(void) {\nicmpv6echo_init();\nicmpv6rpl_init();\n//-- 04-TRAN\n+\n+#if defined(OPEWSN_OPENUDP_C)\nopenudp_init();\n+#endif\n//===== coap-layer\napplayer_init();\n"
},
{
"change_type": "MODIFY",
"old_path": "projects/common/03oos_openwsn/03oos_openwsn.c",
"new_path": "projects/common/03oos_openwsn/03oos_openwsn.c",
"diff": "\\author Thomas Watteyne <watteyne@eecs.berkeley.edu>, August 2010\n*/\n+#include \"config.h\"\n#include \"board.h\"\n#include \"scheduler.h\"\n#include \"openstack.h\"\n"
},
{
"change_type": "MODIFY",
"old_path": "projects/common/03oos_openwsn/03oos_openwsn.h",
"new_path": "projects/common/03oos_openwsn/03oos_openwsn.h",
"diff": "\\author Thomas Watteyne <watteyne@eecs.berkeley.edu>, August 2010\n*/\n-#ifndef __openwsn_H\n-#define __openwsn_H\n+#ifndef __OPENWSN_H\n+#define __OPENWSN_H\n#endif\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-867. Enable/Disable openudp through config.h
|
491,587 |
06.03.2020 14:44:07
| -3,600 |
5255a9e8c04a114759c350b2d8d54058c146a108
|
Disable/enable 6lowpan fragmentation through config.h
|
[
{
"change_type": "MODIFY",
"old_path": "inc/config.h",
"new_path": "inc/config.h",
"diff": "// #define OPENWSN_OPENUDP_C\n+/**\n+ * \\def OPENWSN_6LO_FRAGMENTATION_C\n+ *\n+ * Implements 6LoWPAN fragmentation.\n+ *\n+ * Configuration options:\n+ * - OPENWSN_MAX_PKTSIZE_SUPPORTED: defines the maximum IPV6 packet size (header + payload) the mote supports. Default\n+ * value is 1320. This corresponds to a 40-byte IPv6 header + the minimal IPv6 MTU of 1280 bytes.\n+ * - OPENWSN_MAX_NUM_BIGPKTS: defines how many static buffer space will be allocated for processing large packets.\n+ *\n+ */\n+\n+#define OPENWSN_6LO_FRAGMENTATION_C\n+#define OPENWSN_MAX_PKTSIZE_SUPPORTED 1320\n+#define OPENWSN_MAX_NUM_BIGPKTS 2\n+\n#include \"check_config.h\"\n#endif /* __CONFIG_H */\n"
},
{
"change_type": "MODIFY",
"old_path": "inc/opendefs.h",
"new_path": "inc/opendefs.h",
"diff": "@@ -44,7 +44,12 @@ static const uint8_t infoStackName[] = \"OpenWSN \";\n// frame sizes\n#define IEEE802154_FRAME_SIZE 127\n-#define IPV6_PACKET_SIZE 1320\n+\n+#if defined(OPENWSN_6LO_FRAGMENTATION_C)\n+#define IPV6_PACKET_SIZE OPENWSN_MAX_PKTSIZE_SUPPORTED\n+#else\n+#define IPV6_PACKET_SIZE 0\n+#endif\nenum {\nE_SUCCESS = 0,\n@@ -328,7 +333,9 @@ typedef struct {\nbool orgination_time_flag;\nbool drop_flag;\nbool is_cjoin_response;\n+#if defined(OPENWSN_6LO_FRAGMENTATION_C)\nbool is_big_packet;\n+#endif\n//l4\nuint8_t l4_protocol; // l4 protocol to be used\nbool l4_protocol_compressed; // is the l4 protocol header compressed?\n@@ -340,7 +347,9 @@ typedef struct {\nopen_addr_t l3_destinationAdd; // 128b IPv6 destination (down stack)\nopen_addr_t l3_sourceAdd; // 128b IPv6 source address\nbool l3_useSourceRouting; // TRUE when the packet goes downstream\n+#if defined(OPENWSN_6LO_FRAGMENTATION_C)\nbool l3_isFragment; // TRUE when this is a 6LowPAN fragment\n+#endif\n//l2\nowerror_t l2_sendDoneError; // outcome of trying to send this packet\nopen_addr_t l2_nextORpreviousHop; // 64b IEEE802.15.4 next (down stack) or previous (up) hop address\n@@ -384,10 +393,12 @@ typedef struct {\n} OpenQueueEntry_t;\n+#if defined(OPENWSN_6LO_FRAGMENTATION_C)\ntypedef struct {\nOpenQueueEntry_t standard_entry;\nuint8_t packet_remainder[IPV6_PACKET_SIZE - 130]; // 130 byts alread allocated in the normal OpenQueueEntry\n} OpenQueueBigEntry_t;\n+#endif\nBEGIN_PACK\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/02b-MAChigh/sixtop.c",
"new_path": "openstack/02b-MAChigh/sixtop.c",
"diff": "+#include \"config.h\"\n#include \"opendefs.h\"\n#include \"sixtop.h\"\n#include \"openserial.h\"\n#include \"neighbors.h\"\n#include \"IEEE802154E.h\"\n#include \"frag.h\"\n+#include \"iphc.h\"\n#include \"packetfunctions.h\"\n#include \"openrandom.h\"\n#include \"scheduler.h\"\n#include \"opentimers.h\"\n#include \"debugpins.h\"\n-#include \"leds.h\"\n#include \"IEEE802154.h\"\n#include \"IEEE802154_security.h\"\n#include \"idmanager.h\"\n@@ -446,7 +447,11 @@ void task_sixtopNotifSendDone(void) {\nbreak;\ndefault:\n// send the rest up the stack\n+#if defined(OPENWSN_6LO_FRAGMENTATION_C)\nfrag_sendDone(msg, msg->l2_sendDoneError);\n+#else\n+ iphc_sendDone(msg, msg->l2_sendDoneError);\n+#endif\nbreak;\n}\n}\n@@ -511,7 +516,11 @@ void task_sixtopNotifReceive(void) {\nbreak;\n}\n// send to upper layer\n+#if defined(OPENWSN_6LO_FRAGMENTATION_C)\nfrag_receive(msg);\n+#else\n+ iphc_receive(msg);\n+#endif\n} else {\n// free up the RAM\nopenqueue_freePacketBuffer(msg);\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/03a-IPHC/frag.c",
"new_path": "openstack/03a-IPHC/frag.c",
"diff": "@@ -7,6 +7,9 @@ This module implements 6LoWPAN fragmentation according to RFC 4944,\n\\author Timothy Claeys <timothy.claeys@inria.fr>, January 2020.\n*/\n+#include \"config.h\"\n+\n+#if defined(OPENWSN_6LO_FRAGMENTATION_C)\n#include \"opendefs.h\"\n#include \"frag.h\"\n@@ -762,3 +765,5 @@ void frag_timeout_cb(opentimers_id_t id) {\n}\n}\n}\n+\n+#endif /* OPENWSN_6LO_FRAGMENTATION_C */\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/03a-IPHC/frag.h",
"new_path": "openstack/03a-IPHC/frag.h",
"diff": "\\{\n*/\n+#include \"config.h\"\n#include \"opendefs.h\"\n#include \"openqueue.h\"\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/03a-IPHC/iphc.c",
"new_path": "openstack/03a-IPHC/iphc.c",
"diff": "@@ -213,7 +213,11 @@ owerror_t iphc_sendFromForwarding(\n*((uint8_t * )(msg->payload)) = PAGE_DISPATCH_NO_1;\n}\n+#if defined(OPENWSN_6LO_FRAGMENTATION_C)\nreturn frag_fragment6LoPacket(msg);\n+#else\n+ return sixtop_send(msg);\n+#endif\n}\n//send from bridge: 6LoWPAN header already added by OpenLBR, send as is\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/03b-IPv6/icmpv6echo.c",
"new_path": "openstack/03b-IPv6/icmpv6echo.c",
"diff": "@@ -102,7 +102,11 @@ void icmpv6echo_receive(OpenQueueEntry_t *msg) {\n(errorparameter_t) 0);\nif (icmpv6echo_vars.isReplyEnabled) {\n// get a new OpenQueuEntry_t for the echo reply\n+#if defined(OPENWSN_6LO_FRAGMENTATION_C)\nreply = openqueue_getFreeBigPacketBuffer(COMPONENT_ICMPv6ECHO);\n+#else\n+ reply = openqueue_getFreePacketBuffer(COMPONENT_ICMPv6ECHO);\n+#endif\nif (reply == NULL) {\nopenserial_printError(COMPONENT_ICMPv6ECHO, ERR_NO_FREE_PACKET_BUFFER,\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/cross-layers/openqueue.c",
"new_path": "openstack/cross-layers/openqueue.c",
"diff": "+#include \"config.h\"\n#include \"opendefs.h\"\n#include \"openqueue.h\"\n#include \"openserial.h\"\n@@ -20,7 +21,9 @@ openqueue_vars_t openqueue_vars;\nvoid openqueue_reset_entry(OpenQueueEntry_t *entry);\n+#if defined(OPENWSN_6LO_FRAGMENTATION_C)\nvoid openqueue_reset_big_entry(OpenQueueBigEntry_t *entry);\n+#endif\n//=========================== public ==========================================\n@@ -29,15 +32,17 @@ void openqueue_reset_big_entry(OpenQueueBigEntry_t *entry);\n/**\n\\brief Initialize this module.\n*/\n-void openqueue_init(void) {\n+void openqueue_init() {\nuint8_t i;\nfor (i = 0; i < QUEUELENGTH; i++) {\nopenqueue_reset_entry(&(openqueue_vars.queue[i]));\n}\n+#if defined(OPENWSN_6LO_FRAGMENTATION_C)\nfor (i = 0; i < BIGQUEUELENGTH; i++) {\nopenqueue_reset_big_entry(&(openqueue_vars.big_queue[i]));\n}\n+#endif\n}\n/**\n@@ -48,7 +53,7 @@ status information about several modules in the OpenWSN stack.\n\\returns TRUE if this function printed something, FALSE otherwise.\n*/\n-bool debugPrint_queue(void) {\n+bool debugPrint_queue() {\ndebugOpenQueueEntry_t output[QUEUELENGTH];\nuint8_t i;\nfor (i = 0; i < QUEUELENGTH; i++) {\n@@ -105,6 +110,7 @@ OpenQueueEntry_t* openqueue_getFreePacketBuffer(uint8_t creator) {\nreturn NULL;\n}\n+#if defined(OPENWSN_6LO_FRAGMENTATION_C)\nOpenQueueEntry_t* openqueue_getFreeBigPacketBuffer(uint8_t creator) {\nuint8_t i;\n@@ -133,6 +139,7 @@ OpenQueueEntry_t* openqueue_getFreeBigPacketBuffer(uint8_t creator) {\nENABLE_INTERRUPTS();\nreturn NULL;\n}\n+#endif\n/**\n\\brief Free a previously-allocated packet buffer.\n@@ -148,6 +155,7 @@ owerror_t openqueue_freePacketBuffer(OpenQueueEntry_t *pkt) {\nINTERRUPT_DECLARATION();\nDISABLE_INTERRUPTS();\n+#if defined(OPENWSN_6LO_FRAGMENTATION_C)\nif (pkt->is_big_packet) {\nfor (i = 0; i < BIGQUEUELENGTH; i++) {\nif ((OpenQueueBigEntry_t *) pkt == &openqueue_vars.big_queue[i]) {\n@@ -163,8 +171,8 @@ owerror_t openqueue_freePacketBuffer(OpenQueueEntry_t *pkt) {\nreturn E_SUCCESS;\n}\n}\n-\n} else {\n+#endif\nfor (i = 0; i < QUEUELENGTH; i++) {\nif (&openqueue_vars.queue[i] == pkt) {\nif (openqueue_vars.queue[i].owner == COMPONENT_NULL) {\n@@ -178,8 +186,9 @@ owerror_t openqueue_freePacketBuffer(OpenQueueEntry_t *pkt) {\nreturn E_SUCCESS;\n}\n}\n-\n+#if defined(OPENWSN_6LO_FRAGMENTATION_C)\n}\n+#endif\n// log the error\nopenserial_printCritical(COMPONENT_OPENQUEUE, ERR_FREEING_ERROR,\n@@ -207,18 +216,20 @@ void openqueue_removeAllCreatedBy(uint8_t creator) {\n}\n}\n+#if defined(OPENWSN_6LO_FRAGMENTATION_C)\nfor (i = 0; i < BIGQUEUELENGTH; i++) {\nif (openqueue_vars.big_queue[i].standard_entry.creator == creator) {\nopenqueue_reset_big_entry(&(openqueue_vars.big_queue[i]));\n}\n}\n+#endif\nENABLE_INTERRUPTS();\n}\n//======= called by RES\n-OpenQueueEntry_t* openqueue_sixtopGetSentPacket(void) {\n+OpenQueueEntry_t* openqueue_sixtopGetSentPacket() {\nuint8_t i;\nINTERRUPT_DECLARATION();\nDISABLE_INTERRUPTS();\n@@ -230,6 +241,7 @@ OpenQueueEntry_t* openqueue_sixtopGetSentPacket(void) {\n}\n}\n+#if defined(OPENWSN_6LO_FRAGMENTATION_C)\nfor (i = 0; i < BIGQUEUELENGTH; i++) {\nif (((OpenQueueEntry_t*)&openqueue_vars.big_queue[i])->owner == COMPONENT_IEEE802154E_TO_SIXTOP &&\n((OpenQueueEntry_t*)&openqueue_vars.big_queue[i])->creator != COMPONENT_IEEE802154E) {\n@@ -237,12 +249,13 @@ OpenQueueEntry_t* openqueue_sixtopGetSentPacket(void) {\nreturn (OpenQueueEntry_t*)&openqueue_vars.big_queue[i];\n}\n}\n+#endif\nENABLE_INTERRUPTS();\nreturn NULL;\n}\n-OpenQueueEntry_t* openqueue_sixtopGetReceivedPacket(void) {\n+OpenQueueEntry_t* openqueue_sixtopGetReceivedPacket() {\nuint8_t i;\nINTERRUPT_DECLARATION();\nDISABLE_INTERRUPTS();\n@@ -280,7 +293,7 @@ uint8_t openqueue_getNum6PReq(open_addr_t *neighbor) {\nreturn num6Prequest;\n}\n-uint8_t openqueue_getNum6PResp(void) {\n+uint8_t openqueue_getNum6PResp() {\nuint8_t i;\nuint8_t num6Presponse;\n@@ -324,7 +337,7 @@ void openqueue_remove6PrequestToNeighbor(open_addr_t *neighbor) {\n//======= called by IEEE80215E\n-bool openqueue_isHighPriorityEntryEnough(void) {\n+bool openqueue_isHighPriorityEntryEnough() {\nuint8_t i;\nuint8_t numberOfEntry;\nINTERRUPT_DECLARATION();\n@@ -346,7 +359,7 @@ bool openqueue_isHighPriorityEntryEnough(void) {\n}\n}\n-OpenQueueEntry_t* openqueue_macGetEBPacket(void) {\n+OpenQueueEntry_t* openqueue_macGetEBPacket() {\nuint8_t i;\nINTERRUPT_DECLARATION();\nDISABLE_INTERRUPTS();\n@@ -464,6 +477,7 @@ OpenQueueEntry_t* openqueue_macGetUnicastPakcet(open_addr_t* toNeighbor){\n}\n}\n+#if defined(OPENWSN_6LO_FRAGMENTATION_C)\nfor (i = 0; i < BIGQUEUELENGTH; i++) {\nif (\n((OpenQueueEntry_t*)&openqueue_vars.big_queue[i])->owner == COMPONENT_SIXTOP_TO_IEEE802154E &&\n@@ -476,9 +490,9 @@ OpenQueueEntry_t* openqueue_macGetUnicastPakcet(open_addr_t* toNeighbor){\nreturn (OpenQueueEntry_t*)&openqueue_vars.big_queue[i];\n}\n}\n+#endif\nENABLE_INTERRUPTS();\nreturn NULL;\n-\n}\n@@ -493,7 +507,9 @@ void openqueue_reset_entry(OpenQueueEntry_t *entry) {\nentry->payload = &(entry->packet[IEEE802154_FRAME_SIZE - IEEE802154_SECURITY_TAG_LEN]);\nentry->length = 0;\nentry->is_cjoin_response = FALSE;\n+#if defined(OPENWSN_6LO_FRAGMENTATION_C)\nentry->is_big_packet = FALSE;\n+#endif\n//l4\nentry->l4_protocol = IANA_UNDEFINED;\nentry->l4_protocol_compressed = FALSE;\n@@ -501,7 +517,9 @@ void openqueue_reset_entry(OpenQueueEntry_t *entry) {\nentry->l3_destinationAdd.type = ADDR_NONE;\nentry->l3_sourceAdd.type = ADDR_NONE;\nentry->l3_useSourceRouting = FALSE;\n+#if defined(OPENWSN_6LO_FRAGMENTATION_C)\nentry->l3_isFragment = FALSE;\n+#endif\n//l2\nentry->l2_sixtop_command = IANA_6TOP_CMD_NONE;\nentry->l2_nextORpreviousHop.type = ADDR_NONE;\n@@ -515,10 +533,11 @@ void openqueue_reset_entry(OpenQueueEntry_t *entry) {\nentry->l2_securityLevel = 0;\n}\n-\n+#if defined(OPENWSN_6LO_FRAGMENTATION_C)\nvoid openqueue_reset_big_entry(OpenQueueBigEntry_t *entry) {\nopenqueue_reset_entry(&(entry->standard_entry));\n// make pointer point to the end op the extended buffer\nentry->standard_entry.payload = &(entry->standard_entry.packet[IPV6_PACKET_SIZE]);\n}\n+#endif\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/cross-layers/openqueue.h",
"new_path": "openstack/cross-layers/openqueue.h",
"diff": "\\{\n*/\n+#include \"config.h\"\n#include \"opendefs.h\"\n#include \"IEEE802154.h\"\n//=========================== define ==========================================\n#define QUEUELENGTH 20\n-#define BIGQUEUELENGTH 2\n+\n+#if defined(OPENWSN_6LO_FRAGMENTATION_C)\n+#define BIGQUEUELENGTH OPENWSN_MAX_NUM_BIGPKTS\n+#else\n+#define BIGQUEUELENGTH 0\n+#endif\n//=========================== typedef =========================================\n@@ -27,7 +33,9 @@ typedef struct {\ntypedef struct {\nOpenQueueEntry_t queue[QUEUELENGTH];\n+#if defined(OPENWSN_6LO_FRAGMENTATION_C)\nOpenQueueBigEntry_t big_queue[BIGQUEUELENGTH];\n+#endif\n} openqueue_vars_t;\n//=========================== prototypes ======================================\n@@ -37,7 +45,11 @@ void openqueue_init(void);\nbool debugPrint_queue(void);\n// called by any component\nOpenQueueEntry_t* openqueue_getFreePacketBuffer(uint8_t creator);\n+\n+#if defined(OPENWSN_6LO_FRAGMENTATION_C)\nOpenQueueEntry_t* openqueue_getFreeBigPacketBuffer(uint8_t creator);\n+#endif\n+\nowerror_t openqueue_freePacketBuffer(OpenQueueEntry_t* pkt);\nvoid openqueue_removeAllCreatedBy(uint8_t creator);\nbool openqueue_isHighPriorityEntryEnough(void);\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/cross-layers/packetfunctions.c",
"new_path": "openstack/cross-layers/packetfunctions.c",
"diff": "+#include \"config.h\"\n#include \"packetfunctions.h\"\n#include \"openserial.h\"\n#include \"idmanager.h\"\n@@ -304,7 +305,11 @@ void packetfunctions_reserveHeaderSize(OpenQueueEntry_t *pkt, uint16_t header_le\nvoid packetfunctions_tossHeader(OpenQueueEntry_t *pkt, uint16_t header_length) {\nuint16_t size;\n+#if defined(OPENWSN_6LO_FRAGMENTATION_C)\nsize = pkt->is_big_packet == TRUE ? IPV6_PACKET_SIZE : IEEE802154_FRAME_SIZE;\n+#else\n+ size = IEEE802154_FRAME_SIZE;\n+#endif\npkt->payload += header_length;\npkt->length -= header_length;\n@@ -334,7 +339,15 @@ void packetfunctions_reserveFooterSize(OpenQueueEntry_t *pkt, uint16_t header_le\nvoid packetfunctions_tossFooter(OpenQueueEntry_t *pkt, uint16_t header_length) {\npkt->length -= header_length;\n- if (pkt->length > IPV6_PACKET_SIZE) {//wraps around, so a negative value will be >128\n+ uint16_t max_length;\n+\n+#if defined(OPENWSN_6LO_FRAGMENTATION_C)\n+ max_length = IPV6_PACKET_SIZE;\n+#else\n+ max_length = IEEE802154_FRAME_SIZE;\n+#endif\n+\n+ if (pkt->length > max_length) {//wraps around, so a negative value will be >128\nopenserial_printError(COMPONENT_PACKETFUNCTIONS, ERR_HEADER_TOO_LONG,\n(errorparameter_t) 3,\n(errorparameter_t) pkt->length);\n@@ -349,6 +362,7 @@ void packetfunctions_tossFooter(OpenQueueEntry_t *pkt, uint16_t header_length) {\nvoid packetfunctions_duplicatePacket(OpenQueueEntry_t *dst, OpenQueueEntry_t *src) {\n// make a copy of the frame\n+#if defined(OPENWSN_6LO_FRAGMENTATION_C)\nif (src->is_big_packet){\nmemcpy(dst, src, sizeof(OpenQueueEntry_t));\n@@ -356,13 +370,15 @@ void packetfunctions_duplicatePacket(OpenQueueEntry_t *dst, OpenQueueEntry_t *sr\ndst->is_big_packet = FALSE;\ndst->payload -= src->length;\nmemcpy(dst->payload, src->payload, src->length);\n-\n} else {\n+#endif\nmemcpy(dst, src, sizeof(OpenQueueEntry_t));\n// Calculate where payload starts in the buffer\ndst->payload = &dst->packet[src->payload - src->packet]; // update pointers\n+#if defined(OPENWSN_6LO_FRAGMENTATION_C)\n}\n+#endif\n// update l2_FrameCounter pointer\ndst->l2_FrameCounter = dst->payload + (src->l2_FrameCounter - src->payload);\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/openstack.c",
"new_path": "openstack/openstack.c",
"diff": "#include \"icmpv6echo.h\"\n#include \"icmpv6rpl.h\"\n//-- 04-TRAN\n-\n-#if defined(OPENWSN_OPENUDP_C)\n#include \"openudp.h\"\n-#endif\n//===== coap-layer\n#include \"applayer.h\"\n@@ -76,7 +73,11 @@ void openstack_init(void) {\n//-- 03a-IPHC\nopenbridge_init();\niphc_init();\n+\n+#if defined(OPENWSN_6LO_FRAGMENTATION_C)\nfrag_init();\n+#endif\n+\n//-- 03b-IPv6\nforwarding_init();\nicmpv6_init();\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-867. Disable/enable 6lowpan fragmentation through config.h
|
491,587 |
06.03.2020 14:52:30
| -3,600 |
551d800a619caf86fc5c61a996d3b95301734245
|
Add config checker (config_check.h)
|
[
{
"change_type": "MODIFY",
"old_path": "inc/check_config.h",
"new_path": "inc/check_config.h",
"diff": "+#ifndef __CHECK_CONFIG_H\n+#define __CHECK_CONFIG_H\n+\n+\n+#if !defined(OPENWSN_COAP_C) && (\\\n+ defined(OPENWSN_C6T_C) || \\\n+ defined(OPENWN_CEXAMPLE_C) || \\\n+ defined(OPENWSN_CINFO_C) || \\\n+ defined(OPENWSN_CINFRARED_C) || \\\n+ defined(OPENWSN_CLED_C) || \\\n+ defined(OPENWSN_CSENSORS_C) || \\\n+ defined(OPENWSN_CSTORM_C) || \\\n+ defined(OPENWSN_CWELLKNOWN) || \\\n+ defined(OPENWSN_RRT_C))\n+\n+#error \"A CoAP dependent application is defined, but CoAP is not included in the build.\"\n+#endif\n+\n+#if !defined(OPENWSN_OPENUDP_C) && (\\\n+ defined(OPENWSN_USERIALBRIDGE_C) || \\\n+ defined(OPENWN_UECHO_C) || \\\n+ defined(OPENWSN_UINJECT_C) || \\\n+ defined(OPENWSN_USERIALBRIDGE_C) || \\\n+ defined(OPENWSN_UEXPIRATION_C) || \\\n+ defined(OPENWSN_UEXP_MONITOR))\n+\n+#error \"A UDP dependent application is defined, but UDP is not included in the build.\"\n+#endif\n+\n+#if !defined(OPENWSN_6LO_FRAGMENTATION_C) && (\\\n+ defined(OPENWSN_MAX_PKTSIZE_SUPPORTED) || \\\n+ defined(OPENWN_MAX_NUM_BIGPKTS))\n+\n+#error \"6LoWPAN fragmentation options specified, but 6LoWPAN fragmentation is not included in the build.\"\n+#endif\n+\n+#endif /* __CHECK_CONFIG_H */\n\\ No newline at end of file\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-867. Add config checker (config_check.h)
|
491,587 |
01.04.2020 17:13:14
| -7,200 |
f727f78726d0ce5126e4c27881cad1844a2e8d86
|
Move SHA and HKDF functions to crypto driver
|
[
{
"change_type": "MODIFY",
"old_path": "drivers/SConscript",
"new_path": "drivers/SConscript",
"diff": "@@ -12,7 +12,11 @@ sources_c = [\nos.path.join('common','openserial.c'),\nos.path.join('common','opentimers.c'),\nos.path.join('common','crypto','ccms.c'),\n- os.path.join('common','crypto','aes128.c')\n+ os.path.join('common','crypto','hkdf.c'),\n+ os.path.join('common','crypto','hmac.c'),\n+ os.path.join('common','crypto','sha224-256.c'),\n+ os.path.join('common','crypto','aes128.c'),\n+ os.path.join('common','crypto','usha.c')\n]\nsources_h = [\nos.path.join('common','openhdlc.h'),\n@@ -20,7 +24,9 @@ sources_h = [\nos.path.join('common','openserial.h'),\nos.path.join('common','opentimers.h'),\nos.path.join('common','crypto','ccms.h'),\n- os.path.join('common','crypto','aes128.h')\n+ os.path.join('common','crypto','aes128.h'),\n+ os.path.join('common','crypto','sha.h'),\n+ os.path.join('common','crypto','sha-private.h')\n]\nif localEnv['board']=='python':\n"
},
{
"change_type": "RENAME",
"old_path": "openweb/opencoap/hkdf.c",
"new_path": "drivers/common/crypto/hkdf.c",
"diff": ""
},
{
"change_type": "RENAME",
"old_path": "openweb/opencoap/hmac.c",
"new_path": "drivers/common/crypto/hmac.c",
"diff": ""
},
{
"change_type": "RENAME",
"old_path": "openweb/opencoap/sha-private.h",
"new_path": "drivers/common/crypto/sha-private.h",
"diff": ""
},
{
"change_type": "RENAME",
"old_path": "openweb/opencoap/sha.h",
"new_path": "drivers/common/crypto/sha.h",
"diff": ""
},
{
"change_type": "RENAME",
"old_path": "openweb/opencoap/sha224-256.c",
"new_path": "drivers/common/crypto/sha224-256.c",
"diff": ""
},
{
"change_type": "RENAME",
"old_path": "openweb/opencoap/usha.c",
"new_path": "drivers/common/crypto/usha.c",
"diff": ""
},
{
"change_type": "MODIFY",
"old_path": "openweb/SConscript",
"new_path": "openweb/SConscript",
"diff": "@@ -9,12 +9,8 @@ sources_c = [\n\"openweb.c\",\n# ==== opencoap\nos.path.join(\"opencoap\", \"cborencoder.c\"),\n- os.path.join(\"opencoap\", \"hkdf.c\"),\n- os.path.join(\"opencoap\", \"hmac.c\"),\nos.path.join(\"opencoap\", \"coap.c\"),\nos.path.join(\"opencoap\", \"openoscoap.c\"),\n- os.path.join(\"opencoap\", \"sha224-256.c\"),\n- os.path.join(\"opencoap\", \"usha.c\"),\n# ==== cjoin\nos.path.join(\"cjoin\", \"cjoin.c\"),\nos.path.join(\"cjoin\", \"cojp_cbor.c\")\n@@ -26,8 +22,6 @@ sources_h = [\nos.path.join(\"opencoap\", \"cborencoder.h\"),\nos.path.join(\"opencoap\", \"coap.h\"),\nos.path.join(\"opencoap\", \"openoscoap.h\"),\n- os.path.join(\"opencoap\", \"sha.h\"),\n- os.path.join(\"opencoap\", \"sha-private.h\"),\n# ==== cjoin\nos.path.join(\"cjoin\", \"cjoin.h\"),\nos.path.join(\"cjoin\", \"cojp_cbor.h\")\n"
},
{
"change_type": "MODIFY",
"old_path": "projects/python/SConscript.env",
"new_path": "projects/python/SConscript.env",
"diff": "@@ -370,6 +370,9 @@ functionsToChange = [\n'aes_ctr_enc',\n'aes_cbc_enc_raw',\n'aes_ctr_enc_raw',\n+ # hash\n+ 'sha',\n+ 'sha-private',\n# openserial\n'openserial_init',\n'openserial_register',\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-867. Move SHA and HKDF functions to crypto driver
|
491,587 |
01.04.2020 13:43:56
| -7,200 |
74fdbb003abde885733052986b48baba3e83748d
|
Refactor openserial and fix openserial_printf
Temporarily removes broken commands (will be updated later)
|
[
{
"change_type": "MODIFY",
"old_path": "SConscript",
"new_path": "SConscript",
"diff": "@@ -60,8 +60,6 @@ if env['fix_channel']>=11 and env['fix_channel']<=26:\nenv.Append(CPPDEFINES = {'IEEE802154E_SINGLE_CHANNEL' : env['fix_channel']})\nif env['msf_adaptive']==1:\nenv.Append(CPPDEFINES = 'MSF_ADAPTING_TO_TRAFFIC')\n-if env['printf']==1:\n- env.Append(CPPDEFINES = 'OPENSERIAL_PRINTF')\nif env['deadline_option']==1:\nenv.Append(CPPDEFINES = 'DEADLINE_OPTION_ENABLED')\n@@ -244,6 +242,8 @@ elif env['toolchain']=='armgcc':\n# linker\nenv.Append(LINKFLAGS='-Tbsp/boards/' + env['board'] + '/' + linker_file)\nenv.Append(LINKFLAGS='-nostartfiles')\n+ env.Append(LINKFLAGS='-specs=nosys.specs')\n+ env.Append(LINKFLAGS='-specs=nano.specs')\nenv.Append(LINKFLAGS='-Wl,-Map,${TARGET.base}.map')\nenv.Append(LINKFLAGS='-mcpu=cortex-m3')\nenv.Append(LINKFLAGS='-mthumb')\n"
},
{
"change_type": "MODIFY",
"old_path": "SConstruct",
"new_path": "SConstruct",
"diff": "@@ -81,8 +81,6 @@ project:\n0 (off), 1 (on)\nmsf_adaptive Enable/disable MSF for adding/deleting cell to adapt to traffic\n0 (disable), 1 (enable)\n- printf Sends the string messages to openvisualizer\n- 0 (off ), 1 (on, default)\nide qtcreator\nfix_channel Set single channel hopping for debugging\n0 (off, default), i (on, channel=i [11:26])\n@@ -153,7 +151,6 @@ command_line_options = {\n'l2_security': ['0','1'],\n'fix_channel': ['0'] + map(str, range(11, 27)),\n'msf_adaptive': ['0','1'],\n- 'printf': ['0','1'],\n'deadline_option': ['0','1'],\n'ide': ['none','qtcreator'],\n'revision': ['']\n@@ -306,118 +303,6 @@ command_line_vars.AddVariables(\nvalidate_option, # validator\nint, # converter\n),\n- (\n- 'toolchain', # key\n- '', # help\n- command_line_options['toolchain'][0], # default\n- validate_option, # validator\n- None, # converter\n- ),\n- (\n- 'kernel', # key\n- '', # help\n- command_line_options['kernel'][0], # default\n- validate_option, # validator\n- None, # converter\n- ),\n- (\n- 'jtag', # key\n- '', # help\n- '', # default\n- None, # validator\n- None, # converter\n- ),\n- (\n- 'fet_version', # key\n- '', # help\n- command_line_options['fet_version'][0], # default\n- validate_option, # validator\n- int, # converter\n- ),\n- (\n- 'bootload', # key\n- '', # help\n- '', # default\n- None, # validator\n- None, # converter\n- ),\n- (\n- 'verbose', # key\n- '', # help\n- command_line_options['verbose'][0], # default\n- validate_option, # validator\n- int, # converter\n- ),\n- (\n- 'fastsim', # key\n- '', # help\n- command_line_options['fastsim'][0], # default\n- validate_option, # validator\n- int, # converter\n- ),\n- (\n- 'simhost', # key\n- '', # help\n- command_line_options['simhost'][defaultHost], # default\n- validate_option, # validator\n- None, # converter\n- ),\n- (\n- 'simhostpy', # key\n- '', # help\n- command_line_options['simhostpy'][0], # default\n- None, # validator\n- None, # converter\n- ),\n- (\n- 'panid', # key\n- '0xFFFF', # help\n- command_line_options['panid'][0], # default\n- None, # validator\n- None, # converter\n- ),\n- (\n- 'dagroot', # key\n- '', # help\n- command_line_options['dagroot'][0], # default\n- validate_option, # validator\n- int, # converter\n- ),\n- (\n- 'forcetopology', # key\n- '', # help\n- command_line_options['forcetopology'][0], # default\n- validate_option, # validator\n- int, # converter\n- ),\n- (\n- 'debug', # key\n- '', # help\n- command_line_options['debug'][0], # default\n- validate_option, # validator\n- int, # converter\n- ),\n- (\n- 'noadaptivesync', # key\n- '', # help\n- command_line_options['noadaptivesync'][0], # default\n- validate_option, # validator\n- int, # converter\n- ),\n- (\n- 'l2_security', # key\n- '', # help\n- command_line_options['l2_security'][0], # default\n- validate_option, # validator\n- int, # converter\n- ),\n- (\n- 'printf', # key\n- '', # help\n- command_line_options['printf'][0], # default\n- validate_option, # validator\n- int, # converter\n- ),\n(\n'deadline_option', # key\n'', # help\n"
},
{
"change_type": "MODIFY",
"old_path": "bsp/boards/openmote-cc2538/cc2538sf53.lds",
"new_path": "bsp/boards/openmote-cc2538/cc2538sf53.lds",
"diff": "@@ -55,6 +55,15 @@ SECTIONS\n_ebss = .;\n} > SRAM\n+ .heap (COPY):\n+ {\n+ __HeapBase = .;\n+ __end__ = .;\n+ end = __end__;\n+ KEEP(*(.heap*))\n+ __HeapLimit = .;\n+ } > SRAM\n+\n.flashcca :\n{\nKEEP(*(.flashcca))\n"
},
{
"change_type": "MODIFY",
"old_path": "drivers/common/openserial.c",
"new_path": "drivers/common/openserial.c",
"diff": "\\author Fabien Chraim <chraim@eecs.berkeley.edu>, March 2012.\n\\author Thomas Watteyne <thomas.watteyne@inria.fr>, August 2016.\n*/\n-#include <stdio.h>\n#include <stdarg.h>\n#include <string.h>\n+#include <stdio.h>\n#include \"opendefs.h\"\n#include \"openserial.h\"\nopenserial_vars_t openserial_vars;\n-enum{\n- TYPE_STR = 0, //subtype for the printf message\n- TYPE_INT = 1\n-};\n-\n#define DEBUGPRINT_PERIOD 100 // in ms\n//=========================== prototypes ======================================\n@@ -54,26 +49,31 @@ owerror_t openserial_printInfoErrorCritical(\n// command handlers\nvoid openserial_handleRxFrame(void);\n+\nvoid openserial_handleEcho(uint8_t *but, uint8_t bufLen);\n-void openserial_get6pInfo(uint8_t commandId, uint8_t* code,uint8_t* cellOptions,uint8_t* numCells,cellInfo_ht* celllist_add,cellInfo_ht* celllist_delete,uint8_t* listOffset,uint8_t* maxListLen,uint8_t ptr, uint8_t commandLen);\n-void openserial_handleCommands(void);\n// misc\nvoid openserial_debugPrint_timer_cb(opentimers_id_t id);\n+\nvoid openserial_board_reset_cb(opentimers_id_t id);\n// HDLC output\nvoid outputHdlcOpen(void);\n+\nvoid outputHdlcWrite(uint8_t b);\n+\nvoid outputHdlcClose(void);\n// HDLC input\nvoid inputHdlcOpen(void);\n+\nvoid inputHdlcWrite(uint8_t b);\n+\nvoid inputHdlcClose(void);\n// task\nvoid task_printWrongCRCInput(void);\n+\nvoid task_printInputBufferOverflow(void);\n//=========================== public ==========================================\n@@ -117,11 +117,6 @@ void openserial_init(void) {\nuart_enableInterrupts();\n}\n-void openserial_register(openserial_rsvpt* rsvp) {\n- // FIXME: register multiple commands (linked list)\n- openserial_vars.registeredCmd = rsvp;\n-}\n-\n//===== transmitting\nowerror_t openserial_printStatus(\n@@ -160,8 +155,6 @@ owerror_t openserial_printInfo(\narg1,\narg2\n);\n-\n- // openserial_flush called by openserial_printInfoErrorCritical()\n}\nowerror_t openserial_printError(\n@@ -180,8 +173,6 @@ owerror_t openserial_printError(\narg1,\narg2\n);\n-\n- // openserial_flush called by openserial_printInfoErrorCritical()\n}\nowerror_t openserial_printCritical(\n@@ -212,8 +203,6 @@ owerror_t openserial_printCritical(\narg1,\narg2\n);\n-\n- // openserial_flush called by openserial_printInfoErrorCritical()\n}\nowerror_t openserial_printData(uint8_t *buffer, uint8_t length) {\n@@ -262,45 +251,75 @@ owerror_t openserial_printSniffedPacket(uint8_t* buffer, uint8_t length, uint8_t\nreturn E_SUCCESS;\n}\n-owerror_t openserial_print_uint32_t(uint32_t value) {\n-#ifdef OPENSERIAL_PRINTF\n+owerror_t openserial_printf(char *buffer, ...) {\n+#ifdef OPENWSN_OPENSERIAL_PRINTF\nuint8_t i;\n- uint8_t pvalue[4];\n+ char *ptr, *tmp;\n+ int d;\n+ char intgr[16];\n+ char *fail = \" - unknown format specifier - \";\n- outputHdlcOpen();\n- outputHdlcWrite(SERFRAME_MOTE2PC_PRINTF);\n- outputHdlcWrite(TYPE_INT);\n- memcpy(pvalue, &value, 4);\n- for (i=0;i<4;i++) {\n- outputHdlcWrite(pvalue[i]);\n- }\n- outputHdlcClose();\n-\n- // start TX'ing\n- openserial_flush();\n-#endif\n- return E_SUCCESS;\n-}\n-\n-owerror_t openserial_print_str(char* buffer, uint8_t length) {\n-#ifdef OPENSERIAL_PRINTF\n- uint8_t i;\nuint8_t asn[5];\n+ va_list ap;\n+ va_start(ap, buffer);\n+\n// retrieve ASN\nieee154e_getAsn(asn);\noutputHdlcOpen();\noutputHdlcWrite(SERFRAME_MOTE2PC_PRINTF);\n- outputHdlcWrite(TYPE_STR);\noutputHdlcWrite(idmanager_getMyID(ADDR_16B)->addr_16b[0]);\noutputHdlcWrite(idmanager_getMyID(ADDR_16B)->addr_16b[1]);\n+\nfor(i = 0; i < 5; i++) {\noutputHdlcWrite(asn[i]);\n}\n- for (i=0;i<length;i++){\n- outputHdlcWrite(buffer[i]);\n+\n+ for (ptr = buffer; *ptr != '\\0'; ptr++){\n+ if (*ptr == '%') {\n+ ptr++;\n+ switch (*ptr) {\n+ case 's':\n+ tmp = va_arg(ap, char*);\n+ while (*tmp != '\\0'){\n+ outputHdlcWrite(*tmp);\n+ tmp++;\n+ }\n+ break;\n+ case 'd':\n+ d = va_arg(ap, int);\n+ snprintf(intgr, 16, \"%d\", d);\n+ tmp = intgr;\n+ while (*tmp != '\\0'){\n+ outputHdlcWrite(*tmp);\n+ tmp++;\n+ }\n+ break;\n+ case 'x':\n+ d = va_arg(ap, int);\n+ snprintf(intgr, 16, \"%x\", d);\n+ tmp = intgr;\n+ while (*tmp != '\\0'){\n+ outputHdlcWrite(*tmp);\n+ tmp++;\n+ }\n+ break;\n+ case '%':\n+ outputHdlcWrite('%');\n+ break;\n+ default:\n+ for(tmp = fail; *tmp != '\\0'; tmp++){\n+ outputHdlcWrite(*tmp);\n+ }\n+ }\n+ } else {\n+ outputHdlcWrite(*ptr);\n+ }\n}\n+\n+ va_end(ap);\n+\noutputHdlcClose();\n// start TX'ing\n@@ -598,262 +617,12 @@ void openserial_handleRxFrame() {\nopenserial_vars.inputBufFillLevel - 1\n);\nbreak;\n- case SERFRAME_PC2MOTE_COMMAND:\n- openserial_handleCommands();\n- break;\n- }\n- // call registered commands\n- if (openserial_vars.registeredCmd!=NULL && openserial_vars.registeredCmd->cmdId==cmdByte) {\n- openserial_vars.registeredCmd->cb();\n}\n}\nvoid openserial_handleEcho(uint8_t *buf, uint8_t bufLen) {\n// echo back what you received\n- openserial_printData(\n- buf,\n- bufLen\n- );\n-}\n-\n-void openserial_get6pInfo(uint8_t commandId, uint8_t* code,uint8_t* cellOptions,uint8_t* numCells,cellInfo_ht* celllist_add,cellInfo_ht* celllist_delete,uint8_t* listOffset,uint8_t* maxListLen,uint8_t ptr, uint8_t commandLen){\n- uint8_t i;\n- uint8_t celllistLen;\n-\n- // clear command\n- if (commandId == COMMAND_SET_6P_CLEAR){\n- *code = IANA_6TOP_CMD_CLEAR;\n- return;\n- }\n-\n- *cellOptions = openserial_vars.inputBuf[ptr];\n- ptr += 1;\n- commandLen -= 1;\n-\n- // list command\n- if (commandId == COMMAND_SET_6P_LIST){\n- *code = IANA_6TOP_CMD_LIST;\n- *listOffset = openserial_vars.inputBuf[ptr];\n- ptr += 1;\n- *maxListLen = openserial_vars.inputBuf[ptr];\n- ptr += 1;\n- return;\n- }\n-\n- // count command\n- if (commandId == COMMAND_SET_6P_COUNT){\n- *code = IANA_6TOP_CMD_COUNT;\n- return;\n- }\n-\n- *numCells = openserial_vars.inputBuf[ptr];\n- ptr += 1;\n- commandLen -= 1;\n-\n- // add command\n- if (commandId == COMMAND_SET_6P_ADD){\n- *code = IANA_6TOP_CMD_ADD;\n- // retrieve cell list\n- i = 0;\n- celllistLen = commandLen/2;\n- while(commandLen>celllistLen){\n- celllist_add[i].slotoffset = openserial_vars.inputBuf[ptr];\n- celllist_add[i].channeloffset = openserial_vars.inputBuf[ptr+celllistLen];\n- celllist_add[i].isUsed = TRUE;\n- ptr += 1;\n- commandLen -= 1;\n- i++;\n- }\n- return;\n- }\n-\n- // delete command\n- if (commandId == COMMAND_SET_6P_DELETE){\n- *code = IANA_6TOP_CMD_DELETE;\n- // retrieve cell list\n- i = 0;\n- celllistLen = commandLen/2;\n- while(commandLen>celllistLen){\n- celllist_delete[i].slotoffset = openserial_vars.inputBuf[ptr];\n- celllist_delete[i].channeloffset = openserial_vars.inputBuf[ptr+celllistLen];\n- celllist_delete[i].isUsed = TRUE;\n- ptr += 1;\n- commandLen -= 1;\n- i++;\n- }\n- return;\n- }\n-\n- // relocate command\n- if (commandId == COMMAND_SET_6P_RELOCATE){\n- *code = IANA_6TOP_CMD_RELOCATE;\n- // retrieve cell list to be relocated\n- i = 0;\n- while(i<*numCells){\n- celllist_delete[i].slotoffset = openserial_vars.inputBuf[ptr];\n- celllist_delete[i].channeloffset = openserial_vars.inputBuf[ptr+*numCells];\n- celllist_delete[i].isUsed = TRUE;\n- ptr += 1;\n- i++;\n- }\n-\n- commandLen -= (*numCells) * 2;\n- ptr += *numCells;\n- // retrieve cell list to be relocated\n- i = 0;\n- celllistLen = commandLen/2;\n- while(commandLen>celllistLen){\n- celllist_add[i].slotoffset = openserial_vars.inputBuf[ptr];\n- celllist_add[i].channeloffset = openserial_vars.inputBuf[ptr+celllistLen];\n- celllist_add[i].isUsed = TRUE;\n- ptr += 1;\n- commandLen -= 1;\n- i++;\n- }\n- return;\n- }\n-}\n-\n-void openserial_handleCommands(void){\n- uint8_t input_buffer[20];\n- uint8_t numDataBytes;\n- uint8_t commandId;\n- uint8_t commandLen;\n- uint8_t comandParam_8;\n- uint16_t comandParam_16;\n-\n- uint8_t code,cellOptions,numCell,listOffset,maxListLen;\n- uint8_t ptr;\n- cellInfo_ht celllist_add[CELLLIST_MAX_LEN];\n- cellInfo_ht celllist_delete[CELLLIST_MAX_LEN];\n-\n- open_addr_t neighbor;\n- bool foundNeighbor;\n-\n- ptr = 0;\n- memset(celllist_add,0,CELLLIST_MAX_LEN*sizeof(cellInfo_ht));\n- memset(celllist_delete,0,CELLLIST_MAX_LEN*sizeof(cellInfo_ht));\n-\n- numDataBytes = openserial_getInputBufferFillLevel();\n- //copying the buffer\n- openserial_getInputBuffer(&(input_buffer[ptr]),numDataBytes);\n- ptr++;\n- commandId = openserial_vars.inputBuf[ptr];\n- ptr++;\n- commandLen = openserial_vars.inputBuf[ptr];\n- ptr++;\n-\n- switch(commandId) {\n- case COMMAND_SET_EBPERIOD:\n- comandParam_8 = openserial_vars.inputBuf[ptr];\n- sixtop_setEBPeriod(comandParam_8); // one byte, in seconds\n- break;\n- case COMMAND_SET_CHANNEL:\n- comandParam_8 = openserial_vars.inputBuf[ptr];\n- // set communication channel for protocol stack\n- ieee154e_setSingleChannel(comandParam_8); // one byte\n- break;\n- case COMMAND_SET_KAPERIOD: // two bytes, in slots\n- comandParam_16 = (openserial_vars.inputBuf[ptr] & 0x00ff) | \\\n- ((openserial_vars.inputBuf[ptr+1]<<8) & 0xff00);\n- sixtop_setKaPeriod(comandParam_16);\n- break;\n- case COMMAND_SET_DIOPERIOD: // two bytes, in mili-seconds\n- comandParam_16 = (openserial_vars.inputBuf[ptr] & 0x00ff) | \\\n- ((openserial_vars.inputBuf[ptr+1]<<8) & 0xff00);\n- icmpv6rpl_setDIOPeriod(comandParam_16);\n- break;\n- case COMMAND_SET_DAOPERIOD: // two bytes, in mili-seconds\n- comandParam_16 = (openserial_vars.inputBuf[ptr] & 0x00ff) | \\\n- ((openserial_vars.inputBuf[ptr+1]<<8) & 0xff00);\n- icmpv6rpl_setDAOPeriod(comandParam_16);\n- break;\n- case COMMAND_SET_DAGRANK: // two bytes\n- comandParam_16 = (openserial_vars.inputBuf[ptr] & 0x00ff) | \\\n- ((openserial_vars.inputBuf[ptr+1]<<8) & 0xff00);\n- icmpv6rpl_setMyDAGrank(comandParam_16);\n- break;\n- case COMMAND_SET_SECURITY_STATUS: // one byte\n- comandParam_8 = openserial_vars.inputBuf[ptr];\n- ieee154e_setIsSecurityEnabled(comandParam_8);\n- break;\n- case COMMAND_SET_SLOTFRAMELENGTH: // two bytes\n- comandParam_16 = (openserial_vars.inputBuf[ptr] & 0x00ff) | \\\n- ((openserial_vars.inputBuf[ptr+1]<<8) & 0xff00);\n- schedule_setFrameLength(comandParam_16);\n- break;\n- case COMMAND_SET_ACK_STATUS:\n- comandParam_8 = openserial_vars.inputBuf[ptr];\n- ieee154e_setIsAckEnabled(comandParam_8);\n- break;\n- case COMMAND_SET_6P_ADD:\n- case COMMAND_SET_6P_DELETE:\n- case COMMAND_SET_6P_RELOCATE:\n- case COMMAND_SET_6P_COUNT:\n- case COMMAND_SET_6P_LIST:\n- case COMMAND_SET_6P_CLEAR:\n- // get preferred parent\n- foundNeighbor =icmpv6rpl_getPreferredParentEui64(&neighbor);\n- if (foundNeighbor==FALSE) {\n- break;\n- }\n- // the following sequence of bytes are, slotframe, cellOption, numCell, celllist\n- openserial_get6pInfo(commandId,&code,&cellOptions,&numCell,celllist_add,celllist_delete,&listOffset,&maxListLen,ptr,commandLen);\n- sixtop_request(\n- code, // code\n- &neighbor, // neighbor\n- numCell, // number cells\n- cellOptions, // cellOptions\n- celllist_add, // celllist to add\n- celllist_delete, // celllist to delete (not used)\n- msf_getsfid(), // sfid\n- listOffset, // list command offset (not used)\n- maxListLen // list command maximum celllist (not used)\n- );\n- break;\n- case COMMAND_SET_SLOTDURATION:\n- comandParam_16 = (openserial_vars.inputBuf[ptr] & 0x00ff) | \\\n- ((openserial_vars.inputBuf[ptr+1]<<8) & 0xff00);\n- ieee154e_setSlotDuration(comandParam_16);\n- break;\n- case COMMAND_SET_6PRESPONSE:\n- comandParam_8 = openserial_vars.inputBuf[ptr];\n- if (comandParam_8 ==1) {\n- sixtop_setIsResponseEnabled(TRUE);\n- } else {\n- if (comandParam_8 == 0) {\n- sixtop_setIsResponseEnabled(FALSE);\n- } else {\n- // security only can be 1 or 0\n- break;\n- }\n- }\n- break;\n- case COMMAND_SET_UINJECTPERIOD:\n- comandParam_8 = openserial_vars.inputBuf[ptr];\n- msf_appPktPeriod(comandParam_8);\n- break;\n- case COMMAND_SET_ECHO_REPLY_STATUS:\n- comandParam_8 = openserial_vars.inputBuf[ptr];\n- if (comandParam_8 == 1) {\n- icmpv6echo_setIsReplyEnabled(TRUE);\n- } else {\n- if (comandParam_8 == 0) {\n- icmpv6echo_setIsReplyEnabled(FALSE);\n- } else {\n- // ack reply\n- break;\n- }\n- }\n- break;\n- case COMMAND_SET_JOIN_KEY:\n- if (commandLen != 16) { break; }\n- idmanager_setJoinKey(&openserial_vars.inputBuf[ptr]);\n- break;\n- default:\n- // wrong command ID\n- break;\n- }\n+ openserial_printData(buf, bufLen);\n}\n//===== misc\n@@ -890,6 +659,7 @@ port_INLINE void outputHdlcOpen(void) {\nENABLE_INTERRUPTS();\n//>>>>>>>>>>>>>>>>>>>>>>>\n}\n+\n/**\n\\brief Add a byte to the outgoing HDLC frame being built.\n*/\n@@ -912,6 +682,7 @@ port_INLINE void outputHdlcWrite(uint8_t b) {\nENABLE_INTERRUPTS();\n//>>>>>>>>>>>>>>>>>>>>>>>\n}\n+\n/**\n\\brief Finalize the outgoing HDLC frame.\n*/\n@@ -948,6 +719,7 @@ port_INLINE void inputHdlcOpen(void) {\n// initialize the value of the CRC\nopenserial_vars.hdlcInputCrc = HDLC_CRCINIT;\n}\n+\n/**\n\\brief Add a byte to the incoming HDLC frame.\n*/\n@@ -968,6 +740,7 @@ port_INLINE void inputHdlcWrite(uint8_t b) {\nopenserial_vars.hdlcInputCrc = crcIteration(openserial_vars.hdlcInputCrc, b);\n}\n}\n+\n/**\n\\brief Finalize the incoming HDLC frame.\n*/\n"
},
{
"change_type": "MODIFY",
"old_path": "drivers/common/openserial.h",
"new_path": "drivers/common/openserial.h",
"diff": "\\author Thomas Watteyne <thomas.watteyne@inria.fr>, August 2016.\n*/\n-#ifndef __OPENSERIAL_H\n-#define __OPENSERIAL_H\n+#ifndef OPENWSN_OPENSERIAL_H\n+#define OPENWSN_OPENSERIAL_H\n+#include \"config.h\"\n#include \"opendefs.h\"\n-#include <stdio.h>\n-#include <stdarg.h>\n-#include <string.h>\n-\n/**\n\\addtogroup drivers\n\\{\n#define SERFRAME_PC2MOTE_RESET ((uint8_t)'Q')\n#define SERFRAME_PC2MOTE_DATA ((uint8_t)'D')\n#define SERFRAME_PC2MOTE_TRIGGERSERIALECHO ((uint8_t)'S')\n-#define SERFRAME_PC2MOTE_COMMAND ((uint8_t)'C')\n-#define SERFRAME_PC2MOTE_TRIGGERUSERIALBRIDGE ((uint8_t)'B')\n//=========================== typedef =========================================\n-enum {\n- COMMAND_SET_EBPERIOD = 0,\n- COMMAND_SET_CHANNEL = 1,\n- COMMAND_SET_KAPERIOD = 2,\n- COMMAND_SET_DIOPERIOD = 3,\n- COMMAND_SET_DAOPERIOD = 4,\n- COMMAND_SET_DAGRANK = 5,\n- COMMAND_SET_SECURITY_STATUS = 6,\n- COMMAND_SET_SLOTFRAMELENGTH = 7,\n- COMMAND_SET_ACK_STATUS = 8,\n- COMMAND_SET_6P_ADD = 9,\n- COMMAND_SET_6P_DELETE = 10,\n- COMMAND_SET_6P_RELOCATE = 11,\n- COMMAND_SET_6P_COUNT = 12,\n- COMMAND_SET_6P_LIST = 13,\n- COMMAND_SET_6P_CLEAR = 14,\n- COMMAND_SET_SLOTDURATION = 15,\n- COMMAND_SET_6PRESPONSE = 16,\n- COMMAND_SET_UINJECTPERIOD = 17,\n- COMMAND_SET_ECHO_REPLY_STATUS = 18,\n- COMMAND_SET_JOIN_KEY = 19,\n- COMMAND_MAX = 20,\n-};\n-\n//=========================== variables =======================================\n//=========================== prototypes ======================================\n-typedef void (*openserial_cbt)(void);\n-\n-typedef struct _openserial_rsvpt {\n- uint8_t cmdId; ///< serial command (e.g. 'B')\n- openserial_cbt cb; ///< handler of that command\n- struct _openserial_rsvpt* next; ///< pointer to the next registered command\n-} openserial_rsvpt;\n-\ntypedef struct {\n// admin\nuint8_t fInhibited;\nuint8_t ctsStateChanged;\nuint8_t debugPrintCounter;\n- openserial_rsvpt* registeredCmd;\nuint8_t reset_timerId;\nuint8_t debugPrint_timerId;\n// input\n@@ -120,7 +82,6 @@ typedef struct {\n// admin\nvoid openserial_init(void);\n-void openserial_register(openserial_rsvpt* rsvp);\n// transmitting\nowerror_t openserial_printStatus(\n@@ -128,28 +89,33 @@ owerror_t openserial_printStatus(\nuint8_t *buffer,\nuint8_t length\n);\n+\nowerror_t openserial_printInfo(\nuint8_t calling_component,\nuint8_t error_code,\nerrorparameter_t arg1,\nerrorparameter_t arg2\n);\n+\nowerror_t openserial_printError(\nuint8_t calling_component,\nuint8_t error_code,\nerrorparameter_t arg1,\nerrorparameter_t arg2\n);\n+\nowerror_t openserial_printCritical(\nuint8_t calling_component,\nuint8_t error_code,\nerrorparameter_t arg1,\nerrorparameter_t arg2\n);\n+\nowerror_t openserial_printData(\nuint8_t *buffer,\nuint8_t length\n);\n+\nowerror_t openserial_printSniffedPacket(\nuint8_t *buffer,\nuint8_t length,\n@@ -158,16 +124,18 @@ owerror_t openserial_printSniffedPacket(\nvoid task_openserial_debugPrint(void);\n-owerror_t openserial_print_str(char* buffer, uint8_t length);\n-owerror_t openserial_print_uint32_t(uint32_t value);\n+owerror_t openserial_printf(char* buffer, ...);\n// receiving\nuint8_t openserial_getInputBufferFillLevel(void);\n+\nuint8_t openserial_getInputBuffer(uint8_t *bufferToWrite, uint8_t maxNumBytes);\n// scheduling\nvoid openserial_flush(void);\n+\nvoid openserial_inhibitStart(void);\n+\nvoid openserial_inhibitStop(void);\n// debugprint\n@@ -175,6 +143,7 @@ bool debugPrint_outBufferIndexes(void);\n// interrupt handlers\nuint8_t isr_openserial_rx(void);\n+\nvoid isr_openserial_tx(void);\n/**\n"
},
{
"change_type": "MODIFY",
"old_path": "inc/config.h",
"new_path": "inc/config.h",
"diff": "#define OPENWSN_AES_HW\n+#define OPENWSN_OPENSERIAL_PRINTF\n+\n#include \"check_config.h\"\n#endif /* OPENWSN_CONFIG_H */\n"
},
{
"change_type": "MODIFY",
"old_path": "openapps/userialbridge/userialbridge.c",
"new_path": "openapps/userialbridge/userialbridge.c",
"diff": "@@ -32,12 +32,6 @@ void userialbridge_init(void) {\n// clear local variables\nmemset(&userialbridge_vars,0,sizeof(userialbridge_vars_t));\n- // register with openserial\n- userialbridge_vars.openserial_rsvp.cmdId = SERFRAME_PC2MOTE_TRIGGERUSERIALBRIDGE;\n- userialbridge_vars.openserial_rsvp.cb = userialbridge_triggerData;\n- userialbridge_vars.openserial_rsvp.next = NULL;\n- openserial_register(&userialbridge_vars.openserial_rsvp);\n-\n// register at UDP stack\nuserialbridge_vars.desc.port = WKP_UDP_SERIALBRIDGE;\nuserialbridge_vars.desc.callbackReceive = NULL;\n"
},
{
"change_type": "MODIFY",
"old_path": "openapps/userialbridge/userialbridge.h",
"new_path": "openapps/userialbridge/userialbridge.h",
"diff": "typedef struct {\nuint8_t txbuf[USERIALBRIDGE_MAXPAYLEN];\nuint8_t txbufLen;\n- openserial_rsvpt openserial_rsvp;\nudp_resource_desc_t desc; ///< resource descriptor for this module, used to register at UDP stack\n} userialbridge_vars_t;\n//=========================== prototypes ======================================\nvoid userialbridge_init(void);\n+\nvoid userialbridge_sendDone(OpenQueueEntry_t *msg, owerror_t error);\n+\nvoid userialbridge_triggerData(void);\n/**\n\\}\n"
},
{
"change_type": "MODIFY",
"old_path": "projects/python/SConscript.env",
"new_path": "projects/python/SConscript.env",
"diff": "@@ -374,7 +374,6 @@ functionsToChange = [\n'sha-private',\n# openserial\n'openserial_init',\n- 'openserial_register',\n'openserial_printStatus',\n'openserial_printInfoErrorCritical',\n'openserial_printData',\n@@ -385,8 +384,7 @@ functionsToChange = [\n'task_openserial_debugPrint',\n'task_printInputBufferOverflow',\n'task_printWrongCRCInput',\n- 'openserial_print_str',\n- 'openserial_print_uint32_t',\n+ 'openserial_printf',\n'openserial_debugPrint_timer_cb',\n'openserial_board_reset_cb',\n'openserial_getInputBufferFillLevel',\n@@ -394,14 +392,12 @@ functionsToChange = [\n'openserial_startInput',\n'openserial_startOutput',\n'openserial_stop',\n- 'openserial_handleCommands',\n'debugPrint_outBufferIndexes',\n'openserial_handleEcho',\n'openserial_handleRxFrame',\n'openserial_flush',\n'openserial_inhibitStart',\n'openserial_inhibitStop',\n- 'openserial_get6pInfo',\n'outputHdlcOpen',\n'outputHdlcWrite',\n'outputHdlcClose',\n@@ -792,9 +788,6 @@ functionsToChange = [\n'openudp_receive_default_handler',\n'udp_send_done_callback_ptr',\n'udp_receive_done_callback_ptr',\n- # rsvp\n- 'rsvp_qos_request',\n- 'rsvp_timer_cb',\n# idmanager\n'idmanager_init',\n'idmanager_getIsDAGroot',\n@@ -986,7 +979,6 @@ headerFiles = [\n'icmpv6rpl',\n# 04-TRAN\n'openudp',\n- 'rsvp',\n# cross-layers\n'idmanager',\n'openqueue',\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-867. Refactor openserial and fix openserial_printf
- Temporarily removes broken commands (will be updated later)
|
491,587 |
15.05.2020 16:03:43
| -7,200 |
c878741adf61ae87f5f163b5962c2baf1fed5b6b
|
move "MSF adaptive" to config.h
|
[
{
"change_type": "MODIFY",
"old_path": "SConscript",
"new_path": "SConscript",
"diff": "@@ -94,8 +94,6 @@ if env['l2_security'] == 1:\nenv.Append(CPPDEFINES='L2_SECURITY_ACTIVE')\nif 11 <= env['fix_channel'] <= 26:\nenv.Append(CPPDEFINES={'IEEE802154E_SINGLE_CHANNEL': env['fix_channel']})\n-if env['msf_adaptive'] == 1:\n- env.Append(CPPDEFINES='MSF_ADAPTING_TO_TRAFFIC')\nif env['deadline_option'] == 1:\nenv.Append(CPPDEFINES='DEADLINE_OPTION_ENABLED')\n"
},
{
"change_type": "MODIFY",
"old_path": "SConstruct",
"new_path": "SConstruct",
"diff": "@@ -83,8 +83,6 @@ project:\nnoadaptivesync Do not use adaptive synchronization.\nl2_security Use hop-by-hop encryption and authentication.\n0 (off), 1 (on)\n- msf_adaptive Enable/disable MSF for adding/deleting cell to adapt to traffic\n- 0 (disable), 1 (enable)\nide qtcreator\nfix_channel Set single channel hopping for debugging\n0 (off, default), i (on, channel=i [11:26])\n@@ -154,7 +152,6 @@ command_line_options = {\n'noadaptivesync': ['0', '1'],\n'l2_security': ['0', '1'],\n'fix_channel': ['0'] + map(str, range(11, 27)),\n- 'msf_adaptive': ['0', '1'],\n'deadline_option': ['0', '1'],\n'ide': ['none', 'qtcreator'],\n'revision': ['']\n@@ -305,13 +302,6 @@ command_line_vars.AddVariables(\nvalidate_option, # validator\nint, # converter\n),\n- (\n- 'msf_adaptive', # key\n- '', # help\n- command_line_options['msf_adaptive'][1], # default\n- validate_option, # validator\n- int, # converter\n- ),\n(\n'deadline_option', # key\n'', # help\n"
},
{
"change_type": "MODIFY",
"old_path": "inc/config.h",
"new_path": "inc/config.h",
"diff": "*/\n// #define OPENWSN_OPENSERIAL_PRINTF\n+/**\n+ * \\def OPENWSN_ADAPTIVE_MSF\n+ *\n+ * Allow the MSF algorithm to dynamically remove and allocate slots, based on the traffic load in the network.\n+ *\n+ */\n+#define OPENWSN_ADAPTIVE_MSF\n+\n#include \"check_config.h\"\n#endif /* OPENWSN_CONFIG_H */\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/02b-MAChigh/msf.c",
"new_path": "openstack/02b-MAChigh/msf.c",
"diff": "@@ -21,18 +21,24 @@ msf_vars_t msf_vars;\n// sixtop callback\nuint16_t msf_getMetadata(void);\n+\nmetadata_t msf_translateMetadata(void);\n+\nvoid msf_handleRCError(uint8_t code, open_addr_t *address);\nvoid msf_timer_housekeeping_cb(opentimers_id_t id);\n+\nvoid msf_timer_housekeeping_task(void);\nvoid msf_timer_waitretry_cb(opentimers_id_t id);\nvoid msf_timer_clear_task(void);\n+\n// msf private\nvoid msf_trigger6pAdd(void);\n+\nvoid msf_trigger6pDelete(void);\n+\nvoid msf_housekeeping(void);\n//=========================== public ==========================================\n@@ -76,7 +82,7 @@ void msf_init(void) {\n// called by schedule\nvoid msf_updateCellsElapsed(open_addr_t *neighbor, cellType_t type) {\n-#ifdef MSF_ADAPTING_TO_TRAFFIC\n+#ifdef OPENWSN_ADAPTIVE_MSF\nif (icmpv6rpl_isPreferredParent(neighbor) == FALSE) {\nreturn;\n}\n@@ -539,6 +545,7 @@ uint8_t msf_hashFunction_getChanneloffset(open_addr_t* address){\nvoid msf_setHashCollisionFlag(bool isCollision) {\nmsf_vars.f_hashCollision = isCollision;\n}\n+\nbool msf_getHashCollisionFlag(void) {\nreturn msf_vars.f_hashCollision;\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/02b-MAChigh/msf.h",
"new_path": "openstack/02b-MAChigh/msf.h",
"diff": "@@ -55,26 +55,34 @@ typedef struct {\n// admin\nvoid msf_init(void);\n+\nvoid msf_appPktPeriod(uint8_t numAppPacketsPerSlotFrame);\n+\nuint8_t msf_getsfid(void);\n+\nbool msf_candidateAddCellList(\ncellInfo_ht *cellList,\nuint8_t requiredCells\n);\n+\nbool msf_candidateRemoveCellList(\ncellInfo_ht *cellList,\nopen_addr_t *neighbor,\nuint8_t requiredCells,\nuint8_t cellOptions\n);\n+\n// called by schedule\nvoid msf_updateCellsElapsed(open_addr_t *neighbor, cellType_t cellType);\n+\nvoid msf_updateCellsUsed(open_addr_t *neighbor, cellType_t cellType);\nuint16_t msf_hashFunction_getSlotoffset(open_addr_t *address);\n+\nuint8_t msf_hashFunction_getChanneloffset(open_addr_t *address);\nvoid msf_setHashCollisionFlag(bool isCollision);\n+\nbool msf_getHashCollisionFlag(void);\nuint8_t msf_getPreviousNumCellsUsed(cellType_t cellType);\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-867. move "MSF adaptive" to config.h
|
491,587 |
19.05.2020 17:15:07
| -7,200 |
5962edce41a1e2db3e1200345dac2866e39c2e34
|
Add a check to warn users about slow SW encryption
|
[
{
"change_type": "MODIFY",
"old_path": "inc/check_config.h",
"new_path": "inc/check_config.h",
"diff": "#error 'Board name must be specified to check for configuration errors'\n#endif\n+#if (defined(OPENMOTE_CC2538) || \\\n+ defined(OPENMOTE_B) || \\\n+ defined(OPENMOTE_B_24GHZ) || \\\n+ defined(OPENMOTE_B_SUBGHZ) || \\\n+ defined(TELOSB) || \\\n+ defined(WSN430V13B) || \\\n+ defined(WSN430V14) || \\\n+ defined(GINA) || \\\n+ defined(Z1)) && \\\n+ !defined(OPENWSN_AES_HW)\n+#warning 'Software encryption might be too slow on certain hardware. It is recommend to use OPENWSN_AES_HW where possible.'\n+#endif\n+\n#if defined(PYTHON_BOARD) && defined(OPENWSN_AES_HW)\n#error 'Python board does not support hardware acceleration.'\n#endif\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-867. Add a check to warn users about slow SW encryption
|
491,587 |
28.05.2020 17:25:07
| -7,200 |
7102b58ea1b0ddab98e28a55fee94cc51e445e01
|
Rename openudp to udp
|
[
{
"change_type": "MODIFY",
"old_path": "bsp/boards/python/openwsnmodule_obj.h",
"new_path": "bsp/boards/python/openwsnmodule_obj.h",
"diff": "#include \"icmpv6rpl_obj.h\"\n#include \"coap_obj.h\"\n#include \"oscore_obj.h\"\n-#include \"openudp_obj.h\"\n+#include \"udp_obj.h\"\n#include \"idmanager_obj.h\"\n#include \"openqueue_obj.h\"\n#include \"openrandom_obj.h\"\n"
},
{
"change_type": "MODIFY",
"old_path": "inc/check_config.h",
"new_path": "inc/check_config.h",
"diff": "#error \"A CoAP dependent application is defined, but CoAP is not included in the build.\"\n#endif\n-#if !defined(OPENWSN_OPENUDP_C) && (\\\n+#if !defined(OPENWSN_UDP_C) && (\\\ndefined(OPENWSN_USERIALBRIDGE_C) || \\\ndefined(OPENWN_UECHO_C) || \\\ndefined(OPENWSN_UINJECT_C) || \\\n#endif\n#if defined(OPENWSN_COAP_C) && (\\\n- !defined(OPENWSN_OPENUDP_C) && !defined(OPEWSN_TCP_C))\n+ !defined(OPENWSN_UDP_C) && !defined(OPEWSN_TCP_C))\n#error \"CoAP requires a transport layer, i.e. UDP or TCP.\"\n#endif\n"
},
{
"change_type": "MODIFY",
"old_path": "inc/config.h",
"new_path": "inc/config.h",
"diff": "*\n*\n*\n- * Requires: OPENWSN_OPENUDP_C\n+ * Requires: OPENWSN_UDP_C\n*\n*/\n// ======================== Stack configuration ========================\n/**\n- * \\def OPENWSN_OPENUDP_C\n+ * \\def OPENWSN_UDP_C\n*\n* Implementation of the UDP protocol.\n*\n*/\n-#define OPENWSN_OPENUDP_C\n+#define OPENWSN_UDP_C\n/**\n* \\def OPENWSN_6LO_FRAGMENTATION_C\n"
},
{
"change_type": "MODIFY",
"old_path": "openapps/uecho/uecho.h",
"new_path": "openapps/uecho/uecho.h",
"diff": "*/\n#include \"config.h\"\n-#include \"openudp.h\"\n+#include \"udp.h\"\n//=========================== define ==========================================\n"
},
{
"change_type": "MODIFY",
"old_path": "openapps/uexpiration/uexpiration.h",
"new_path": "openapps/uexpiration/uexpiration.h",
"diff": "#include \"config.h\"\n#include \"opentimers.h\"\n-#include \"openudp.h\"\n+#include \"udp.h\"\n//=========================== define ==========================================\n//=========================== typedef =========================================\n"
},
{
"change_type": "MODIFY",
"old_path": "openapps/uexpiration_monitor/uexpiration_monitor.h",
"new_path": "openapps/uexpiration_monitor/uexpiration_monitor.h",
"diff": "*/\n#include \"config.h\"\n-#include \"openudp.h\"\n+#include \"udp.h\"\n//=========================== define ==========================================\n"
},
{
"change_type": "MODIFY",
"old_path": "openapps/uinject/uinject.h",
"new_path": "openapps/uinject/uinject.h",
"diff": "#include \"config.h\"\n#include \"opentimers.h\"\n-#include \"openudp.h\"\n+#include \"udp.h\"\n//=========================== define ==========================================\n"
},
{
"change_type": "MODIFY",
"old_path": "openapps/userialbridge/userialbridge.h",
"new_path": "openapps/userialbridge/userialbridge.h",
"diff": "#include \"config.h\"\n#include \"openserial.h\"\n-#include \"openudp.h\"\n+#include \"udp.h\"\n//=========================== define ==========================================\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/03b-IPv6/forwarding.c",
"new_path": "openstack/03b-IPv6/forwarding.c",
"diff": "#include \"neighbors.h\"\n#include \"icmpv6.h\"\n#include \"icmpv6rpl.h\"\n-#include \"openudp.h\"\n+#include \"udp.h\"\n#include \"debugpins.h\"\n#include \"scheduler.h\"\n@@ -246,7 +246,7 @@ void forwarding_sendDone(OpenQueueEntry_t *msg, owerror_t error) {\n// indicate sendDone to upper layer\nswitch (msg->l4_protocol) {\n-#ifdef OPENWSN_OPENUDP_C\n+#ifdef OPENWSN_UDP_C\ncase IANA_UDP:\nopenudp_sendDone(msg, error);\nbreak;\n@@ -318,7 +318,7 @@ void forwarding_receive(\npacketfunctions_tossHeader(msg, ipv6_inner_header->header_length);\n// indicate received packet to upper layer\nswitch (msg->l4_protocol) {\n-#ifdef OPENWSN_OPENUDP_C\n+#ifdef OPENWSN_UDP_C\ncase IANA_UDP:\nopenudp_receive(msg);\nbreak;\n"
},
{
"change_type": "RENAME",
"old_path": "openstack/04-TRAN/openudp.c",
"new_path": "openstack/04-TRAN/udp.c",
"diff": "#include \"config.h\"\n-#if defined(OPENWSN_OPENUDP_C)\n+#if defined(OPENWSN_UDP_C)\n#include \"opendefs.h\"\n-#include \"openudp.h\"\n+#include \"udp.h\"\n#include \"openserial.h\"\n#include \"packetfunctions.h\"\n#include \"forwarding.h\"\n@@ -245,4 +245,4 @@ static void openudp_receive_default_handler(OpenQueueEntry_t* msg) {\nopenqueue_freePacketBuffer(msg);\n}\n-#endif /* OPENWSN_OPENUDP_C */\n+#endif /* OPENWSN_UDP_C */\n"
},
{
"change_type": "RENAME",
"old_path": "openstack/04-TRAN/openudp.dox",
"new_path": "openstack/04-TRAN/udp.dox",
"diff": "/**\n-\\defgroup OpenUdp OpenUdp\n+\\defgroup Udp Udp\n\\brief UDP implementation.\n"
},
{
"change_type": "RENAME",
"old_path": "openstack/04-TRAN/openudp.h",
"new_path": "openstack/04-TRAN/udp.h",
"diff": "-#ifndef __OPENUDP_H\n-#define __OPENUDP_H\n+#ifndef OPENWSN_UDP_H\n+#define OPENWSN_UDP_H\n/**\n\\addtogroup Transport\n\\{\n-\\addtogroup OpenUdp\n+\\addtogroup Udp\n\\{\n*/\n@@ -77,4 +77,4 @@ bool openudp_debugPrint(void);\n\\}\n*/\n-#endif\n+#endif /* OPENWSN_UDP_H */\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/SConscript",
"new_path": "openstack/SConscript",
"diff": "@@ -28,7 +28,7 @@ sources_c = [\nos.path.join('03b-IPv6','icmpv6echo.c'),\nos.path.join('03b-IPv6','icmpv6rpl.c'),\n#=== 04-TRAN\n- os.path.join('04-TRAN','openudp.c'),\n+ os.path.join('04-TRAN','udp.c'),\n#=== cross-layers\nos.path.join('cross-layers','idmanager.c'),\nos.path.join('cross-layers','openqueue.c'),\n@@ -58,7 +58,7 @@ sources_h = [\nos.path.join('03b-IPv6','icmpv6echo.h'),\nos.path.join('03b-IPv6','icmpv6rpl.h'),\n#=== 04-TRAN\n- os.path.join('04-TRAN','openudp.h'),\n+ os.path.join('04-TRAN','udp.h'),\n#=== cross-layers\nos.path.join('cross-layers','idmanager.h'),\nos.path.join('cross-layers','openqueue.h'),\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/openstack.c",
"new_path": "openstack/openstack.c",
"diff": "#include \"icmpv6echo.h\"\n#include \"icmpv6rpl.h\"\n//-- 04-TRAN\n-#include \"openudp.h\"\n+#include \"udp.h\"\n//===== coap-layer\n#include \"openweb.h\"\n@@ -85,7 +85,7 @@ void openstack_init(void) {\nicmpv6rpl_init();\n//-- 04-TRAN\n-#if defined(OPEWSN_OPENUDP_C)\n+#if defined(OPENWSN_UDP_C)\nopenudp_init();\n#endif\n"
},
{
"change_type": "MODIFY",
"old_path": "openweb/opencoap/coap.h",
"new_path": "openweb/opencoap/coap.h",
"diff": "#include \"config.h\"\n#include \"opentimers.h\"\n-#include \"openudp.h\"\n+#include \"udp.h\"\n//=========================== define ==========================================\n"
},
{
"change_type": "MODIFY",
"old_path": "projects/python/SConscript.env",
"new_path": "projects/python/SConscript.env",
"diff": "@@ -978,7 +978,7 @@ headerFiles = [\n'icmpv6echo',\n'icmpv6rpl',\n# 04-TRAN\n- 'openudp',\n+ 'udp',\n# cross-layers\n'idmanager',\n'openqueue',\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-867. Rename openudp to udp
|
491,587 |
29.05.2020 00:27:32
| -7,200 |
02ada01cda339465df44ff384bcf478741dfa94c
|
Fix compiler warning when building python board
|
[
{
"change_type": "MODIFY",
"old_path": "bsp/boards/python/radio_obj.c",
"new_path": "bsp/boards/python/radio_obj.c",
"diff": "@@ -297,7 +297,8 @@ void radio_getReceivedFrame(OpenMote* self,\nreturn;\n}\nif (PyTuple_Size(result) != 4) {\n- printf(\"[CRITICAL] radio_getReceivedFrame() did not return a tuple of exactly 4 elements %d\\r\\n\",PyList_Size(result));\n+ printf(\"[CRITICAL] radio_getReceivedFrame() did not return a tuple of exactly 4 elements %ld\\r\\n\",\n+ PyList_Size(result));\nreturn;\n}\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-867. Fix compiler warning when building python board
|
491,587 |
29.05.2020 00:32:23
| -7,200 |
83f47b8a5e88cfdb12e3cfa0202b1e1b0f9cb6da
|
Use BOARD definition to enable/disable BSP specific features
|
[
{
"change_type": "MODIFY",
"old_path": "drivers/common/crypto/ccms.c",
"new_path": "drivers/common/crypto/ccms.c",
"diff": "//=========================== prototypes ======================================\n-#ifndef OPENWSN_AES_HW\n+#ifndef BOARD_CRYPTOENGINE_ENABLED\nstatic owerror_t aes_cbc_mac(uint8_t *a,\nuint8_t len_a,\n@@ -56,7 +56,7 @@ owerror_t aes128_ccms_enc(uint8_t *a,\nuint8_t key[16],\nuint8_t len_mac) {\n-#ifdef OPENWSN_AES_HW\n+#ifdef BOARD_CRYPTOENGINE_ENABLED\nreturn cryptoengine_aes_ccms_enc(a, len_a, m, len_m, nonce, l, key, len_mac);\n#else\nuint8_t mac[CBC_MAX_MAC_SIZE];\n@@ -87,7 +87,7 @@ owerror_t aes128_ccms_dec(uint8_t *a,\nuint8_t key[16],\nuint8_t len_mac) {\n-#ifdef OPENWSN_AES_HW\n+#ifdef BOARD_CRYPTOENGINE_ENABLED\nreturn cryptoengine_aes_ccms_dec(a, len_a, m, len_m, nonce, l, key, len_mac);\n#else\nuint8_t mac[CBC_MAX_MAC_SIZE];\n@@ -113,7 +113,7 @@ owerror_t aes128_ccms_dec(uint8_t *a,\n}\n//=========================== private =========================================\n-#ifndef OPENWSN_AES_HW\n+#ifndef BOARD_CRYPTOENGINE_ENABLED\n/**\n\\brief CBC-MAC generation specific to CCM*.\n"
},
{
"change_type": "MODIFY",
"old_path": "drivers/common/openserial.c",
"new_path": "drivers/common/openserial.c",
"diff": "@@ -233,6 +233,7 @@ owerror_t openserial_printData(uint8_t *buffer, uint8_t length) {\n}\nowerror_t openserial_printSniffedPacket(uint8_t *buffer, uint8_t length, uint8_t channel) {\n+#ifdef BOARD_OPENSERIAL_SNIFFER\nuint8_t i;\noutputHdlcOpen();\n@@ -248,11 +249,12 @@ owerror_t openserial_printSniffedPacket(uint8_t *buffer, uint8_t length, uint8_t\n// start TX'ing\nopenserial_flush();\n+#endif\nreturn E_SUCCESS;\n}\nowerror_t openserial_printf(char *buffer, ...) {\n-#ifdef OPENWSN_OPENSERIAL_PRINTF\n+#ifdef BOARD_OPENSERIAL_PRINTF\nuint8_t i;\nchar *ptr, *tmp;\nint d;\n"
},
{
"change_type": "MODIFY",
"old_path": "inc/check_config.h",
"new_path": "inc/check_config.h",
"diff": "defined(WSN430V14) || \\\ndefined(GINA) || \\\ndefined(Z1)) && \\\n- !defined(OPENWSN_AES_HW)\n-#warning 'Software encryption might be too slow on certain hardware. It is recommend to use OPENWSN_AES_HW where possible.'\n+ defined(L2_SECURITY_ACTIVE) && \\\n+ !defined(BOARD_CRYPTOENGINE_ENABLED)\n+#warning 'Software encryption might be too slow on certain hardware. It is recommend to use BOARD_CRYTPOENGINE_ENABLED where possible.'\n#endif\n-#if defined(PYTHON_BOARD) && defined(OPENWSN_AES_HW)\n+#if defined(PYTHON_BOARD) && defined(BOARD_CRYPTOENGINE_ENABLED)\n#error 'Python board does not support hardware acceleration.'\n#endif\n"
},
{
"change_type": "MODIFY",
"old_path": "inc/config.h",
"new_path": "inc/config.h",
"diff": "// #define OPENWSN_USERIALBRIDGE_C\n-// ========================== Application Layer ==========================\n-\n/**\n- * \\def OPENWSN_COAP_C\n+ * \\def OPENWSN_CJOIN_C\n*\n- * Implementation of the CoAP protocol.\n+ * The CJOIN protocol performs a secure joining and install link-layer keys\n+ *\n+ * Requires: OPENWSN_UDP_C, OPENWSN_COAP_C\n*\n*/\n-#define OPENWSN_COAP_C\n+#define OPENWSN_CJOIN_C\n+\n+// ======================= OpenWeb configuration =======================\n/**\n- * \\def OPENWSN_CJOIN_C\n+ * \\def OPENWSN_COAP_C\n*\n- * The CJOIN protocol performs a secure joining and install link-layer keys\n+ * Implementation of the CoAP protocol.\n*\n+ * Requires: OPENWSN_UDP_C\n*/\n-#define OPENWSN_CJOIN_C\n+#define OPENWSN_COAP_C\n// ======================== Stack configuration ========================\n#define OPENWSN_MAX_NUM_BIGPKTS 2\n/**\n- * \\def OPENWSN_AES_HW\n+ * \\def OPENWSN_ADAPTIVE_MSF\n+ *\n+ * Allow the MSF algorithm to dynamically remove and allocate slots, based on the traffic load in the network.\n+ *\n+ */\n+#define OPENWSN_ADAPTIVE_MSF\n+\n+// ======================== Board configuration ========================\n+\n+/**\n+ * \\def BOARD_CRYPTOENGINE_ENABLED\n*\n* Enable AES hardware acceleration. This options is only available on boards that support hardware acceleration. It\n* cannot be combined with the python board.\n*\n*/\n-// #define OPENWSN_AES_HW\n+// #define BOARD_CRYPTOENGINE_ENABLED\n/**\n- * \\def OPENWSN_OPENSERIAL_PRINTF\n+ * \\def BOARD_OPENSERIAL_PRINTF\n*\n* Enable usage of openserial_printf function to print strings over the serial port.\n*\n*/\n-// #define OPENWSN_OPENSERIAL_PRINTF\n+// #define BOARD_OPENSERIAL_PRINTF\n+\n/**\n- * \\def OPENWSN_ADAPTIVE_MSF\n+ * \\def BOARD_OPENSERIAL_SNIFFER\n*\n- * Allow the MSF algorithm to dynamically remove and allocate slots, based on the traffic load in the network.\n+ * Prints sniffed packet over serial.\n*\n*/\n-#define OPENWSN_ADAPTIVE_MSF\n+// #define BOARD_OPENSERIAL_SNIFFER\n#include \"check_config.h\"\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-867. Use BOARD definition to enable/disable BSP specific features
|
491,587 |
29.05.2020 00:32:57
| -7,200 |
949dd98d63ad6f988dc9890081ce8ce37d3fb2b3
|
ICMPv6 ECHO switch in config.h
|
[
{
"change_type": "MODIFY",
"old_path": "inc/config.h",
"new_path": "inc/config.h",
"diff": "*/\n#define OPENWSN_ADAPTIVE_MSF\n+/**\n+ * \\def OPENWSN_ICMPV6ECHO_c\n+ *\n+ * Enables the icmpv6 echo (ping) functionality\n+ */\n+#define OPENWSN_ICMPV6ECHO_C\n+\n// ======================== Board configuration ========================\n/**\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/03b-IPv6/icmpv6.c",
"new_path": "openstack/03b-IPv6/icmpv6.c",
"diff": "+#include \"config.h\"\n#include \"opendefs.h\"\n#include \"icmpv6.h\"\n#include \"icmpv6echo.h\"\n@@ -24,10 +25,12 @@ owerror_t icmpv6_send(OpenQueueEntry_t* msg) {\nvoid icmpv6_sendDone(OpenQueueEntry_t *msg, owerror_t error) {\nmsg->owner = COMPONENT_ICMPv6;\nswitch (msg->l4_sourcePortORicmpv6Type) {\n+#if defined(OPENWSN_ICMPV6ECHO_C)\ncase IANA_ICMPv6_ECHO_REQUEST:\ncase IANA_ICMPv6_ECHO_REPLY:\nicmpv6echo_sendDone(msg, error);\nbreak;\n+#endif\ncase IANA_ICMPv6_RPL:\nicmpv6rpl_sendDone(msg, error);\nbreak;\n@@ -45,10 +48,12 @@ void icmpv6_receive(OpenQueueEntry_t* msg) {\nmsg->owner = COMPONENT_ICMPv6;\nmsg->l4_sourcePortORicmpv6Type = ((ICMPv6_ht *) (msg->payload))->type;\nswitch (msg->l4_sourcePortORicmpv6Type) {\n+#if defined(OPENWSN_ICMPV6ECHO_C)\ncase IANA_ICMPv6_ECHO_REQUEST:\ncase IANA_ICMPv6_ECHO_REPLY:\nicmpv6echo_receive(msg);\nbreak;\n+#endif\ncase IANA_ICMPv6_RPL:\nicmpv6rpl_receive(msg);\nbreak;\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/03b-IPv6/icmpv6echo.c",
"new_path": "openstack/03b-IPv6/icmpv6echo.c",
"diff": "+#include \"config.h\"\n+\n+#if defined(OPENWSN_ICMPV6ECHO_C)\n+\n#include \"opendefs.h\"\n#include \"icmpv6echo.h\"\n#include \"icmpv6.h\"\n@@ -161,4 +165,5 @@ void icmpv6echo_setIsReplyEnabled(bool isEnabled) {\nicmpv6echo_vars.isReplyEnabled = isEnabled;\n}\n+#endif /* OPENWSN_ICMPV6ECHO_C */\n//=========================== private =========================================\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/openstack.c",
"new_path": "openstack/openstack.c",
"diff": "@@ -81,7 +81,11 @@ void openstack_init(void) {\n//-- 03b-IPv6\nforwarding_init();\nicmpv6_init();\n+\n+#if defined(OPENWSN_ICMPV6_C)\nicmpv6echo_init();\n+#endif\n+\nicmpv6rpl_init();\n//-- 04-TRAN\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-867. ICMPv6 ECHO switch in config.h
|
491,587 |
28.05.2020 22:41:10
| -7,200 |
29f82c69aec76109fe2b2476b9c059a0bc1ee856
|
Move force topology option to config.h
|
[
{
"change_type": "MODIFY",
"old_path": "SConscript",
"new_path": "SConscript",
"diff": "@@ -84,8 +84,6 @@ if env['panid']:\nenv.Append(CPPDEFINES={'PANID_DEFINED': env['panid']})\nif env['dagroot'] == 1:\nenv.Append(CPPDEFINES='DAGROOT')\n-if env['forcetopology'] == 1:\n- env.Append(CPPDEFINES='FORCETOPOLOGY')\nif env['atmel_24ghz'] == 1:\nenv.Append(CPPDEFINES='ATMEL_24GHZ')\nif env['noadaptivesync'] == 1:\n"
},
{
"change_type": "MODIFY",
"old_path": "SConstruct",
"new_path": "SConstruct",
"diff": "@@ -78,8 +78,6 @@ project:\ncannot send commands to the mote (e.g. IoT-LAB platform),\nuse this flag to build a firmware image which is, by\ndefault, in DAG root mode.\n- forcetopology Force the topology to the one indicated in the\n- openstack/02a-MAClow/topology.c file.\nnoadaptivesync Do not use adaptive synchronization.\nide qtcreator\nfix_channel Set single channel hopping for debugging\n@@ -144,7 +142,6 @@ command_line_options = {\n'simhostpy': [''], # No reasonable default\n'panid': [''],\n'dagroot': ['0', '1'],\n- 'forcetopology': ['0', '1'],\n'debug': ['0', '1'],\n'atmel_24ghz': ['0', '1'],\n'noadaptivesync': ['0', '1'],\n@@ -257,13 +254,6 @@ command_line_vars.AddVariables(\nvalidate_option, # validator\nint, # converter\n),\n- (\n- 'forcetopology', # key\n- '', # help\n- command_line_options['forcetopology'][0], # default\n- validate_option, # validator\n- int, # converter\n- ),\n(\n'debug', # key\n'', # help\n"
},
{
"change_type": "MODIFY",
"old_path": "inc/config.h",
"new_path": "inc/config.h",
"diff": "*/\n#define OPENWSN_IEEE802154E_SECURITY_C\n+/**\n+ * \\def OPENWSN_FORCETOPOLOGY_C\n+ *\n+ * Force the networks topology according the code in topology.c\n+ *\n+ */\n+// #define OPENWSN_FORCETOPOLOGY_C\n+\n// ======================== Board configuration ========================\n/**\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/02a-MAClow/topology.c",
"new_path": "openstack/02a-MAClow/topology.c",
"diff": "+#include \"config.h\"\n#include \"opendefs.h\"\n#include \"topology.h\"\n#include \"idmanager.h\"\n@@ -51,7 +52,7 @@ topology.\n\\return FALSE if the packet should be silently dropped.\n*/\nbool topology_isAcceptablePacket(ieee802154_header_iht* ieee802514_header) {\n-#ifdef FORCETOPOLOGY\n+#if defined(OPENWSN_FORCETOPOLOGY_C)\nbool returnVal;\nreturnVal=FALSE;\n@@ -98,7 +99,7 @@ bool topology_isAcceptablePacket(ieee802154_header_iht* ieee802514_header) {\nreturn returnVal;\n#else\nreturn TRUE;\n-#endif\n+#endif /* OPENWSN_FORCETOPOLOGY_C */\n}\n//=========================== private =========================================\n\\ No newline at end of file\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/02a-MAClow/topology.h",
"new_path": "openstack/02a-MAClow/topology.h",
"diff": "-#ifndef __TOPOLOGY_H\n-#define __TOPOLOGY_H\n+#ifndef OPENWSN_TOPOLOGY_H\n+#define OPENWSN_TOPOLOGY_H\n/**\n\\addtogroup MAClow\n@@ -28,4 +28,4 @@ bool topology_isAcceptablePacket(ieee802154_header_iht* ieee802514_header);\n\\}\n*/\n-#endif\n+#endif /* OPENWSN_FORCE_TOPOLOGY */\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-867. Move force topology option to config.h
|
491,587 |
28.05.2020 22:52:22
| -7,200 |
ca594ff1bdc3b24971ed7c6bcb64c261812bb52a
|
Move adaptive sync option to config.h
|
[
{
"change_type": "MODIFY",
"old_path": "SConscript",
"new_path": "SConscript",
"diff": "@@ -86,8 +86,6 @@ if env['dagroot'] == 1:\nenv.Append(CPPDEFINES='DAGROOT')\nif env['atmel_24ghz'] == 1:\nenv.Append(CPPDEFINES='ATMEL_24GHZ')\n-if env['noadaptivesync'] == 1:\n- env.Append(CPPDEFINES='NOADAPTIVESYNC')\nif 11 <= env['fix_channel'] <= 26:\nenv.Append(CPPDEFINES={'IEEE802154E_SINGLE_CHANNEL': env['fix_channel']})\nif env['deadline_option'] == 1:\n"
},
{
"change_type": "MODIFY",
"old_path": "SConstruct",
"new_path": "SConstruct",
"diff": "@@ -78,7 +78,6 @@ project:\ncannot send commands to the mote (e.g. IoT-LAB platform),\nuse this flag to build a firmware image which is, by\ndefault, in DAG root mode.\n- noadaptivesync Do not use adaptive synchronization.\nide qtcreator\nfix_channel Set single channel hopping for debugging\n0 (off, default), i (on, channel=i [11:26])\n@@ -144,7 +143,6 @@ command_line_options = {\n'dagroot': ['0', '1'],\n'debug': ['0', '1'],\n'atmel_24ghz': ['0', '1'],\n- 'noadaptivesync': ['0', '1'],\n'fix_channel': ['0'] + map(str, range(11, 27)),\n'deadline_option': ['0', '1'],\n'ide': ['none', 'qtcreator'],\n@@ -268,13 +266,6 @@ command_line_vars.AddVariables(\nvalidate_option, # validator\nint, # converter\n),\n- (\n- 'noadaptivesync', # key\n- '', # help\n- command_line_options['noadaptivesync'][0], # default\n- validate_option, # validator\n- int, # converter\n- ),\n(\n'fix_channel', # key\n'', # help\n"
},
{
"change_type": "MODIFY",
"old_path": "inc/config.h",
"new_path": "inc/config.h",
"diff": "#define OPENWSN_UDP_C\n+\n/**\n* \\def OPENWSN_6LO_FRAGMENTATION_C\n*\n// #define OPENWSN_MAX_PKTSIZE_SUPPORTED 1320\n// #define OPENWSN_MAX_NUM_BIGPKTS 2\n+\n/**\n* \\def OPENWSN_ADAPTIVE_MSF\n*\n*/\n// #define OPENWSN_ADAPTIVE_MSF\n+\n/**\n* \\def OPENWSN_ICMPV6ECHO_c\n*\n*/\n// #define OPENWSN_ICMPV6ECHO_C\n+\n/**\n* \\def OPENWSN_IEEE802154E_SECURITY_C\n*\n*/\n#define OPENWSN_IEEE802154E_SECURITY_C\n+\n/**\n* \\def OPENWSN_FORCETOPOLOGY_C\n*\n*/\n// #define OPENWSN_FORCETOPOLOGY_C\n+\n+/**\n+ * \\def OPENWSN_ADAPTIVESYNC_C\n+ *\n+ * Force the networks topology according the code in topology.c\n+ *\n+ */\n+// #define OPENWSN_ADAPTIVE_SYNC_C\n+\n// ======================== Board configuration ========================\n/**\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/02a-MAClow/IEEE802154E.c",
"new_path": "openstack/02a-MAClow/IEEE802154E.c",
"diff": "+#include \"config.h\"\n#include \"opendefs.h\"\n#include \"IEEE802154E.h\"\n#include \"radio.h\"\n@@ -354,7 +355,7 @@ void isr_ieee154e_newSlot(opentimers_id_t id) {\nactivity_synchronize_newSlot();\n}\n} else {\n-#ifdef ADAPTIVE_SYNC\n+#if defined(OPENWSN_ADAPTIVE_SYNC_C)\n// adaptive synchronization\nadaptive_sync_countCompensationTimeout();\n#endif\n@@ -2605,8 +2606,8 @@ void synchronizePacket(PORT_TIMER_WIDTH timeReceived) {\nisr_ieee154e_newSlot // callback\n);\nieee154e_vars.slotDuration = newPeriod;\n-#ifdef ADAPTIVE_SYNC\n// indicate time correction to adaptive sync module\n+#if defined(OPENWSN_ADAPTIVE_SYNC_C)\nadaptive_sync_indicateTimeCorrection(timeCorrection,ieee154e_vars.dataReceived->l2_nextORpreviousHop);\n#endif\n// reset the de-synchronization timeout\n@@ -2654,7 +2655,8 @@ void synchronizeAck(PORT_SIGNED_INT_WIDTH timeCorrection) {\n// reset the de-synchronization timeout\nieee154e_vars.deSyncTimeout = DESYNCTIMEOUT;\n-#ifdef ADAPTIVE_SYNC\n+\n+#if defined(OPENWSN_ADAPTIVE_SYNC_C)\n// indicate time correction to adaptive sync module\nadaptive_sync_indicateTimeCorrection((-timeCorrection),ieee154e_vars.ackReceived->l2_nextORpreviousHop);\n#endif\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/02a-MAClow/adaptive_sync.c",
"new_path": "openstack/02a-MAClow/adaptive_sync.c",
"diff": "\\author Tengfei Chang <tengfei.chang@gmail.com>, January ,2014.\n*/\n+#include \"config.h\"\n+\n+#if defined(OPENWSN_ADAPTIVE_SYNC_C)\n+\n#include \"opendefs.h\"\n#include \"adaptive_sync.h\"\n#include \"IEEE802154E.h\"\n@@ -263,7 +267,7 @@ void adaptive_sync_countCompensationTimeout_compoundSlots(uint16_t compoundSlots\n\\brief set driftChanged to true.\n*/\nvoid adaptive_sync_driftChanged(void) {\n-#ifndef NOADAPTIVESYNC\nadaptive_sync_vars.driftChanged = TRUE;\n-#endif\n}\n+\n+#endif /* OPENWSN_ADAPTIVE_SYNC_C */\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/02a-MAClow/adaptive_sync.h",
"new_path": "openstack/02a-MAClow/adaptive_sync.h",
"diff": "-#ifndef __ADAPTIVE_SYNC_H\n-#define __ADAPTIVE_SYNC_H\n+#ifndef OPENWSN_ADAPTIVE_SYNC_H\n+#define OPENWSN_ADAPTIVE_SYNC_H\n#include \"board.h\"\n#include \"opendefs.h\"\n@@ -47,16 +47,20 @@ typedef struct {\n//=========================== prototypes ======================================\nvoid adaptive_sync_init(void);\n+\nvoid adaptive_sync_indicateTimeCorrection(int16_t timeCorrection, open_addr_t timesource);\n+\nvoid adaptive_sync_calculateCompensatedSlots(int16_t timeCorrection);\nvoid adaptive_sync_countCompensationTimeout(void);\n+\nvoid adaptive_sync_countCompensationTimeout_compoundSlots(uint16_t compoundSlots);\n+\nvoid adaptive_sync_driftChanged(void);\n/**\n\\}\n\\}\n*/\n-#endif\n+#endif /* OPENWSN_ADAPTIVE_SYNC_H */\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/SConscript",
"new_path": "openstack/SConscript",
"diff": "@@ -11,7 +11,7 @@ sources_c = [\nos.path.join('02a-MAClow','topology.c'),\nos.path.join('02a-MAClow','IEEE802154.c'),\nos.path.join('02a-MAClow','IEEE802154E.c'),\n- # os.path.join('02a-MAClow','adaptive_sync.c'),\n+ os.path.join('02a-MAClow','adaptive_sync.c'),\nos.path.join('02a-MAClow','IEEE802154_security.c'),\n#=== 02b-MAChigh\nos.path.join('02b-MAChigh','neighbors.c'),\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/openstack.c",
"new_path": "openstack/openstack.c",
"diff": "@@ -63,7 +63,10 @@ void openstack_init(void) {\nopenrandom_init();\n//-- 02a-TSCH\n- // adaptive_sync_init();\n+#if defined(OPENWSN_ADAPTIVE_SYNC_C)\n+ adaptive_sync_init();\n+#endif\n+\nieee154e_init();\n//-- 02b-RES\nschedule_init();\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-867. Move adaptive sync option to config.h
|
491,587 |
28.05.2020 23:08:04
| -7,200 |
73c9db2c64dd5538c6f761a032108eeb7e5178df
|
Update header guards + remove legacy comments
|
[
{
"change_type": "MODIFY",
"old_path": "openstack/02a-MAClow/IEEE802154E.c",
"new_path": "openstack/02a-MAClow/IEEE802154E.c",
"diff": "@@ -345,7 +345,6 @@ void isr_ieee154e_newSlot(opentimers_id_t id) {\n);\nieee154e_vars.slotDuration = TsSlotDuration;\n- // radiotimer_setPeriod(ieee154e_vars.slotDuration);\nif (ieee154e_vars.isSync == FALSE) {\nif (idmanager_getIsDAGroot() == TRUE) {\nchangeIsSync(TRUE);\n@@ -998,7 +997,6 @@ port_INLINE void activity_ti1ORri1(void) {\nisr_ieee154e_newSlot // callback\n);\nieee154e_vars.slotDuration = TsSlotDuration * (ieee154e_vars.numOfSleepSlots);\n- // radiotimer_setPeriod(TsSlotDuration*(ieee154e_vars.numOfSleepSlots));\n//increase ASN by numOfSleepSlots-1 slots as at this slot is already incremented by 1\nfor (i = 0; i < ieee154e_vars.numOfSleepSlots - 1; i++) {\n@@ -1114,7 +1112,6 @@ port_INLINE void activity_ti1ORri1(void) {\nTIME_TICS, // timetype\nisr_ieee154e_timer // callback\n);\n- // radiotimer_schedule(DURATION_tt1);\n#endif\nbreak;\n}\n@@ -1172,8 +1169,6 @@ port_INLINE void activity_ti2(void) {\nTIME_TICS, // timetype\nisr_ieee154e_timer // callback\n);\n- // radiotimer_schedule(DURATION_tt2);\n-\n// make a local copy of the frame\npacketfunctions_duplicatePacket(&ieee154e_vars.localCopyForTransmission, ieee154e_vars.dataToSend);\n@@ -1344,7 +1339,6 @@ port_INLINE void activity_ti5(PORT_TIMER_WIDTH capturedTime) {\nTIME_TICS, // timetype\nisr_ieee154e_timer // callback\n);\n- // radiotimer_schedule(DURATION_tt5);\n#endif\n} else {\n// indicate succesful Tx to schedule to keep statistics\n@@ -1374,7 +1368,6 @@ port_INLINE void activity_ti6(void) {\nTIME_TICS, // timetype\nisr_ieee154e_timer // callback\n);\n- // radiotimer_schedule(DURATION_tt6);\n// configure the radio to listen to the default synchronizing channel\nradio_setFrequency(ieee154e_vars.freq, FREQ_RX);\n@@ -1472,7 +1465,6 @@ port_INLINE void activity_ti8(PORT_TIMER_WIDTH capturedTime) {\nTIME_TICS, // timetype\nisr_ieee154e_timer // callback\n);\n- // radiotimer_schedule(DURATION_tt8);\n#endif\n}\n@@ -1502,7 +1494,6 @@ port_INLINE void activity_ti9(PORT_TIMER_WIDTH capturedTime) {\nTIME_TICS, // timetype\nisr_ieee154e_newSlot // callback\n);\n- // radiotimer_cancel();\n#endif\n// turn off the radio\nradio_rfOff();\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/02a-MAClow/IEEE802154E.h",
"new_path": "openstack/02a-MAClow/IEEE802154E.h",
"diff": "-#ifndef __IEEE802154E_H\n-#define __IEEE802154E_H\n+#ifndef OPENWSN_IEEE802154E_H\n+#define OPENWSN_IEEE802154E_H\n/**\n\\addtogroup MAClow\n@@ -354,5 +354,5 @@ bool debugPrint_macStats(void);\n\\}\n*/\n-#endif\n+#endif /* OPENWSN_IEEE802154E_H */\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-867. Update header guards + remove legacy comments
|
491,587 |
28.05.2020 23:08:43
| -7,200 |
416f809a1bd52d1bb5cb8b590e839095fb25c170
|
Update header guards IEEE802154.h
|
[
{
"change_type": "MODIFY",
"old_path": "openstack/02a-MAClow/IEEE802154.h",
"new_path": "openstack/02a-MAClow/IEEE802154.h",
"diff": "-#ifndef __IEEE802154_H\n-#define __IEEE802154_H\n+#ifndef OPENWSN_IEEE802154_H\n+#define OPENWSN_IEEE802154_H\n/**\n\\addtogroup MAClow\n@@ -162,4 +162,4 @@ void ieee802154_retrieveHeader (OpenQueueEntry_t* msg,\n\\}\n*/\n-#endif\n+#endif /* OPENWSN_IEEE802154_H */\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-867. Update header guards IEEE802154.h
|
491,587 |
28.05.2020 23:09:13
| -7,200 |
0f9ea8fb1c11d3e717cee76bdcad5af1fc02b6cd
|
Update header guards msf.h
|
[
{
"change_type": "MODIFY",
"old_path": "openstack/02b-MAChigh/msf.h",
"new_path": "openstack/02b-MAChigh/msf.h",
"diff": "-#ifndef __MSF_H\n-#define __MSF_H\n+#ifndef OPENWSN_MSF_H\n+#define OPENWSN_MSF_H\n/**\n\\addtogroup MAChigh\n@@ -88,4 +88,4 @@ uint8_t msf_getPreviousNumCellsUsed(cellType_t cellType);\n\\}\n*/\n-#endif\n+#endif /* OPENWSN_MSF_H */\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-867. Update header guards msf.h
|
491,587 |
28.05.2020 23:10:03
| -7,200 |
1012ed57657bfcefd47b6e0b7280e04b963f0915
|
Update header guards neighbors.h + linter pass
|
[
{
"change_type": "MODIFY",
"old_path": "openstack/02b-MAChigh/neighbors.c",
"new_path": "openstack/02b-MAChigh/neighbors.c",
"diff": "@@ -22,12 +22,12 @@ void registerNewNeighbor(\nuint8_t joinPrio,\nbool insecure\n);\n+\nbool isNeighbor(open_addr_t *neighbor);\n+\nvoid removeNeighbor(uint8_t neighborIndex);\n-bool isThisRowMatching(\n- open_addr_t* address,\n- uint8_t rowNumber\n- );\n+\n+bool isThisRowMatching(open_addr_t *address, uint8_t rowNumber);\n//=========================== public ==========================================\n@@ -35,11 +35,9 @@ bool isThisRowMatching(\n\\brief Initializes this module.\n*/\nvoid neighbors_init(void) {\n-\n// clear module variables\nmemset(&neighbors_vars, 0, sizeof(neighbors_vars_t));\n// The .used fields get reset to FALSE by this memset.\n-\n}\n//===== getters\n@@ -73,6 +71,7 @@ int8_t neighbors_getRssi(uint8_t index){\nuint8_t neighbors_getNumTx(uint8_t index) {\nreturn neighbors_vars.neighbors[index].numTx;\n}\n+\n/**\n\\brief Find neighbor to which to send KA.\n@@ -259,10 +258,7 @@ bool neighbors_isNeighborWithHigherDAGrank(uint8_t index) {\nbool neighbors_reachedMinimalTransmission(uint8_t index) {\nbool returnVal;\n- if (\n- neighbors_vars.neighbors[index].used == TRUE &&\n- neighbors_vars.neighbors[index].numTx > MINIMAL_NUM_TX\n- ) {\n+ if (neighbors_vars.neighbors[index].used == TRUE && neighbors_vars.neighbors[index].numTx > MINIMAL_NUM_TX) {\nreturnVal = TRUE;\n} else {\nreturnVal = FALSE;\n@@ -470,6 +466,7 @@ bool neighbors_getNeighborEui64(open_addr_t* address, uint8_t addr_type, uint8_\n}\nreturn ReturnVal;\n}\n+\n// ==== update backoff\nvoid neighbors_updateBackoff(open_addr_t *address) {\nuint8_t i;\n@@ -480,11 +477,13 @@ void neighbors_updateBackoff(open_addr_t* address){\nneighbors_vars.neighbors[i].backoffExponenton++;\n}\n// set the backoff to a random value in [0..2^BE]\n- neighbors_vars.neighbors[i].backoff = openrandom_get16b()%(1<<neighbors_vars.neighbors[i].backoffExponenton);\n+ neighbors_vars.neighbors[i].backoff =\n+ openrandom_get16b() % (1 << neighbors_vars.neighbors[i].backoffExponenton);\nbreak;\n}\n}\n}\n+\nvoid neighbors_decreaseBackoff(open_addr_t *address) {\nuint8_t i;\nfor (i = 0; i < MAXNUMNEIGHBORS; i++) {\n@@ -496,6 +495,7 @@ void neighbors_decreaseBackoff(open_addr_t* address){\n}\n}\n}\n+\nbool neighbors_backoffHitZero(open_addr_t *address) {\nuint8_t i;\nbool returnVal;\n@@ -585,7 +585,8 @@ uint16_t neighbors_getLinkMetric(uint8_t index) {\n// numTx is on 8 bits, so scaling up 10 bits won't lead to saturation\n// but this <<10 followed by >>10 does not provide any benefit either. Result is the same.\nrankIncreaseIntermediary = (((uint32_t) neighbors_vars.neighbors[index].numTx) << 10);\n- rankIncreaseIntermediary = (3*rankIncreaseIntermediary * MINHOPRANKINCREASE) / ((uint32_t)neighbors_vars.neighbors[index].numTxACK);\n+ rankIncreaseIntermediary = (3 * rankIncreaseIntermediary * MINHOPRANKINCREASE) /\n+ ((uint32_t) neighbors_vars.neighbors[index].numTxACK);\nrankIncreaseIntermediary = rankIncreaseIntermediary - ((uint32_t)(2 * MINHOPRANKINCREASE) << 10);\n// this could still overflow for numTx large and numTxAck small, Casting to 16 bits will yiel the least significant bits\nif (rankIncreaseIntermediary >= (65536 << 10)) {\n@@ -626,18 +627,11 @@ void neighbors_removeOld(void) {\n- pareferred parent\n*/\n- if (\n- neighbors_vars.neighbors[i].f6PNORES == FALSE &&\n- neighbors_vars.neighbors[i].parentPreference == 0\n- ){\n+ if (neighbors_vars.neighbors[i].f6PNORES == FALSE &&\n+ neighbors_vars.neighbors[i].parentPreference == 0) {\n// remove neighbor only when there is no packet in queue\n- if (\n- openqueue_macGetUnicastPakcet(\n- &(neighbors_vars.neighbors[i].addr_64b)\n- )==NULL\n- ) {\n-\n+ if (openqueue_macGetUnicastPakcet(&(neighbors_vars.neighbors[i].addr_64b)) == NULL) {\nremoveNeighbor(i);\n}\n}\n@@ -752,7 +746,7 @@ void removeNeighbor(uint8_t neighborIndex) {\nneighbors_vars.neighbors[neighborIndex].asn.byte4 = 0;\nneighbors_vars.neighbors[neighborIndex].f6PNORES = FALSE;\nneighbors_vars.neighbors[neighborIndex].sequenceNumber = 0;\n- neighbors_vars.neighbors[neighborIndex].backoffExponenton = MINBE-1;;\n+ neighbors_vars.neighbors[neighborIndex].backoffExponenton = MINBE - 1;\nneighbors_vars.neighbors[neighborIndex].backoff = 0;\nneighbors_vars.neighbors[neighborIndex].addr_64b.type = ADDR_NONE;\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/02b-MAChigh/neighbors.h",
"new_path": "openstack/02b-MAChigh/neighbors.h",
"diff": "-#ifndef __NEIGHBORS_H\n-#define __NEIGHBORS_H\n+#ifndef OPENWSN_NEIGHBORS_H\n+#define OPENWSN_NEIGHBORS_H\n/**\n\\addtogroup MAChigh\n@@ -59,23 +59,39 @@ void neighbors_init(void);\n// getters\ndagrank_t neighbors_getNeighborRank(uint8_t index);\n+\nuint8_t neighbors_getNumNeighbors(void);\n+\nuint16_t neighbors_getLinkMetric(uint8_t index);\n+\nopen_addr_t* neighbors_getKANeighbor(uint16_t kaPeriod);\n+\nopen_addr_t* neighbors_getJoinProxy(void);\n+\nbool neighbors_getNeighborNoResource(uint8_t index);\n+\nint8_t neighbors_getRssi(uint8_t index);\n+\nuint8_t neighbors_getNumTx(uint8_t index);\n+\nuint8_t neighbors_getSequenceNumber(open_addr_t *address);\n+\n// setters\nvoid neighbors_setNeighborRank(uint8_t index, dagrank_t rank);\n+\nvoid neighbors_setNeighborNoResource(open_addr_t *address);\n+\nvoid neighbors_setPreferredParent(uint8_t index, bool isPreferred);\n+\n// interrogators\nbool neighbors_isStableNeighbor(open_addr_t *address);\n+\nbool neighbors_isStableNeighborByIndex(uint8_t index);\n+\nbool neighbors_isInsecureNeighbor(open_addr_t *address);\n+\nbool neighbors_isNeighborWithHigherDAGrank(uint8_t index);\n+\nbool neighbors_reachedMinimalTransmission(uint8_t index);\n// updating neighbor information\n@@ -87,6 +103,7 @@ void neighbors_indicateRx(\nuint8_t joinPrio,\nbool insecure\n);\n+\nvoid neighbors_indicateTx(\nopen_addr_t *dest,\nuint8_t numTxAttempts,\n@@ -94,18 +111,26 @@ void neighbors_indicateTx(\nbool was_finally_acked,\nasn_t *asnTimestamp\n);\n+\nvoid neighbors_updateSequenceNumber(open_addr_t *address);\n+\nvoid neighbors_resetSequenceNumber(open_addr_t *address);\n// get addresses\nbool neighbors_getNeighborEui64(open_addr_t *address, uint8_t addr_type, uint8_t index);\n+\n// update backoff field\nvoid neighbors_updateBackoff(open_addr_t *address);\n+\nvoid neighbors_decreaseBackoff(open_addr_t *address);\n+\nbool neighbors_backoffHitZero(open_addr_t *address);\n+\nvoid neighbors_resetBackoff(open_addr_t *address);\n+\n// maintenance\nvoid neighbors_removeOld(void);\n+\n// debug\nbool debugPrint_neighbors(void);\n@@ -114,6 +139,4 @@ bool debugPrint_neighbors(void);\n\\}\n*/\n-\n-\n-#endif\n+#endif /* OPENWSN_NEIGHBORS_H */\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/02b-MAChigh/schedule.c",
"new_path": "openstack/02b-MAChigh/schedule.c",
"diff": "@@ -21,6 +21,7 @@ schedule_vars_t schedule_vars;\n//=========================== prototypes ======================================\nvoid schedule_resetEntry(scheduleEntry_t *pScheduleEntry);\n+\nvoid schedule_resetBackupEntry(backupEntry_t *pBackupEntry);\n//=========================== public ==========================================\n@@ -74,7 +75,8 @@ void schedule_startDAGroot(void) {\n// shared TXRX anycast slot(s)\nmemset(&temp_neighbor, 0, sizeof(temp_neighbor));\ntemp_neighbor.type = ADDR_ANYCAST;\n- for (running_slotOffset=start_slotOffset;running_slotOffset<start_slotOffset+SCHEDULE_MINIMAL_6TISCH_ACTIVE_CELLS;running_slotOffset++) {\n+ for (running_slotOffset = start_slotOffset;\n+ running_slotOffset < start_slotOffset + SCHEDULE_MINIMAL_6TISCH_ACTIVE_CELLS; running_slotOffset++) {\nschedule_addActiveSlot(\nrunning_slotOffset, // slot offset\nCELLTYPE_TXRX, // type of slot\n@@ -102,25 +104,18 @@ bool debugPrint_schedule(void) {\n// gather status data\ntemp.row = schedule_vars.debugPrintRow;\n- temp.slotOffset = \\\n- schedule_vars.scheduleBuf[schedule_vars.debugPrintRow].slotOffset;\n- temp.type = \\\n- schedule_vars.scheduleBuf[schedule_vars.debugPrintRow].type;\n- temp.shared = \\\n- schedule_vars.scheduleBuf[schedule_vars.debugPrintRow].shared;\n- temp.channelOffset = \\\n- schedule_vars.scheduleBuf[schedule_vars.debugPrintRow].channelOffset;\n+ temp.slotOffset = schedule_vars.scheduleBuf[schedule_vars.debugPrintRow].slotOffset;\n+ temp.type = schedule_vars.scheduleBuf[schedule_vars.debugPrintRow].type;\n+ temp.shared = schedule_vars.scheduleBuf[schedule_vars.debugPrintRow].shared;\n+ temp.channelOffset = schedule_vars.scheduleBuf[schedule_vars.debugPrintRow].channelOffset;\nmemcpy(\n&temp.neighbor,\n&schedule_vars.scheduleBuf[schedule_vars.debugPrintRow].neighbor,\nsizeof(open_addr_t)\n);\n- temp.numRx = \\\n- schedule_vars.scheduleBuf[schedule_vars.debugPrintRow].numRx;\n- temp.numTx = \\\n- schedule_vars.scheduleBuf[schedule_vars.debugPrintRow].numTx;\n- temp.numTxACK = \\\n- schedule_vars.scheduleBuf[schedule_vars.debugPrintRow].numTxACK;\n+ temp.numRx = schedule_vars.scheduleBuf[schedule_vars.debugPrintRow].numRx;\n+ temp.numTx = schedule_vars.scheduleBuf[schedule_vars.debugPrintRow].numTx;\n+ temp.numTxACK = schedule_vars.scheduleBuf[schedule_vars.debugPrintRow].numTxACK;\nmemcpy(\n&temp.lastUsedAsn,\n&schedule_vars.scheduleBuf[schedule_vars.debugPrintRow].lastUsedAsn,\n@@ -128,11 +123,7 @@ bool debugPrint_schedule(void) {\n);\n// send status data over serial port\n- openserial_printStatus(\n- STATUS_SCHEDULE,\n- (uint8_t*)&temp,\n- sizeof(debugScheduleEntry_t)\n- );\n+ openserial_printStatus(STATUS_SCHEDULE, (uint8_t * ) & temp, sizeof(debugScheduleEntry_t));\nreturn TRUE;\n}\n@@ -153,11 +144,7 @@ bool debugPrint_backoff(void) {\ntemp[1] = schedule_vars.backoff;\n// send status data over serial port\n- openserial_printStatus(\n- STATUS_BACKOFF,\n- (uint8_t*)&temp,\n- sizeof(temp)\n- );\n+ openserial_printStatus(STATUS_BACKOFF, (uint8_t * ) & temp, sizeof(temp));\nreturn TRUE;\n}\n@@ -217,10 +204,7 @@ void schedule_setFrameNumber(uint8_t frameNumber) {\n\\param slotOffset\n\\param info\n*/\n-void schedule_getSlotInfo(\n- slotOffset_t slotOffset,\n- slotinfo_element_t* info\n-){\n+void schedule_getSlotInfo(slotOffset_t slotOffset, slotinfo_element_t *info) {\nscheduleEntry_t *slotContainer;\n@@ -322,7 +306,6 @@ owerror_t schedule_addActiveSlot(\nreturn E_FAIL;\n}\n-\n// assign the next slot pointer if it's allocated in backup entries\nif (inBackupEntries) {\n@@ -333,11 +316,7 @@ owerror_t schedule_addActiveSlot(\n// check that whether need to swap the entries\nneedSwapEntries = FALSE;\nif (slotContainer->isAutoCell) {\n- if (\n- isAutoCell &&\n- slotContainer->type == CELLTYPE_RX &&\n- type == CELLTYPE_TX\n- ){\n+ if (isAutoCell && slotContainer->type == CELLTYPE_RX && type == CELLTYPE_TX) {\n// swap the entry of schedule and backup schedule\nneedSwapEntries = TRUE;\n}\n@@ -581,7 +560,8 @@ owerror_t schedule_removeActiveSlot(\nslotContainer->shared = slotContainer->backupEntries[candidate_index].shared;\nslotContainer->channelOffset = slotContainer->backupEntries[candidate_index].channelOffset;\nslotContainer->isAutoCell = slotContainer->backupEntries[candidate_index].isAutoCell;\n- memcpy(&slotContainer->neighbor,&(slotContainer->backupEntries[candidate_index].neighbor),sizeof(open_addr_t));\n+ memcpy(&slotContainer->neighbor, &(slotContainer->backupEntries[candidate_index].neighbor),\n+ sizeof(open_addr_t));\nslotContainer->numTx = slotContainer->backupEntries[candidate_index].numTx;\nslotContainer->numRx = slotContainer->backupEntries[candidate_index].numRx;\n@@ -602,17 +582,13 @@ owerror_t schedule_removeActiveSlot(\n// remove from linked list\nif (slotContainer->next == slotContainer) {\n- // this is the last active slot\n-\n- // the next slot of this slot is NULL\n+ // this is the last active slot, the next slot of this slot is NULL\nslotContainer->next = NULL;\n// current slot points to this slot\nschedule_vars.currentScheduleEntry = NULL;\n} else {\n- // this is NOT the last active slot\n-\n- // find the previous in the schedule\n+ // this is NOT the last active slot, find the previous in the schedule\npreviousSlotWalker = schedule_vars.currentScheduleEntry;\nwhile (1) {\n@@ -622,22 +598,18 @@ owerror_t schedule_removeActiveSlot(\npreviousSlotWalker = previousSlotWalker->next;\n}\n- // remove this element from the linked list, i.e. have the previous slot\n- // \"jump\" to slotContainer's next\n+ // remove this element from the linked list, i.e. have the previous slot \"jump\" to slotContainer's next\npreviousSlotWalker->next = slotContainer->next;\n// update current slot if points to slot I just removed\nif (schedule_vars.currentScheduleEntry == slotContainer) {\n/**\n- attention: this should only happen at the end of slot.\n- it's dangerous to remove current schedule entry in the middle\n- of the slot. The item access of currentScheduleEntry could\n- be from unexpected entry.\n-\n- In case the entry is removed at endSlot(), the currentSCheduleEntry\n- should be the previous entry. This is because when the next active\n- slot arrives, currentSCheduleEntry will be assigned as\n- currentSCheduleEntry->next\n+ attention: this should only happen at the end of slot. It's dangerous to remove current schedule entry\n+ in the middle of the slot. The item access of currentScheduleEntry could be from unexpected entry.\n+\n+ In case the entry is removed at endSlot(), the currentScheduleEntry should be the previous entry. This\n+ is because when the next active slot arrives, currentScheduleEntry will be assigned as\n+ currentScheduleEntry->next\n*/\nschedule_vars.currentScheduleEntry = previousSlotWalker;\n}\n@@ -677,10 +649,7 @@ bool schedule_isSlotOffsetAvailable(uint16_t slotOffset){\nreturn TRUE;\n}\n-void schedule_removeAllNegotiatedCellsToNeighbor(\n- uint8_t slotframeID,\n- open_addr_t* neighbor\n-){\n+void schedule_removeAllNegotiatedCellsToNeighbor(uint8_t slotframeID, open_addr_t *neighbor) {\nuint8_t i;\n// remove all entries in schedule with previousHop address\n@@ -741,7 +710,8 @@ uint8_t schedule_getNumberOfNegotiatedCells(open_addr_t* neighbor, cellType_t ce\nfor (j = 0; j < MAXBACKUPSLOTS; j++) {\nif (\nschedule_vars.scheduleBuf[i].backupEntries[j].type == CELLTYPE_TX &&\n- packetfunctions_sameAddress(&(schedule_vars.scheduleBuf[i].backupEntries[j].neighbor), neighbor) == TRUE &&\n+ packetfunctions_sameAddress(&(schedule_vars.scheduleBuf[i].backupEntries[j].neighbor),\n+ neighbor) == TRUE &&\nschedule_vars.scheduleBuf[i].backupEntries[j].shared == FALSE\n) {\ncounter++;\n@@ -767,9 +737,7 @@ bool schedule_isNumTxWrapped(open_addr_t* neighbor){\nreturnVal = FALSE;\nfor (i = 0; i < MAXACTIVESLOTS; i++) {\n- if(\n- packetfunctions_sameAddress(&schedule_vars.scheduleBuf[i].neighbor, neighbor) == TRUE\n- ){\n+ if (packetfunctions_sameAddress(&schedule_vars.scheduleBuf[i].neighbor, neighbor) == TRUE) {\nif (schedule_vars.scheduleBuf[i].numTx > 0xFF / 2) {\nreturnVal = TRUE;\n}\n@@ -792,9 +760,7 @@ bool schedule_getCellsToBeRelocated(open_addr_t* neighbor, cellInfo_ht* celllist\n// found the cell with higest PDR\nfor (i = 0; i < MAXACTIVESLOTS; i++) {\n- if(\n- packetfunctions_sameAddress(&schedule_vars.scheduleBuf[i].neighbor, neighbor) == TRUE\n- ){\n+ if (packetfunctions_sameAddress(&schedule_vars.scheduleBuf[i].neighbor, neighbor) == TRUE) {\nif (schedule_vars.scheduleBuf[i].numTx > MINIMAL_NUM_TX) {\ncellPDR = 100 * schedule_vars.scheduleBuf[i].numTxACK / schedule_vars.scheduleBuf[i].numTx;\nif (cellPDR < RELOCATE_PDRTHRES) {\n@@ -909,10 +875,7 @@ bool schedule_hasNegotiatedCellToNeighbor(open_addr_t* neighbor, cellType_t cell\n\\param nonParentNeighbor The neighbor address of the negotiated tx cell.\n*/\n-bool schedule_hasNegotiatedTxCellToNonParent(\n- open_addr_t* parentNeighbor,\n- open_addr_t* nonParentNeighbor\n-){\n+bool schedule_hasNegotiatedTxCellToNonParent(open_addr_t *parentNeighbor, open_addr_t *nonParentNeighbor) {\nuint8_t i;\nINTERRUPT_DECLARATION();\n@@ -1257,7 +1220,8 @@ void schedule_indicateTx(asn_t* asnTimestamp, bool succesfullTx) {\nENABLE_INTERRUPTS();\n}\n-bool schedule_getOneCellAfterOffset(uint8_t metadata,uint8_t offset,open_addr_t* neighbor, uint8_t cellOptions, uint16_t* slotoffset, uint16_t* channeloffset){\n+bool schedule_getOneCellAfterOffset(uint8_t metadata, uint8_t offset, open_addr_t *neighbor, uint8_t cellOptions,\n+ uint16_t *slotoffset, uint16_t *channeloffset) {\nbool returnVal;\nscheduleEntry_t *scheduleWalker;\ncellType_t type;\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/02b-MAChigh/schedule.h",
"new_path": "openstack/02b-MAChigh/schedule.h",
"diff": "-#ifndef __SCHEDULE_H\n-#define __SCHEDULE_H\n+#ifndef OPENWSN_SCHEDULE_H\n+#define OPENWSN_SCHEDULE_H\n/**\n\\addtogroup MAChigh\n@@ -174,14 +174,20 @@ typedef struct {\n// admin\nvoid schedule_init(void);\n+\nvoid schedule_startDAGroot(void);\n+\nbool debugPrint_schedule(void);\n+\nbool debugPrint_backoff(void);\n// from 6top\nvoid schedule_setFrameLength(frameLength_t newFrameLength);\n+\nvoid schedule_setFrameHandle(uint8_t frameHandle);\n+\nvoid schedule_setFrameNumber(uint8_t frameNumber);\n+\nowerror_t schedule_addActiveSlot(\nslotOffset_t slotOffset,\ncellType_t type,\n@@ -195,53 +201,73 @@ void schedule_getSlotInfo(\nslotOffset_t slotOffset,\nslotinfo_element_t *info\n);\n+\nowerror_t schedule_removeActiveSlot(\nslotOffset_t slotOffset,\ncellType_t type,\nbool isShared,\nopen_addr_t *neighbor\n);\n+\nvoid schedule_removeAllAutonomousTxRxCellUnicast(void);\n+\nbool schedule_isSlotOffsetAvailable(uint16_t slotOffset);\n-void schedule_removeAllNegotiatedCellsToNeighbor(\n- uint8_t slotframeID,\n- open_addr_t* neighbor\n-);\n+\n+void schedule_removeAllNegotiatedCellsToNeighbor(uint8_t slotframeID, open_addr_t *neighbor);\n+\nuint8_t schedule_getNumberOfFreeEntries(void);\n+\nuint8_t schedule_getNumberOfNegotiatedCells(open_addr_t *neighbor, cellType_t cell_type);\n+\nbool schedule_isNumTxWrapped(open_addr_t *neighbor);\n+\nbool schedule_getCellsToBeRelocated(open_addr_t *neighbor, cellInfo_ht *celllist);\n+\nbool schedule_hasAutonomousTxRxCellUnicast(open_addr_t *neighbor);\n+\nbool schedule_getAutonomousTxRxCellUnicastNeighbor(open_addr_t *neighbor);\n+\nbool schedule_hasAutoTxCellToNeighbor(open_addr_t *neighbor);\n+\nbool schedule_hasNegotiatedCellToNeighbor(open_addr_t *neighbor, cellType_t cell_type);\n+\nbool schedule_getAutonomousTxRxCellAnycast(uint16_t *slotoffset);\n+\nbool schedule_hasNonParentManagedTxCell(open_addr_t *neighbor);\nvoid schedule_hasNegotiatedTxCell(open_addr_t *address);\n-bool schedule_hasNegotiatedTxCellToNonParent(\n- open_addr_t* parentNeighbor,\n- open_addr_t* nonParentNeighbor\n-);\n+\n+bool schedule_hasNegotiatedTxCellToNonParent(open_addr_t *parentNeighbor, open_addr_t *nonParentNeighbor);\n// from IEEE802154E\nvoid schedule_syncSlotOffset(slotOffset_t targetSlotOffset);\n+\nvoid schedule_advanceSlot(void);\n+\nslotOffset_t schedule_getNextActiveSlotOffset(void);\n+\nframeLength_t schedule_getFrameLength(void);\n+\ncellType_t schedule_getType(void);\n+\nbool schedule_getShared(void);\n+\nbool schedule_getIsAutoCell(void);\n+\nvoid schedule_getNeighbor(open_addr_t *addrToWrite);\n+\nslotOffset_t schedule_getSlottOffset(void);\n+\nchannelOffset_t schedule_getChannelOffset(void);\n+\nbool schedule_getOkToSend(void);\n+\nvoid schedule_resetBackoff(void);\n+\nvoid schedule_indicateRx(asn_t *asnTimestamp);\n-void schedule_indicateTx(\n- asn_t* asnTimestamp,\n- bool succesfullTx\n- );\n+\n+void schedule_indicateTx(asn_t *asnTimestamp, bool succesfullTx);\n+\n// from sixtop\nbool schedule_getOneCellAfterOffset(\nuint8_t metadata,\n@@ -256,4 +282,4 @@ bool schedule_getOneCellAfterOffset(\n\\}\n*/\n-#endif\n+#endif /* OPENWSN_SCHEDULE_H */\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-867. Update header guards neighbors.h + linter pass
|
491,587 |
28.05.2020 23:10:17
| -7,200 |
ccade0a71f7b73c4172116c3d5bf68d7d0ba9401
|
Update header guards sixtop.h
|
[
{
"change_type": "MODIFY",
"old_path": "openstack/02b-MAChigh/sixtop.h",
"new_path": "openstack/02b-MAChigh/sixtop.h",
"diff": "-#ifndef __SIXTOP_H\n-#define __SIXTOP_H\n+#ifndef OPENWSN_SIXTOP_H\n+#define OPENWSN_SIXTOP_H\n/**\n\\addtogroup MAChigh\n@@ -160,6 +160,6 @@ bool debugPrint_kaPeriod(void);\n\\}\n*/\n-#endif\n+#endif /* OPENWSN_SIXTOP_H */\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-867. Update header guards sixtop.h
|
491,587 |
28.05.2020 23:22:14
| -7,200 |
6f5dcaef1b0cb30fd868a236fc4e0798392395d3
|
Update header guards iphc.h + linter pass
|
[
{
"change_type": "MODIFY",
"old_path": "openstack/03a-IPHC/iphc.h",
"new_path": "openstack/03a-IPHC/iphc.h",
"diff": "-#ifndef __IPHC_H\n-#define __IPHC_H\n+#ifndef OPENWSN_IPHC_H\n+#define OPENWSN_IPHC_H\n/**\n\\addtogroup LoWPAN\n@@ -308,9 +308,7 @@ void iphc_retrieveIPv6DeadlineHeader(\ndeadline_option_ht* deadline_option\n);\n-void iphc_getDeadlineInfo(\n- monitor_expiration_vars_t* stats\n-);\n+void iphc_getDeadlineInfo(monitor_expiration_vars_t* stats);\n#endif\n/**\n@@ -318,4 +316,4 @@ void iphc_getDeadlineInfo(\n\\}\n*/\n-#endif\n+#endif /* OPENWSN_IPHC_H */\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-867. Update header guards iphc.h + linter pass
|
491,587 |
28.05.2020 23:22:27
| -7,200 |
4e48e479d5c069de3a001b05a78ca547923dd247
|
Update header guards frag.h
|
[
{
"change_type": "MODIFY",
"old_path": "openstack/03a-IPHC/frag.h",
"new_path": "openstack/03a-IPHC/frag.h",
"diff": "\\author Timothy Claeys <timothy.claeys@inria.fr>, January 2020.\n*/\n-#ifndef __FRAG_H\n-#define __FRAG_H\n+#ifndef OPENWSN_FRAG_H\n+#define OPENWSN_FRAG_H\n/**\n\\addtogroup LoWPAN\n@@ -114,4 +114,4 @@ void frag_receive(OpenQueueEntry_t *msg);\nowerror_t frag_fragment6LoPacket(OpenQueueEntry_t *msg);\n-#endif\n+#endif /* OPENWSN_FRAG_H */\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-867. Update header guards frag.h
|
491,587 |
28.05.2020 23:23:41
| -7,200 |
a7389d27812ab14bccc309ffadb4c1fee732376e
|
Update header guards openbridge.h
|
[
{
"change_type": "MODIFY",
"old_path": "openstack/03a-IPHC/openbridge.h",
"new_path": "openstack/03a-IPHC/openbridge.h",
"diff": "-#ifndef __OPENBRIDGE_H\n-#define __OPENBRIDGE_H\n+#ifndef OPENWSN_OPENBRIDGE_H\n+#define OPENWSN_OPENBRIDGE_H\n/**\n\\addtogroup LoWPAN\n@@ -29,4 +29,4 @@ void openbridge_receive(OpenQueueEntry_t *msg);\n\\}\n*/\n-#endif\n+#endif /* OPENWSN_OPENBRIDGE_H */\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-867. Update header guards openbridge.h
|
491,587 |
28.05.2020 23:29:17
| -7,200 |
79cd92409d2a5fe749fe212751dc42afd8b34812
|
Update header guards forwarding.h
|
[
{
"change_type": "MODIFY",
"old_path": "openstack/03b-IPv6/forwarding.h",
"new_path": "openstack/03b-IPv6/forwarding.h",
"diff": "-#ifndef __FORWARDING_H\n-#define __FORWARDING_H\n+#ifndef OPENWSN_FORWARDING_H\n+#define OPENWSN_FORWARDING_H\n/**\n\\addtogroup IPv6\n@@ -49,6 +49,7 @@ typedef struct {\nuint8_t PadRes; ///< Number of padding octets. Set to 0 if using EUI64.\nuint16_t Reserved; ///< Set to 0.\n} rpl_routing_ht;\n+\nEND_PACK\n//=========================== variables =======================================\n@@ -56,8 +57,11 @@ END_PACK\n//=========================== prototypes ======================================\nvoid forwarding_init(void);\n+\nowerror_t forwarding_send(OpenQueueEntry_t *msg);\n+\nvoid forwarding_sendDone(OpenQueueEntry_t *msg, owerror_t error);\n+\nvoid forwarding_receive(\nOpenQueueEntry_t *msg,\nipv6_header_iht *ipv6_outer_header,\n@@ -73,4 +77,4 @@ void forwarding_receive(\n\\}\n*/\n-#endif\n+#endif /* OPENWSN_FORWARDING_H */\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-867. Update header guards forwarding.h
|
491,587 |
28.05.2020 23:29:47
| -7,200 |
6a57afd32a243658234d2b47a258bc3c636b2f2d
|
Update header guards icmpv6.h
|
[
{
"change_type": "MODIFY",
"old_path": "openstack/03b-IPv6/icmpv6.h",
"new_path": "openstack/03b-IPv6/icmpv6.h",
"diff": "-#ifndef __ICMPv6_H\n-#define __ICMPv6_H\n+#ifndef OPENWSN_ICMPv6_H\n+#define OPENWSN_ICMPv6_H\n/**\n\\addtogroup IPv6\n@@ -49,8 +49,11 @@ typedef struct {\n//=========================== prototypes ======================================\nvoid icmpv6_init(void);\n+\nowerror_t icmpv6_send(OpenQueueEntry_t *msg);\n+\nvoid icmpv6_sendDone(OpenQueueEntry_t *msg, owerror_t error);\n+\nvoid icmpv6_receive(OpenQueueEntry_t *msg);\n/**\n@@ -58,4 +61,4 @@ void icmpv6_receive(OpenQueueEntry_t* msg);\n\\}\n*/\n-#endif\n+#endif /* OPENWSN_ICMPv6_H */\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-867. Update header guards icmpv6.h
|
491,587 |
28.05.2020 23:29:57
| -7,200 |
3f953e8a00644288513cb08f63d4d9e2532843f3
|
Update header guards icmpv6echo.h
|
[
{
"change_type": "MODIFY",
"old_path": "openstack/03b-IPv6/icmpv6echo.h",
"new_path": "openstack/03b-IPv6/icmpv6echo.h",
"diff": "-#ifndef __ICMPv6ECHO_H\n-#define __ICMPv6ECHO_H\n+#ifndef OPENWSN_ICMPv6ECHO_H\n+#define OPENWSN_ICMPv6ECHO_H\n/**\n\\addtogroup IPv6\n@@ -37,4 +37,4 @@ void icmpv6echo_setIsReplyEnabled(bool isEnabled);\n\\}\n*/\n-#endif\n+#endif /* OPENWSN_ICMPV6ECHO_H */\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-867. Update header guards icmpv6echo.h
|
491,587 |
28.05.2020 23:30:14
| -7,200 |
ac6c7c78e5045a9a2f000cb6bb5e60d4b276e234
|
Update header guards udp.h + linter pass
|
[
{
"change_type": "MODIFY",
"old_path": "openstack/04-TRAN/udp.c",
"new_path": "openstack/04-TRAN/udp.c",
"diff": "@@ -16,6 +16,7 @@ openudp_vars_t openudp_vars;\n//=========================== prototypes ======================================\nstatic void openudp_sendDone_default_handler(OpenQueueEntry_t *msg, owerror_t error);\n+\nstatic void openudp_receive_default_handler(OpenQueueEntry_t *msg);\n//=========================== public ==========================================\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/04-TRAN/udp.h",
"new_path": "openstack/04-TRAN/udp.h",
"diff": "@@ -44,16 +44,15 @@ typedef struct {\ntypedef void (*udp_callbackReceive_cbt)(OpenQueueEntry_t *msg);\n+\ntypedef void (*udp_callbackSendDone_cbt)(OpenQueueEntry_t *msg, owerror_t error);\ntypedef struct udp_resource_desc_t udp_resource_desc_t;\nstruct udp_resource_desc_t {\nuint16_t port; ///< UDP port that is associated with the resource\n- udp_callbackReceive_cbt callbackReceive; ///< receive callback,\n- ///< if NULL, all message received for port will be discarded\n- udp_callbackSendDone_cbt callbackSendDone; ///< send completion callback,\n- ///< if NULL, the associated message will be release without notification\n+ udp_callbackReceive_cbt callbackReceive; ///< receive callback, if NULL, all message received for port will be discarded\n+ udp_callbackSendDone_cbt callbackSendDone; ///< send completion callback, if NULL, the associated message will be release without notification\nudp_resource_desc_t *next;\n};\n@@ -66,10 +65,15 @@ typedef struct {\n//=========================== prototypes ======================================\nvoid openudp_init(void);\n+\nvoid openudp_register(udp_resource_desc_t *desc);\n+\nowerror_t openudp_send(OpenQueueEntry_t *msg);\n+\nvoid openudp_sendDone(OpenQueueEntry_t *msg, owerror_t error);\n+\nvoid openudp_receive(OpenQueueEntry_t *msg);\n+\nbool openudp_debugPrint(void);\n/**\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-867. Update header guards udp.h + linter pass
|
491,587 |
28.05.2020 23:30:25
| -7,200 |
d1be11d245549deecc3b3568ed6f3564ba72bafe
|
Update header guards icmpv6rpl.h
|
[
{
"change_type": "MODIFY",
"old_path": "openstack/03b-IPv6/icmpv6rpl.h",
"new_path": "openstack/03b-IPv6/icmpv6rpl.h",
"diff": "-#ifndef __ICMPv6RPL_H\n-#define __ICMPv6RPL_H\n+#ifndef OPENWSN_ICMPv6RPL_H\n+#define OPENWSN_ICMPv6RPL_H\n/**\n\\addtogroup IPv6\n@@ -246,6 +246,6 @@ bool icmpv6rpl_daoSent(void);\n\\}\n*/\n-#endif\n+#endif /* OPENWSN_ICMPv6RPL_H */\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-867. Update header guards icmpv6rpl.h
|
491,587 |
28.05.2020 23:33:02
| -7,200 |
af5a01c8fa270f9e56a33e9eb007b7a90a3e727d
|
Update header guards idmanager.h + linter pass
|
[
{
"change_type": "MODIFY",
"old_path": "openstack/cross-layers/idmanager.c",
"new_path": "openstack/cross-layers/idmanager.c",
"diff": "@@ -242,11 +242,7 @@ void idmanager_triggerAboutRoot(void) {\n// store prefix (bytes 1-8)\nmyPrefix.type = ADDR_PREFIX;\n- memcpy(\n- myPrefix.prefix,\n- &input_buffer[1],\n- sizeof(myPrefix.prefix)\n- );\n+ memcpy(myPrefix.prefix, &input_buffer[1], sizeof(myPrefix.prefix));\nidmanager_setMyID(&myPrefix);\n// indicate DODAGid to RPL\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/cross-layers/idmanager.h",
"new_path": "openstack/cross-layers/idmanager.h",
"diff": "-#ifndef __IDMANAGER_H\n-#define __IDMANAGER_H\n+#ifndef OPENWSN_IDMANAGER_H\n+#define OPENWSN_IDMANAGER_H\n/**\n\\addtogroup cross-layers\n@@ -50,22 +50,33 @@ typedef struct {\n//=========================== prototypes ======================================\nvoid idmanager_init(void);\n+\nbool idmanager_getIsDAGroot(void);\n+\nvoid idmanager_setIsDAGroot(bool newRole);\n+\nbool idmanager_getIsSlotSkip(void);\n+\nopen_addr_t* idmanager_getMyID(uint8_t type);\n+\nowerror_t idmanager_setMyID(open_addr_t *newID);\n+\nbool idmanager_isMyAddress(open_addr_t *addr);\n+\nvoid idmanager_triggerAboutRoot(void);\n+\nvoid idmanager_setJoinKey(uint8_t *key);\n+\nvoid idmanager_setJoinAsn(asn_t *asn);\n+\nvoid idmanager_getJoinKey(uint8_t **pKey);\nbool debugPrint_id(void);\n+\nbool debugPrint_joined(void);\n/**\n\\}\n\\}\n*/\n-#endif\n+#endif /* OPENWSN_IDMANAGER_H */\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-867. Update header guards idmanager.h + linter pass
|
491,587 |
28.05.2020 23:35:46
| -7,200 |
56593bef3422bdc61d78ba01d0e213e1d7ef8892
|
Update header guards openqueue.h
|
[
{
"change_type": "MODIFY",
"old_path": "openstack/cross-layers/openqueue.h",
"new_path": "openstack/cross-layers/openqueue.h",
"diff": "-#ifndef __OPENQUEUE_H\n-#define __OPENQUEUE_H\n+#ifndef OPENWSN_OPENQUEUE_H\n+#define OPENWSN_OPENQUEUE_H\n/**\n\\addtogroup cross-layers\n@@ -42,7 +42,9 @@ typedef struct {\n// admin\nvoid openqueue_init(void);\n+\nbool debugPrint_queue(void);\n+\n// called by any component\nOpenQueueEntry_t* openqueue_getFreePacketBuffer(uint8_t creator);\n@@ -51,24 +53,36 @@ OpenQueueEntry_t* openqueue_getFreeBigPacketBuffer(uint8_t creator);\n#endif\nowerror_t openqueue_freePacketBuffer(OpenQueueEntry_t *pkt);\n+\nvoid openqueue_removeAllCreatedBy(uint8_t creator);\n+\nbool openqueue_isHighPriorityEntryEnough(void);\n+\n// called by ICMPv6\nvoid openqueue_updateNextHopPayload(open_addr_t *newNextHop);\n+\n// called by res\nOpenQueueEntry_t* openqueue_sixtopGetSentPacket(void);\n+\nOpenQueueEntry_t* openqueue_sixtopGetReceivedPacket(void);\n+\nuint8_t openqueue_getNum6PResp(void);\n+\nuint8_t openqueue_getNum6PReq(open_addr_t *neighbor);\n+\nvoid openqueue_remove6PrequestToNeighbor(open_addr_t *neighbor);\n+\n// called by IEEE80215E\nOpenQueueEntry_t* openqueue_macGetEBPacket(void);\n+\nOpenQueueEntry_t* openqueue_macGetKaPacket(open_addr_t *toNeighbor);\n+\nOpenQueueEntry_t* openqueue_macGetDIOPacket(void);\n+\nOpenQueueEntry_t* openqueue_macGetUnicastPakcet(open_addr_t *toNeighbor);\n/**\n\\}\n\\}\n*/\n-#endif\n+#endif /* OPENWSN_OPENQUEUE_H */\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-867. Update header guards openqueue.h
|
491,587 |
28.05.2020 23:35:58
| -7,200 |
059702a2ccc74a4396f381a2a4b9bb5c48cff58c
|
Update header guards openrandom.h + linter pass
|
[
{
"change_type": "MODIFY",
"old_path": "openstack/cross-layers/openrandom.h",
"new_path": "openstack/cross-layers/openrandom.h",
"diff": "@@ -23,7 +23,9 @@ typedef struct {\n//=========================== prototypes ======================================\nvoid openrandom_init(void);\n+\nuint16_t openrandom_get16b(void);\n+\nuint16_t openrandom_getRandomizePeriod(uint16_t period, uint16_t range);\n/**\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-867. Update header guards openrandom.h + linter pass
|
491,587 |
28.05.2020 23:36:15
| -7,200 |
369d6b7bed859a73dc19708380500d55c0d3e9d5
|
Update header guards openstack.h
|
[
{
"change_type": "MODIFY",
"old_path": "openstack/openstack.h",
"new_path": "openstack/openstack.h",
"diff": "\\author Thomas Watteyne <watteyne@eecs.berkeley.edu>, October 2014.\n*/\n-#ifndef __OPENSTACK_H\n-#define __OPENSTACK_H\n+#ifndef OPENWSN_OPENSTACK_H\n+#define OPENWSN_OPENSTACK_H\n#include \"opendefs.h\"\nvoid openstack_init(void);\n-#endif\n+#endif /* OPENWSN_OPENSTACK_H */\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-867. Update header guards openstack.h
|
491,587 |
29.05.2020 00:29:56
| -7,200 |
7207e81578b84946edf71fa48c31d3fda27b0980
|
Move CJOIN back to openapps
|
[
{
"change_type": "MODIFY",
"old_path": "SConscript",
"new_path": "SConscript",
"diff": "@@ -68,7 +68,7 @@ if env['board'] != 'python':\nos.path.join('#', 'bsp', 'chips'),\nos.path.join('#', 'drivers', 'common'),\nos.path.join('#', 'kernel'),\n- os.path.join('#', 'opencoap'),\n+ os.path.join('#', 'openweb'),\nos.path.join('#', 'openapps'),\nos.path.join('#', 'openstack'),\n]\n"
},
{
"change_type": "MODIFY",
"old_path": "openapps/SConscript",
"new_path": "openapps/SConscript",
"diff": "@@ -7,6 +7,7 @@ localEnv = env.Clone()\n#===== retrieve the list of apps to build\napps = [\n+ 'cjoin',\n'c6t',\n'cinfo',\n'cled',\n@@ -32,6 +33,9 @@ for a in apps:\nsources_c += [os.path.join(a, a + '.c')]\nsources_h += [os.path.join(a, a + '.h')]\n+sources_c += [os.path.join(\"cjoin\", \"cojp_cbor.c\")]\n+sources_h += [os.path.join(\"cjoin\", \"cojp_cbor.h\")]\n+\n#===== build the openapps library\nif localEnv['board']=='python':\n@@ -65,7 +69,7 @@ else:\nos.path.join('#', 'openweb', 'opencoap'),\n# openapps\nos.path.join('#', 'openapps'),\n- ]+[os.path.join('#','openapps',a) for a in apps],\n+ ] + [os.path.join('#', 'openapps', a) for a in apps]\n)\nlibopenapps = localEnv.Library(\n"
},
{
"change_type": "RENAME",
"old_path": "openweb/cjoin/cjoin.c",
"new_path": "openapps/cjoin/cjoin.c",
"diff": ""
},
{
"change_type": "RENAME",
"old_path": "openweb/cjoin/cjoin.h",
"new_path": "openapps/cjoin/cjoin.h",
"diff": "-#ifndef __CJOIN_H\n-#define __CJOIN_H\n+#ifndef OPENWSN_CJOIN_H\n+#define OPENWSN_CJOIN_H\n/**\n\\addtogroup AppUdp\n@@ -42,4 +42,4 @@ void cjoin_setJoinKey(uint8_t *key, uint8_t len);\n\\}\n*/\n-#endif\n+#endif /* OPENWSN_CJOIN_H */\n"
},
{
"change_type": "RENAME",
"old_path": "openweb/cjoin/cojp_cbor.c",
"new_path": "openapps/cjoin/cojp_cbor.c",
"diff": "//=========================== prototypes ======================================\nowerror_t cojp_cbor_decode_link_layer_keyset(uint8_t *, uint8_t *, cojp_link_layer_keyset_t *);\n+\nowerror_t cojp_cbor_decode_link_layer_short_address(uint8_t *, uint8_t *, cojp_link_layer_short_address_t *);\n+\nowerror_t cojp_cbor_decode_ipv6_address(uint8_t *, uint8_t *, open_addr_t *);\nuint8_t cbor_decode_uint(uint8_t *buf, uint8_t *value);\n@@ -238,7 +240,8 @@ and parses it into short_address_t structure.\n\\param[out] short_address The cojp_link_layer_short_address_t structure containing the parsed short address.\n\\return E_SUCCESS in case of success, E_FAIL otherwise.\n*/\n-owerror_t cojp_cbor_decode_link_layer_short_address(uint8_t *buf, uint8_t *len, cojp_link_layer_short_address_t *short_address) {\n+owerror_t\n+cojp_cbor_decode_link_layer_short_address(uint8_t *buf, uint8_t *len, cojp_link_layer_short_address_t *short_address) {\ncbor_majortype_t major_type;\nuint8_t additional_info;\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "openapps/cjoin/cojp_cbor.h",
"diff": "+#ifndef OPENWSN_CBOR_H\n+#define OPENWSN_CBOR_H\n+\n+/**\n+\\addtogroup AppUdp\n+\\{\n+\\addtogroup cjoin\n+\\{\n+*/\n+#include \"opendefs.h\"\n+//=========================== define ==========================================\n+\n+// max number of keys supported in COSE_KeySet\n+#define KEYSET_MAX_NUM_KEYS 2\n+// CBOR additional info mask\n+#define CBOR_ADDINFO_MASK 0x1F\n+// symmetric key length\n+#define AES128_KEY_LENGTH 16\n+// IEEE 802.15.4 key id length\n+#define IEEE802154_KEYID_LENGTH 1\n+// IEEE 802.15.4 short address\n+#define IEEE802154_SHORT_ADDRESS_LENGTH 2\n+// CoJP Configuration object constants\n+#define COJP_CONFIGURATION_MAX_NUM_PARAMS 3 // TODO we don't support 6LBR joining for now\n+// CoJP Min num elements in a key\n+#define COJP_KEY_MIN_NUM_ELEMS 2\n+//=========================== typedef =========================================\n+\n+// CBOR major types\n+typedef enum {\n+ CBOR_MAJORTYPE_UINT = 0,\n+ CBOR_MAJORTYPE_NINT = 1,\n+ CBOR_MAJORTYPE_BSTR = 2,\n+ CBOR_MAJORTYPE_TSTR = 3,\n+ CBOR_MAJORTYPE_ARRAY = 4,\n+ CBOR_MAJORTYPE_MAP = 5,\n+} cbor_majortype_t;\n+\n+typedef enum {\n+ COJP_PARAMETERS_LABELS_ROLE = 1, // Identifies the role parameter\n+ COJP_PARAMETERS_LABELS_LLKEYSET = 2, // Identifies the array carrying one or more link-layer cryptographic keys\n+ COJP_PARAMETERS_LABELS_LLSHORTADDRESS = 3, // Identifies the assigned link-layer short address\n+ COJP_PARAMETERS_LABELS_JRCADDRESS = 4, // Identifies the IPv6 address of the JRC\n+ COJP_PARAMETERS_LABELS_NETID = 5, // Identifies the network identifier (PAN ID)\n+ COJP_PARAMETERS_LABELS_NETPREFIX = 6, // Identifies the IPv6 prefix of the network\n+} cojp_parameters_labels_t;\n+\n+typedef enum {\n+ COJP_ROLE_VALUE_6N = 0, // 6TiSCH Node\n+ COJP_ROLE_VALUE_6LBR = 1, // 6LBR Node\n+} cojp_role_values_t;\n+\n+typedef enum {\n+ COJP_KEY_USAGE_6TiSCH_K1K2_ENC_MIC32 = 0,\n+ COJP_KEY_USAGE_6TiSCH_K1K2_ENC_MIC64 = 1,\n+ COJP_KEY_USAGE_6TiSCH_K1K2_ENC_MIC128 = 2,\n+ COJP_KEY_USAGE_6TiSCH_K1K2_MIC32 = 3,\n+ COJP_KEY_USAGE_6TiSCH_K1K2_MIC64 = 4,\n+ COJP_KEY_USAGE_6TiSCH_K1K2_MIC128 = 5,\n+ COJP_KEY_USAGE_6TiSCH_K1_MIC32 = 6,\n+ COJP_KEY_USAGE_6TiSCH_K1_MIC64 = 7,\n+ COJP_KEY_USAGE_6TiSCH_K1_MIC128 = 8,\n+ COJP_KEY_USAGE_6TiSCH_K2_MIC32 = 9,\n+ COJP_KEY_USAGE_6TiSCH_K2_MIC64 = 10,\n+ COJP_KEY_USAGE_6TiSCH_K2_MIC128 = 11,\n+ COJP_KEY_USAGE_6TiSCH_K2_ENC_MIC32 = 12,\n+ COJP_KEY_USAGE_6TiSCH_K2_ENC_MIC64 = 13,\n+ COJP_KEY_USAGE_6TiSCH_K2_ENC_MIC128 = 14,\n+} cojp_key_usage_values_t;\n+\n+typedef struct {\n+ uint8_t address[IEEE802154_SHORT_ADDRESS_LENGTH];\n+ uint32_t lease_time;\n+} cojp_link_layer_short_address_t;\n+\n+typedef struct {\n+ uint8_t key_index;\n+ cojp_key_usage_values_t key_usage;\n+ uint8_t key_value[AES128_KEY_LENGTH];\n+} cojp_link_layer_key_t;\n+\n+typedef struct {\n+ uint8_t num_keys;\n+ cojp_link_layer_key_t key[KEYSET_MAX_NUM_KEYS];\n+} cojp_link_layer_keyset_t;\n+\n+typedef struct {\n+ cojp_link_layer_keyset_t keyset;\n+ cojp_link_layer_short_address_t short_address;\n+ open_addr_t jrc_address;\n+} cojp_configuration_object_t;\n+\n+typedef struct {\n+ cojp_role_values_t role;\n+ open_addr_t *pan_id;\n+} cojp_join_request_object_t;\n+\n+//=========================== variables =======================================\n+\n+//=========================== prototypes ======================================\n+\n+owerror_t cojp_cbor_decode_configuration_object(uint8_t *buf, uint8_t len, cojp_configuration_object_t *configuration);\n+\n+uint8_t cojp_cbor_encode_join_request_object(uint8_t *buf, cojp_join_request_object_t *join_request);\n+\n+/**\n+\\}\n+\\}\n+*/\n+\n+#endif /* OPENWSN_CBOR_H */\n+\n"
},
{
"change_type": "MODIFY",
"old_path": "openapps/openapps.c",
"new_path": "openapps/openapps.c",
"diff": "#include \"uexpiration_monitor.h\"\n#endif\n+#if defined(OPENWSN_CJOIN_C)\n+#include \"cjoin.h\"\n+#endif\n+\n//=========================== variables =======================================\n//=========================== prototypes ======================================\n//=========================== private =========================================\nvoid openapps_init(void) {\n+#if defined(OPENWSN_CJOIN_C)\n+ cjoin_init();\n+#endif\n#if defined(OPENWSN_C6T_C)\nc6t_init();\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/openstack.c",
"new_path": "openstack/openstack.c",
"diff": "#include \"opendefs.h\"\n//===== drivers\n#include \"openserial.h\"\n+\n//===== stack\n#include \"openstack.h\"\n//-- cross-layer\n//-- 04-TRAN\n#include \"udp.h\"\n-//===== coap-layer\n+//===== application-layer\n#include \"openweb.h\"\n//===== applications\n@@ -96,16 +97,12 @@ void openstack_init(void) {\nopenudp_init();\n#endif\n- //===== coap-layer\n+ //===== application-layer\nopenweb_init();\n//===== applications\nopenapps_init();\n- openserial_printInfo(\n- COMPONENT_OPENWSN, ERR_BOOTED,\n- (errorparameter_t) 0,\n- (errorparameter_t) 0\n- );\n+ openserial_printInfo(COMPONENT_OPENWSN, ERR_BOOTED, (errorparameter_t) 0, (errorparameter_t) 0);\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "openweb/SConscript",
"new_path": "openweb/SConscript",
"diff": "@@ -11,9 +11,6 @@ sources_c = [\nos.path.join(\"opencoap\", \"cborencoder.c\"),\nos.path.join(\"opencoap\", \"coap.c\"),\nos.path.join(\"opencoap\", \"oscore.c\"),\n- # ==== cjoin\n- os.path.join(\"cjoin\", \"cjoin.c\"),\n- os.path.join(\"cjoin\", \"cojp_cbor.c\")\n]\nsources_h = [\n@@ -22,9 +19,6 @@ sources_h = [\nos.path.join(\"opencoap\", \"cborencoder.h\"),\nos.path.join(\"opencoap\", \"coap.h\"),\nos.path.join(\"opencoap\", \"oscore.h\"),\n- # ==== cjoin\n- os.path.join(\"cjoin\", \"cjoin.h\"),\n- os.path.join(\"cjoin\", \"cojp_cbor.h\")\n]\nif localEnv['board']=='python':\n@@ -64,7 +58,6 @@ else:\n# openapps\nos.path.join('#','openweb'),\nos.path.join('#','openweb','opencoap'),\n- os.path.join('#','openweb','cjoin')\n],\n)\n"
},
{
"change_type": "DELETE",
"old_path": "openweb/cjoin/cojp_cbor.h",
"new_path": null,
"diff": "-#ifndef __CBOR_H\n-#define __CBOR_H\n-\n-/**\n-\\addtogroup AppUdp\n-\\{\n-\\addtogroup cjoin\n-\\{\n-*/\n-#include \"opendefs.h\"\n-//=========================== define ==========================================\n-\n-// max number of keys supported in COSE_KeySet\n-#define KEYSET_MAX_NUM_KEYS 2\n-// CBOR additional info mask\n-#define CBOR_ADDINFO_MASK 0x1F\n-// symmetric key length\n-#define AES128_KEY_LENGTH 16\n-// IEEE 802.15.4 key id length\n-#define IEEE802154_KEYID_LENGTH 1\n-// IEEE 802.15.4 short address\n-#define IEEE802154_SHORT_ADDRESS_LENGTH 2\n-// CoJP Configuration object constants\n-#define COJP_CONFIGURATION_MAX_NUM_PARAMS 3 // TODO we don't support 6LBR joining for now\n-// CoJP Min num elements in a key\n-#define COJP_KEY_MIN_NUM_ELEMS 2\n-//=========================== typedef =========================================\n-\n-// CBOR major types\n-typedef enum {\n- CBOR_MAJORTYPE_UINT = 0,\n- CBOR_MAJORTYPE_NINT = 1,\n- CBOR_MAJORTYPE_BSTR = 2,\n- CBOR_MAJORTYPE_TSTR = 3,\n- CBOR_MAJORTYPE_ARRAY = 4,\n- CBOR_MAJORTYPE_MAP = 5,\n-} cbor_majortype_t;\n-\n-typedef enum {\n- COJP_PARAMETERS_LABELS_ROLE = 1, // Identifies the role parameter\n- COJP_PARAMETERS_LABELS_LLKEYSET = 2, // Identifies the array carrying one or more link-layer cryptographic keys\n- COJP_PARAMETERS_LABELS_LLSHORTADDRESS = 3, // Identifies the assigned link-layer short address\n- COJP_PARAMETERS_LABELS_JRCADDRESS = 4, // Identifies the IPv6 address of the JRC\n- COJP_PARAMETERS_LABELS_NETID = 5, // Identifies the network identifier (PAN ID)\n- COJP_PARAMETERS_LABELS_NETPREFIX = 6, // Identifies the IPv6 prefix of the network\n-} cojp_parameters_labels_t;\n-\n-typedef enum {\n- COJP_ROLE_VALUE_6N = 0, // 6TiSCH Node\n- COJP_ROLE_VALUE_6LBR = 1, // 6LBR Node\n-} cojp_role_values_t;\n-\n-typedef enum {\n- COJP_KEY_USAGE_6TiSCH_K1K2_ENC_MIC32 = 0,\n- COJP_KEY_USAGE_6TiSCH_K1K2_ENC_MIC64 = 1,\n- COJP_KEY_USAGE_6TiSCH_K1K2_ENC_MIC128 = 2,\n- COJP_KEY_USAGE_6TiSCH_K1K2_MIC32 = 3,\n- COJP_KEY_USAGE_6TiSCH_K1K2_MIC64 = 4,\n- COJP_KEY_USAGE_6TiSCH_K1K2_MIC128 = 5,\n- COJP_KEY_USAGE_6TiSCH_K1_MIC32 = 6,\n- COJP_KEY_USAGE_6TiSCH_K1_MIC64 = 7,\n- COJP_KEY_USAGE_6TiSCH_K1_MIC128 = 8,\n- COJP_KEY_USAGE_6TiSCH_K2_MIC32 = 9,\n- COJP_KEY_USAGE_6TiSCH_K2_MIC64 = 10,\n- COJP_KEY_USAGE_6TiSCH_K2_MIC128 = 11,\n- COJP_KEY_USAGE_6TiSCH_K2_ENC_MIC32 = 12,\n- COJP_KEY_USAGE_6TiSCH_K2_ENC_MIC64 = 13,\n- COJP_KEY_USAGE_6TiSCH_K2_ENC_MIC128 = 14,\n-} cojp_key_usage_values_t;\n-\n-typedef struct {\n- uint8_t address[IEEE802154_SHORT_ADDRESS_LENGTH];\n- uint32_t lease_time;\n-} cojp_link_layer_short_address_t;\n-\n-typedef struct {\n- uint8_t key_index;\n- cojp_key_usage_values_t key_usage;\n- uint8_t key_value[AES128_KEY_LENGTH];\n-} cojp_link_layer_key_t;\n-\n-typedef struct {\n- uint8_t num_keys;\n- cojp_link_layer_key_t key[KEYSET_MAX_NUM_KEYS];\n-} cojp_link_layer_keyset_t;\n-\n-typedef struct {\n- cojp_link_layer_keyset_t keyset;\n- cojp_link_layer_short_address_t short_address;\n- open_addr_t jrc_address;\n-} cojp_configuration_object_t;\n-\n-typedef struct {\n- cojp_role_values_t role;\n- open_addr_t * pan_id;\n-} cojp_join_request_object_t;\n-\n-//=========================== variables =======================================\n-\n-//=========================== prototypes ======================================\n-\n-owerror_t cojp_cbor_decode_configuration_object(uint8_t *buf, uint8_t len, cojp_configuration_object_t *configuration);\n-uint8_t cojp_cbor_encode_join_request_object(uint8_t *buf, cojp_join_request_object_t *join_request);\n-\n-/**\n-\\}\n-\\}\n-*/\n-\n-#endif\n-\n"
},
{
"change_type": "MODIFY",
"old_path": "openweb/openweb.c",
"new_path": "openweb/openweb.c",
"diff": "#include \"coap.h\"\n#endif\n-#if defined(OPENWSN_CJOIN_C)\n-#include \"cjoin.h\"\n-#endif\n-\nvoid openweb_init() {\n#if defined(OPENWSN_COAP_C)\ncoap_init();\n#endif\n-#if defined(OPENWSN_CJOIN_C)\n- cjoin_init();\n-#endif\n-\n}\n\\ No newline at end of file\n"
},
{
"change_type": "MODIFY",
"old_path": "projects/python/SConscript.env",
"new_path": "projects/python/SConscript.env",
"diff": "@@ -75,9 +75,9 @@ buildEnv.Append(\n# openweb\nos.path.join('#','build','python_gcc','openweb'),\nos.path.join('#','build','python_gcc','openweb','opencoap'),\n- os.path.join('#','build','python_gcc','openweb','cjoin'),\n# openapps\nos.path.join('#','build','python_gcc','openapps'),\n+ os.path.join('#','build','python_gcc','openapps','cjoin'),\nos.path.join('#','build','python_gcc','openapps','c6t'),\nos.path.join('#','build','python_gcc','openapps','rrt'),\nos.path.join('#','build','python_gcc','openapps','cexample'),\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-867. Move CJOIN back to openapps
|
491,587 |
29.05.2020 00:52:13
| -7,200 |
846aa05af1b373307ff16dc499b62f16bad64c94
|
Fixed channel option in config.h
|
[
{
"change_type": "MODIFY",
"old_path": "SConscript",
"new_path": "SConscript",
"diff": "@@ -86,8 +86,6 @@ if env['dagroot'] == 1:\nenv.Append(CPPDEFINES='DAGROOT')\nif env['atmel_24ghz'] == 1:\nenv.Append(CPPDEFINES='ATMEL_24GHZ')\n-if 11 <= env['fix_channel'] <= 26:\n- env.Append(CPPDEFINES={'IEEE802154E_SINGLE_CHANNEL': env['fix_channel']})\nif env['deadline_option'] == 1:\nenv.Append(CPPDEFINES='DEADLINE_OPTION_ENABLED')\n"
},
{
"change_type": "MODIFY",
"old_path": "SConstruct",
"new_path": "SConstruct",
"diff": "@@ -79,8 +79,6 @@ project:\nuse this flag to build a firmware image which is, by\ndefault, in DAG root mode.\nide qtcreator\n- fix_channel Set single channel hopping for debugging\n- 0 (off, default), i (on, channel=i [11:26])\nCommon variables:\nverbose Print each complete compile/link command.\n@@ -143,7 +141,6 @@ command_line_options = {\n'dagroot': ['0', '1'],\n'debug': ['0', '1'],\n'atmel_24ghz': ['0', '1'],\n- 'fix_channel': ['0'] + map(str, range(11, 27)),\n'deadline_option': ['0', '1'],\n'ide': ['none', 'qtcreator'],\n'revision': ['']\n@@ -266,13 +263,6 @@ command_line_vars.AddVariables(\nvalidate_option, # validator\nint, # converter\n),\n- (\n- 'fix_channel', # key\n- '', # help\n- command_line_options['fix_channel'][0], # default\n- validate_option, # validator\n- int, # converter\n- ),\n(\n'deadline_option', # key\n'', # help\n"
},
{
"change_type": "MODIFY",
"old_path": "inc/check_config.h",
"new_path": "inc/check_config.h",
"diff": "#error 'Python board does not support hardware acceleration.'\n#endif\n+#if defined(IEEE802154E_SINGLE_CHANNEL) && \\\n+ ((IEEE802154E_SINGLE_CHANNEL != 0) && \\\n+ ((IEEE802154E_SINGLE_CHANNEL < 11) || \\\n+ (IEEE802154E_SINGLE_CHANNEL > 26)))\n+#error 'Illegal value for OPENWSN_IEEE802154E_SINGLE_CHANNEL'\n+#endif\n+\n#if !defined(OPENWSN_COAP_C) && (\\\ndefined(OPENWSN_C6T_C) || \\\ndefined(OPENWN_CEXAMPLE_C) || \\\n"
},
{
"change_type": "MODIFY",
"old_path": "inc/config.h",
"new_path": "inc/config.h",
"diff": "*/\n// #define OPENWSN_ADAPTIVE_SYNC_C\n+\n+/**\n+ * \\def OPENWSN_IEEE802154E_SINGLE_CHANNEL\n+ *\n+ * Sets channel to a fixed value (acceptable values are [11 - 26] and [0])\n+ * When the channel is set to 0, frequency hopping is enabled, otherwise a single channel is used.\n+ *\n+ */\n+#define IEEE802154E_SINGLE_CHANNEL 11\n+\n// ======================== Board configuration ========================\n/**\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-867. Fixed channel option in config.h
|
491,587 |
29.05.2020 13:58:24
| -7,200 |
8d73a7e4ef9d347305d12d442fa9f8f4aa02238a
|
Add debugging output for MSF algorithm
|
[
{
"change_type": "MODIFY",
"old_path": "drivers/common/openserial.c",
"new_path": "drivers/common/openserial.c",
"diff": "@@ -400,6 +400,10 @@ void task_openserial_debugPrint(void) {\nif (debugPrint_joined() == TRUE) {\nbreak;\n}\n+ case STATUS_MSF:\n+ if (debugPrint_msf() == TRUE) {\n+ break;\n+ }\ndefault:\ndebugPrintCounter = 0;\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "inc/opendefs.h",
"new_path": "inc/opendefs.h",
"diff": "@@ -119,7 +119,8 @@ enum {\nSTATUS_NEIGHBORS = 9,\nSTATUS_KAPERIOD = 10,\nSTATUS_JOINED = 11,\n- STATUS_MAX = 12,\n+ STATUS_MSF = 12,\n+ STATUS_MAX = 13,\n};\n//component identifiers\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/02b-MAChigh/msf.c",
"new_path": "openstack/02b-MAChigh/msf.c",
"diff": "#include \"IEEE802154E.h\"\n#include \"openqueue.h\"\n#include \"packetfunctions.h\"\n+#include \"openserial.h\"\n//=========================== definition =====================================\n//=========================== variables =======================================\nmsf_vars_t msf_vars;\n+msf_vars_debug_t msf_vars_debug;\n//=========================== prototypes ======================================\n@@ -48,6 +50,7 @@ void msf_init(void) {\nopen_addr_t temp_neighbor;\nmemset(&msf_vars, 0, sizeof(msf_vars_t));\n+ memset(&msf_vars_debug, 0, sizeof(msf_vars_debug_t));\nsixtop_setSFcallback(\n(sixtop_sf_getsfid_cbt) msf_getsfid,\n(sixtop_sf_getmetadata_cbt) msf_getMetadata,\n@@ -87,7 +90,6 @@ void msf_updateCellsElapsed(open_addr_t *neighbor, cellType_t type) {\n}\n// update numcellselapsed\n-\nswitch (type) {\ncase CELLTYPE_TX:\nmsf_vars.numCellsElapsed_tx++;\n@@ -109,6 +111,9 @@ void msf_updateCellsElapsed(open_addr_t *neighbor, cellType_t type) {\nmsf_vars.previousNumCellsUsed_tx = msf_vars.numCellsUsed_tx;\n+ // for debugging purposes\n+ msf_vars_debug.numCellsUsed_tx = msf_vars.numCellsUsed_tx;\n+\nif (msf_vars.numCellsUsed_tx > LIM_NUMCELLSUSED_HIGH) {\nmsf_vars.needAddTx = TRUE;\nscheduler_push_task(msf_trigger6pAdd, TASKPRIO_MSF);\n@@ -127,7 +132,7 @@ void msf_updateCellsElapsed(open_addr_t *neighbor, cellType_t type) {\nreturn;\n}\n- // addapt to downward traffic\n+ // adapt to downward traffic\nif (msf_vars.numCellsElapsed_rx == MAX_NUMCELLS) {\n@@ -136,6 +141,9 @@ void msf_updateCellsElapsed(open_addr_t *neighbor, cellType_t type) {\nmsf_vars.previousNumCellsUsed_rx = msf_vars.numCellsUsed_rx;\n+ // for debugging purposes\n+ msf_vars_debug.numCellsUsed_rx = msf_vars.numCellsUsed_rx;\n+\nif (msf_vars.numCellsUsed_rx > LIM_NUMCELLSUSED_HIGH) {\nmsf_vars.needAddRx = TRUE;\nscheduler_push_task(msf_trigger6pAdd, TASKPRIO_MSF);\n@@ -558,3 +566,12 @@ uint8_t msf_getPreviousNumCellsUsed(cellType_t cellType) {\nreturn 0;\n}\n}\n+\n+bool debugPrint_msf(){\n+ openserial_printStatus(\n+ STATUS_MSF,\n+ (uint8_t*)&msf_vars_debug,\n+ sizeof(msf_vars_debug_t)\n+ );\n+ return TRUE;\n+}\n\\ No newline at end of file\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/02b-MAChigh/msf.h",
"new_path": "openstack/02b-MAChigh/msf.h",
"diff": "@@ -48,6 +48,11 @@ typedef struct {\nuint8_t previousNumCellsUsed_rx;\n} msf_vars_t;\n+typedef struct {\n+ uint8_t numCellsUsed_tx;\n+ uint8_t numCellsUsed_rx;\n+} msf_vars_debug_t;\n+\n//=========================== module variables ================================\n//=========================== prototypes ======================================\n@@ -83,6 +88,8 @@ void msf_setHashCollisionFlag(bool isCollision);\nbool msf_getHashCollisionFlag(void);\nuint8_t msf_getPreviousNumCellsUsed(cellType_t cellType);\n+\n+bool debugPrint_msf(void);\n/**\n\\}\n\\}\n"
},
{
"change_type": "MODIFY",
"old_path": "projects/python/SConscript.env",
"new_path": "projects/python/SConscript.env",
"diff": "@@ -637,6 +637,7 @@ functionsToChange = [\n'msf_setHashCollisionFlag',\n'msf_getHashCollisionFlag',\n'msf_getPreviousNumCellsUsed',\n+ 'debugPrint_msf',\n# sixtop\n'sixtop_init',\n'sixtop_setSFcallback',\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-867. Add debugging output for MSF algorithm
|
491,587 |
29.05.2020 12:33:47
| -7,200 |
968047685a626aeb741e96c901b2724d4f9a86f5
|
Log sixtop 6p requests
|
[
{
"change_type": "MODIFY",
"old_path": "inc/opendefs.h",
"new_path": "inc/opendefs.h",
"diff": "@@ -236,55 +236,56 @@ enum {\nERR_NO_RECEIVED_PACKET = 0x24, // there is no received packet in queue\nERR_SCHEDULE_OVERFLOWN = 0x25, // schedule overflown\nERR_SIXTOP_RETURNCODE = 0x26, // sixtop return code {0} at sixtop state {1}\n- ERR_SIXTOP_COUNT = 0x27, // there are {0} cells to request mote\n- ERR_SIXTOP_LIST = 0x28, // the cells reserved to request mote contains slot {0} and slot {1}\n+ ERR_SIXTOP_REQUEST = 0x27, // sending a 6top request\n+ ERR_SIXTOP_COUNT = 0x28, // there are {0} cells to request mote\n+ ERR_SIXTOP_LIST = 0x29, // the cells reserved to request mote contains slot {0} and slot {1}\n// l3a\n- ERR_WRONG_CELLTYPE = 0x29, // wrong celltype {0} at slotOffset {1}\n- ERR_IEEE154_UNSUPPORTED = 0x2a, // unsupported IEEE802.15.4 parameter {1} at location {0}\n- ERR_DESYNCHRONIZED = 0x2b, // got desynchronized at slotOffset {0}\n- ERR_SYNCHRONIZED = 0x2c, // synchronized at slotOffset {0}\n- ERR_LARGE_TIMECORRECTION = 0x2d, // large timeCorr.: {0} ticks (code loc. {1})\n- ERR_WRONG_STATE_IN_ENDFRAME_SYNC = 0x2e, // wrong state {0} in end of frame+sync\n- ERR_WRONG_STATE_IN_STARTSLOT = 0x2f, // wrong state {0} in startSlot, at slotOffset {1}\n- ERR_WRONG_STATE_IN_TIMERFIRES = 0x30, // wrong state {0} in timer fires, at slotOffset {1}\n- ERR_WRONG_STATE_IN_NEWSLOT = 0x31, // wrong state {0} in start of frame, at slotOffset {1}\n- ERR_WRONG_STATE_IN_ENDOFFRAME = 0x32, // wrong state {0} in end of frame, at slotOffset {1}\n- ERR_MAXTXDATAPREPARE_OVERFLOW = 0x33, // maxTxDataPrepare overflows while at state {0} in slotOffset {1}\n- ERR_MAXRXACKPREPARE_OVERFLOWS = 0x34, // maxRxAckPrepapare overflows while at state {0} in slotOffset {1}\n- ERR_MAXRXDATAPREPARE_OVERFLOWS = 0x35, // maxRxDataPrepapre overflows while at state {0} in slotOffset {1}\n- ERR_MAXTXACKPREPARE_OVERFLOWS = 0x36, // maxTxAckPrepapre overflows while at state {0} in slotOffset {1}\n- ERR_WDDATADURATION_OVERFLOWS = 0x37, // wdDataDuration overflows while at state {0} in slotOffset {1}\n- ERR_WDRADIO_OVERFLOWS = 0x38, // wdRadio overflows while at state {0} in slotOffset {1}\n- ERR_WDRADIOTX_OVERFLOWS = 0x39, // wdRadioTx overflows while at state {0} in slotOffset {1}\n- ERR_WDACKDURATION_OVERFLOWS = 0x3a, // wdAckDuration overflows while at state {0} in slotOffset {1}\n- ERR_SECURITY = 0x3b, // security error on frameType {0}, code location {1}\n+ ERR_WRONG_CELLTYPE = 0x2a, // wrong celltype {0} at slotOffset {1}\n+ ERR_IEEE154_UNSUPPORTED = 0x2b, // unsupported IEEE802.15.4 parameter {1} at location {0}\n+ ERR_DESYNCHRONIZED = 0x2c, // got desynchronized at slotOffset {0}\n+ ERR_SYNCHRONIZED = 0x2d, // synchronized at slotOffset {0}\n+ ERR_LARGE_TIMECORRECTION = 0x2e, // large timeCorr.: {0} ticks (code loc. {1})\n+ ERR_WRONG_STATE_IN_ENDFRAME_SYNC = 0x2f, // wrong state {0} in end of frame+sync\n+ ERR_WRONG_STATE_IN_STARTSLOT = 0x31, // wrong state {0} in startSlot, at slotOffset {1}\n+ ERR_WRONG_STATE_IN_TIMERFIRES = 0x31, // wrong state {0} in timer fires, at slotOffset {1}\n+ ERR_WRONG_STATE_IN_NEWSLOT = 0x32, // wrong state {0} in start of frame, at slotOffset {1}\n+ ERR_WRONG_STATE_IN_ENDOFFRAME = 0x33, // wrong state {0} in end of frame, at slotOffset {1}\n+ ERR_MAXTXDATAPREPARE_OVERFLOW = 0x34, // maxTxDataPrepare overflows while at state {0} in slotOffset {1}\n+ ERR_MAXRXACKPREPARE_OVERFLOWS = 0x35, // maxRxAckPrepapare overflows while at state {0} in slotOffset {1}\n+ ERR_MAXRXDATAPREPARE_OVERFLOWS = 0x36, // maxRxDataPrepapre overflows while at state {0} in slotOffset {1}\n+ ERR_MAXTXACKPREPARE_OVERFLOWS = 0x37, // maxTxAckPrepapre overflows while at state {0} in slotOffset {1}\n+ ERR_WDDATADURATION_OVERFLOWS = 0x38, // wdDataDuration overflows while at state {0} in slotOffset {1}\n+ ERR_WDRADIO_OVERFLOWS = 0x39, // wdRadio overflows while at state {0} in slotOffset {1}\n+ ERR_WDRADIOTX_OVERFLOWS = 0x3a, // wdRadioTx overflows while at state {0} in slotOffset {1}\n+ ERR_WDACKDURATION_OVERFLOWS = 0x3b, // wdAckDuration overflows while at state {0} in slotOffset {1}\n+ ERR_SECURITY = 0x3c, // security error on frameType {0}, code location {1}\n// cross layer\n- ERR_GETDATA_ASKS_TOO_FEW_BYTES = 0x3c, // getData asks for too few bytes, maxNumBytes={0}, fill level={1}\n- ERR_INPUT_BUFFER_OVERFLOW = 0x3d, // the input buffer has overflown\n+ ERR_GETDATA_ASKS_TOO_FEW_BYTES = 0x3d, // getData asks for too few bytes, maxNumBytes={0}, fill level={1}\n+ ERR_INPUT_BUFFER_OVERFLOW = 0x3e, // the input buffer has overflown\n// general\n- ERR_BUSY_SENDING = 0x3e, // busy sending\n- ERR_UNEXPECTED_SENDDONE = 0x3f, // sendDone for packet I didn't send\n- ERR_NO_FREE_PACKET_BUFFER = 0x40, // no free packet buffer (code location {0})\n- ERR_NO_FREE_TIMER_OR_QUEUE_ENTRY = 0x41, // no free timer or queue entry (code location {0})\n- ERR_FREEING_UNUSED = 0x42, // freeing unused memory\n- ERR_FREEING_ERROR = 0x43, // freeing memory unsupported memory\n- ERR_UNSUPPORTED_COMMAND = 0x44, // unsupported command {0}\n- ERR_MSG_UNKNOWN_TYPE = 0x45, // unknown message type {0}\n- ERR_WRONG_ADDR_TYPE = 0x46, // wrong address type {0} (code location {1})\n- ERR_BRIDGE_MISMATCH = 0x47, // bridge mismatch (code location {0})\n- ERR_HEADER_TOO_LONG = 0x48, // header too long, length {1} (code location {0})\n- ERR_INPUTBUFFER_LENGTH = 0x49, // input length problem, length={0}\n- ERR_BOOTED = 0x4a, // booted\n- ERR_INVALIDSERIALFRAME = 0x4b, // invalid serial frame\n- ERR_INVALIDPACKETFROMRADIO = 0x4c, // invalid packet from radio, length {1} (code location {0})\n- ERR_BUSY_RECEIVING = 0x4d, // busy receiving when stop of serial activity, buffer input length {1} (code location {0})\n- ERR_WRONG_CRC_INPUT = 0x4e, // wrong CRC in input Buffer\n- ERR_PACKET_SYNC = 0x4f, // synchronized when received a packet\n- ERR_SCHEDULE_ADDDUPLICATESLOT = 0x50, // the slot {0} to be added is already in schedule\n- ERR_UNSUPPORTED_FORMAT = 0x51, // the received packet format is not supported (code location {0})\n- ERR_UNSUPPORTED_METADATA = 0x52, // the metadata type is not suppored\n- ERR_MAXRETRIES_REACHED = 0x53, // maxretries reached (counter: {0})\n- ERR_EMPTY_QUEUE_OR_UNKNOWN_TIMER = 0x54, // empty queue or trying to remove unknown timer id (code location {0})\n+ ERR_BUSY_SENDING = 0x3f, // busy sending\n+ ERR_UNEXPECTED_SENDDONE = 0x40, // sendDone for packet I didn't send\n+ ERR_NO_FREE_PACKET_BUFFER = 0x41, // no free packet buffer (code location {0})\n+ ERR_NO_FREE_TIMER_OR_QUEUE_ENTRY = 0x42, // no free timer or queue entry (code location {0})\n+ ERR_FREEING_UNUSED = 0x43, // freeing unused memory\n+ ERR_FREEING_ERROR = 0x44, // freeing memory unsupported memory\n+ ERR_UNSUPPORTED_COMMAND = 0x45, // unsupported command {0}\n+ ERR_MSG_UNKNOWN_TYPE = 0x46, // unknown message type {0}\n+ ERR_WRONG_ADDR_TYPE = 0x47, // wrong address type {0} (code location {1})\n+ ERR_BRIDGE_MISMATCH = 0x48, // bridge mismatch (code location {0})\n+ ERR_HEADER_TOO_LONG = 0x49, // header too long, length {1} (code location {0})\n+ ERR_INPUTBUFFER_LENGTH = 0x4a, // input length problem, length={0}\n+ ERR_BOOTED = 0x4b, // booted\n+ ERR_INVALIDSERIALFRAME = 0x4c, // invalid serial frame\n+ ERR_INVALIDPACKETFROMRADIO = 0x4d, // invalid packet from radio, length {1} (code location {0})\n+ ERR_BUSY_RECEIVING = 0x4e, // busy receiving when stop of serial activity, buffer input length {1} (code location {0})\n+ ERR_WRONG_CRC_INPUT = 0x4f, // wrong CRC in input Buffer\n+ ERR_PACKET_SYNC = 0x50, // synchronized when received a packet\n+ ERR_SCHEDULE_ADDDUPLICATESLOT = 0x51, // the slot {0} to be added is already in schedule\n+ ERR_UNSUPPORTED_FORMAT = 0x52, // the received packet format is not supported (code location {0})\n+ ERR_UNSUPPORTED_METADATA = 0x53, // the metadata type is not suppored\n+ ERR_MAXRETRIES_REACHED = 0x54, // maxretries reached (counter: {0})\n+ ERR_EMPTY_QUEUE_OR_UNKNOWN_TIMER = 0x55, // empty queue or trying to remove unknown timer id (code location {0})\n};\n//=========================== typedef =========================================\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/02b-MAChigh/sixtop.c",
"new_path": "openstack/02b-MAChigh/sixtop.c",
"diff": "@@ -315,6 +315,7 @@ owerror_t sixtop_request(\noutcome = sixtop_send(pkt);\nif (outcome == E_SUCCESS) {\n+ openserial_printLog(LOG_INFO, COMPONENT_SIXTOP, ERR_SIXTOP_REQUEST, (errorparameter_t) code, 0);\n//update states\nswitch (code) {\ncase IANA_6TOP_CMD_ADD:\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-867. Log sixtop 6p requests
|
491,587 |
02.06.2020 10:25:59
| -7,200 |
130c46305e68b15fe0b92fb157a2cd50aaa27959
|
Cleanup opendefs defines
|
[
{
"change_type": "MODIFY",
"old_path": "drivers/common/openserial.c",
"new_path": "drivers/common/openserial.c",
"diff": "@@ -746,7 +746,7 @@ port_INLINE void inputHdlcClose(void) {\nvoid task_printInputBufferOverflow(void) {\n// input buffer overflow\n- LOG_ERROR(COMPONENT_OPENSERIAL, ERR_INPUT_BUFFER_OVERFLOW, (errorparameter_t) 0, (errorparameter_t) 0);\n+ LOG_ERROR(COMPONENT_OPENSERIAL, ERR_BUFFER_OVERFLOW, (errorparameter_t) 0, (errorparameter_t) 0);\n}\nvoid task_printWrongCRCInput(void) {\n"
},
{
"change_type": "MODIFY",
"old_path": "inc/opendefs.h",
"new_path": "inc/opendefs.h",
"diff": "@@ -198,39 +198,38 @@ enum {\nERR_JOINED = 0x01, // node joined\nERR_JOIN_REQUEST = 0x02, // sending CJOIN request\nERR_SEQUENCE_NUMBER_OVERFLOW = 0x03, // OSCORE sequence number reached maximum value\n- ERR_BUFFER_OVERFLOW = 0x04, // OSCORE buffer overflow detected (code location {0})\n- ERR_REPLAY_FAILED = 0x05, // OSCORE replay protection failed\n- ERR_DECRYPTION_FAILED = 0x06, // OSCORE decryption and tag verification failed\n- ERR_ABORT_JOIN_PROCESS = 0x07, // Aborted join process (code location {0})\n+ ERR_REPLAY_FAILED = 0x04, // OSCORE replay protection failed\n+ ERR_DECRYPTION_FAILED = 0x05, // OSCORE decryption and tag verification failed\n+ ERR_ABORT_JOIN_PROCESS = 0x06, // Aborted join process (code location {0})\n// l4\n- ERR_WRONG_TRAN_PROTOCOL = 0x08, // unknown transport protocol {0} (code location {1})\n- ERR_UNSUPPORTED_PORT_NUMBER = 0x09, // unsupported port number {0} (code location {1})\n- ERR_INVALID_CHECKSUM = 0x0a, // invalid checksum, expected 0x{:04x}, found 0x{:04x}\n- // l3\n- ERR_RCVD_ECHO_REQUEST = 0x0b, // received an echo request (length: {0})\n- ERR_RCVD_ECHO_REPLY = 0x0c, // received an echo reply\n- ERR_6LORH_DEADLINE_EXPIRED = 0x0d, // the received packet has expired\n- ERR_6LORH_DEADLINE_DROPPED = 0x0e, // packet expiry time reached, dropped\n- ERR_UNEXPECTED_DAO = 0x0f, // unexpected DAO (code location {0}). A change maybe happened on dagroot node.\n- ERR_UNSUPPORTED_ICMPV6_TYPE = 0x10, // unsupported ICMPv6 type {0} (code location {1})\n- ERR_6LOWPAN_UNSUPPORTED = 0x11, // unsupported 6LoWPAN parameter {1} at location {0}\n- ERR_NO_NEXTHOP = 0x12, // no next hop for layer 3 destination {0:x}{1:x}\n- ERR_INVALID_PARAM = 0x13, // invalid parameter\n- ERR_INVALID_FWDMODE = 0x14, // invalid forward mode\n- ERR_LARGE_DAGRANK = 0x15, // large DAGrank {0}, set to {1}\n- ERR_HOP_LIMIT_REACHED = 0x16, // packet discarded hop limit reached\n- ERR_LOOP_DETECTED = 0x17, // loop detected due to previous rank {0} lower than current node rank {1}\n- ERR_WRONG_DIRECTION = 0x18, // upstream packet set to be downstream, possible loop.\n- ERR_FORWARDING_PACKET_DROPPED = 0x19, // packet to forward is dropped (code location {0})\n- ERR_FRAG_BUFFER_OV = 0x1a, // fragmentation buffer overflowed ({0} fragments queued)\n- ERR_FRAG_INVALID_SIZE = 0x1b, // invalid original packet size ({0} > {1})\n- ERR_FRAG_REASSEMBLED = 0x1c, // reassembled fragments into big packet (size: {0}, tag: {1})\n- ERR_FRAG_FAST_FORWARD = 0x1d, // fast-forwarded all fragments with tag {0} (total size: {1})\n- ERR_FRAG_STORED = 0x1e, // stored a fragment with offset {0} (currently in buffer: {1})\n- ERR_FRAG_TX_FAIL = 0x1f, // failed to send fragment with tag {0} (offset: {1})\n- ERR_FRAG_REASSEMBLY_OR_VRB_TIMEOUT = 0x20, // reassembly or vrb timer expired for fragments with tag {0}\n- ERR_FRAG_FRAGMENTING = 0x21, // fragmenting a big packet, original size {0}, number of fragments {1}\n+ ERR_WRONG_TRAN_PROTOCOL = 0x07, // unknown transport protocol {0} (code location {1})\n+ ERR_UNSUPPORTED_PORT_NUMBER = 0x08, // unsupported port number {0} (code location {1})\n+ ERR_INVALID_CHECKSUM = 0x09, // invalid checksum, expected 0x{:04x}, found 0x{:04x}\n+ // l3a/b\n+ ERR_RCVD_ECHO_REQUEST = 0x0a, // received an echo request (length: {0})\n+ ERR_RCVD_ECHO_REPLY = 0x0b, // received an echo reply\n+ ERR_6LORH_DEADLINE_EXPIRED = 0x0c, // the received packet has expired\n+ ERR_6LORH_DEADLINE_DROPPED = 0x0d, // packet expiry time reached, dropped\n+ ERR_UNEXPECTED_DAO = 0x0e, // unexpected DAO (code location {0}). A change maybe happened on dagroot node.\n+ ERR_UNSUPPORTED_ICMPV6_TYPE = 0x0f, // unsupported ICMPv6 type {0} (code location {1})\n+ ERR_6LOWPAN_UNSUPPORTED = 0x10, // unsupported 6LoWPAN parameter {1} at location {0}\n+ ERR_NO_NEXTHOP = 0x11, // no next hop for layer 3 destination {0:x}{1:x}\n+ ERR_INVALID_PARAM = 0x12, // invalid parameter\n+ ERR_INVALID_FWDMODE = 0x13, // invalid forward mode\n+ ERR_LARGE_DAGRANK = 0x14, // large DAGrank {0}, set to {1}\n+ ERR_HOP_LIMIT_REACHED = 0x15, // packet discarded hop limit reached\n+ ERR_LOOP_DETECTED = 0x16, // loop detected due to previous rank {0} lower than current node rank {1}\n+ ERR_WRONG_DIRECTION = 0x17, // upstream packet set to be downstream, possible loop.\n+ ERR_FORWARDING_PACKET_DROPPED = 0x18, // packet to forward is dropped (code location {0})\n+ ERR_FRAG_INVALID_SIZE = 0x1a, // invalid original packet size ({0} > {1})\n+ ERR_FRAG_REASSEMBLED = 0x1b, // reassembled fragments into big packet (size: {0}, tag: {1})\n+ ERR_FRAG_FAST_FORWARD = 0x1c, // fast-forwarded all fragments with tag {0} (total size: {1})\n+ ERR_FRAG_STORED = 0x1d, // stored a fragment with offset {0} (currently in buffer: {1})\n+ ERR_FRAG_REASSEMBLY_OR_VRB_TIMEOUT = 0x1e, // reassembly or vrb timer expired for fragments with tag {0}\n+ ERR_FRAG_FRAGMENTING = 0x1f, // fragmenting a big packet, original size {0}, number of fragments {1}\n+ ERR_BRIDGE_MISMATCH = 0x20, // bridge mismatch (code location {0})\n// l2b\n+ ERR_SCHEDULE_ADD_DUPLICATE_SLOT = 0x21, // the slot {0} to be added is already in schedule\nERR_NEIGHBORS_FULL = 0x22, // neighbors table is full (max number of neighbor is {0})\nERR_NO_SENT_PACKET = 0x23, // there is no sent packet in queue\nERR_NO_RECEIVED_PACKET = 0x24, // there is no received packet in queue\n@@ -239,53 +238,48 @@ enum {\nERR_SIXTOP_REQUEST = 0x27, // sending a 6top request\nERR_SIXTOP_COUNT = 0x28, // there are {0} cells to request mote\nERR_SIXTOP_LIST = 0x29, // the cells reserved to request mote contains slot {0} and slot {1}\n- // l3a\n- ERR_WRONG_CELLTYPE = 0x2a, // wrong celltype {0} at slotOffset {1}\n- ERR_IEEE154_UNSUPPORTED = 0x2b, // unsupported IEEE802.15.4 parameter {1} at location {0}\n- ERR_DESYNCHRONIZED = 0x2c, // got desynchronized at slotOffset {0}\n- ERR_SYNCHRONIZED = 0x2d, // synchronized at slotOffset {0}\n- ERR_LARGE_TIMECORRECTION = 0x2e, // large timeCorr.: {0} ticks (code loc. {1})\n- ERR_WRONG_STATE_IN_ENDFRAME_SYNC = 0x2f, // wrong state {0} in end of frame+sync\n- ERR_WRONG_STATE_IN_STARTSLOT = 0x31, // wrong state {0} in startSlot, at slotOffset {1}\n- ERR_WRONG_STATE_IN_TIMERFIRES = 0x31, // wrong state {0} in timer fires, at slotOffset {1}\n- ERR_WRONG_STATE_IN_NEWSLOT = 0x32, // wrong state {0} in start of frame, at slotOffset {1}\n- ERR_WRONG_STATE_IN_ENDOFFRAME = 0x33, // wrong state {0} in end of frame, at slotOffset {1}\n- ERR_MAXTXDATAPREPARE_OVERFLOW = 0x34, // maxTxDataPrepare overflows while at state {0} in slotOffset {1}\n- ERR_MAXRXACKPREPARE_OVERFLOWS = 0x35, // maxRxAckPrepapare overflows while at state {0} in slotOffset {1}\n- ERR_MAXRXDATAPREPARE_OVERFLOWS = 0x36, // maxRxDataPrepapre overflows while at state {0} in slotOffset {1}\n- ERR_MAXTXACKPREPARE_OVERFLOWS = 0x37, // maxTxAckPrepapre overflows while at state {0} in slotOffset {1}\n- ERR_WDDATADURATION_OVERFLOWS = 0x38, // wdDataDuration overflows while at state {0} in slotOffset {1}\n- ERR_WDRADIO_OVERFLOWS = 0x39, // wdRadio overflows while at state {0} in slotOffset {1}\n- ERR_WDRADIOTX_OVERFLOWS = 0x3a, // wdRadioTx overflows while at state {0} in slotOffset {1}\n- ERR_WDACKDURATION_OVERFLOWS = 0x3b, // wdAckDuration overflows while at state {0} in slotOffset {1}\n- ERR_SECURITY = 0x3c, // security error on frameType {0}, code location {1}\n+ ERR_UNSUPPORTED_FORMAT = 0x2a, // the received packet format is not supported (code location {0})\n+ ERR_UNSUPPORTED_METADATA = 0x2b, // the metadata type is not suppored\n+ // l2a\n+ ERR_WRONG_CELLTYPE = 0x2c, // wrong celltype {0} at slotOffset {1}\n+ ERR_IEEE154_UNSUPPORTED = 0x2d, // unsupported IEEE802.15.4 parameter {1} at location {0}\n+ ERR_DESYNCHRONIZED = 0x2e, // got desynchronized at slotOffset {0}\n+ ERR_SYNCHRONIZED = 0x2f, // synchronized at slotOffset {0}\n+ ERR_LARGE_TIMECORRECTION = 0x30, // large timeCorr.: {0} ticks (code loc. {1})\n+ ERR_WRONG_STATE_IN_ENDFRAME_SYNC = 0x31, // wrong state {0} in end of frame+sync\n+ ERR_WRONG_STATE_IN_STARTSLOT = 0x32, // wrong state {0} in startSlot, at slotOffset {1}\n+ ERR_WRONG_STATE_IN_TIMERFIRES = 0x33, // wrong state {0} in timer fires, at slotOffset {1}\n+ ERR_WRONG_STATE_IN_NEWSLOT = 0x34, // wrong state {0} in start of frame, at slotOffset {1}\n+ ERR_WRONG_STATE_IN_ENDOFFRAME = 0x35, // wrong state {0} in end of frame, at slotOffset {1}\n+ ERR_MAXTXDATAPREPARE_OVERFLOW = 0x36, // maxTxDataPrepare overflows while at state {0} in slotOffset {1}\n+ ERR_MAXRXACKPREPARE_OVERFLOWS = 0x37, // maxRxAckPrepapare overflows while at state {0} in slotOffset {1}\n+ ERR_MAXRXDATAPREPARE_OVERFLOWS = 0x38, // maxRxDataPrepapre overflows while at state {0} in slotOffset {1}\n+ ERR_MAXTXACKPREPARE_OVERFLOWS = 0x39, // maxTxAckPrepapre overflows while at state {0} in slotOffset {1}\n+ ERR_WDDATADURATION_OVERFLOWS = 0x3a, // wdDataDuration overflows while at state {0} in slotOffset {1}\n+ ERR_WDRADIO_OVERFLOWS = 0x3b, // wdRadio overflows while at state {0} in slotOffset {1}\n+ ERR_WDRADIOTX_OVERFLOWS = 0x3c, // wdRadioTx overflows while at state {0} in slotOffset {1}\n+ ERR_WDACKDURATION_OVERFLOWS = 0x3d, // wdAckDuration overflows while at state {0} in slotOffset {1}\n+ ERR_SECURITY = 0x3e, // security error on frameType {0}, code location {1}\n+ ERR_INVALID_PACKET_FROM_RADIO = 0x3f,\n+ // drivers\n+ ERR_GETDATA_ASKS_TOO_FEW_BYTES = 0x40, // getData asks for too few bytes, maxNumBytes={0}, fill level={1}\n+ ERR_WRONG_CRC_INPUT = 0x41, // wrong CRC in input Buffer\n// cross layer\n- ERR_GETDATA_ASKS_TOO_FEW_BYTES = 0x3d, // getData asks for too few bytes, maxNumBytes={0}, fill level={1}\n- ERR_INPUT_BUFFER_OVERFLOW = 0x3e, // the input buffer has overflown\n- // general\n- ERR_BUSY_SENDING = 0x3f, // busy sending\n- ERR_UNEXPECTED_SENDDONE = 0x40, // sendDone for packet I didn't send\n- ERR_NO_FREE_PACKET_BUFFER = 0x41, // no free packet buffer (code location {0})\n- ERR_NO_FREE_TIMER_OR_QUEUE_ENTRY = 0x42, // no free timer or queue entry (code location {0})\n- ERR_FREEING_UNUSED = 0x43, // freeing unused memory\n- ERR_FREEING_ERROR = 0x44, // freeing memory unsupported memory\n- ERR_UNSUPPORTED_COMMAND = 0x45, // unsupported command {0}\n- ERR_MSG_UNKNOWN_TYPE = 0x46, // unknown message type {0}\n- ERR_WRONG_ADDR_TYPE = 0x47, // wrong address type {0} (code location {1})\n- ERR_BRIDGE_MISMATCH = 0x48, // bridge mismatch (code location {0})\n- ERR_HEADER_TOO_LONG = 0x49, // header too long, length {1} (code location {0})\n- ERR_INPUTBUFFER_LENGTH = 0x4a, // input length problem, length={0}\n- ERR_BOOTED = 0x4b, // booted\n- ERR_INVALIDSERIALFRAME = 0x4c, // invalid serial frame\n- ERR_INVALIDPACKETFROMRADIO = 0x4d, // invalid packet from radio, length {1} (code location {0})\n- ERR_BUSY_RECEIVING = 0x4e, // busy receiving when stop of serial activity, buffer input length {1} (code location {0})\n- ERR_WRONG_CRC_INPUT = 0x4f, // wrong CRC in input Buffer\n- ERR_PACKET_SYNC = 0x50, // synchronized when received a packet\n- ERR_SCHEDULE_ADDDUPLICATESLOT = 0x51, // the slot {0} to be added is already in schedule\n- ERR_UNSUPPORTED_FORMAT = 0x52, // the received packet format is not supported (code location {0})\n- ERR_UNSUPPORTED_METADATA = 0x53, // the metadata type is not suppored\n- ERR_MAXRETRIES_REACHED = 0x54, // maxretries reached (counter: {0})\n- ERR_EMPTY_QUEUE_OR_UNKNOWN_TIMER = 0x55, // empty queue or trying to remove unknown timer id (code location {0})\n+ ERR_BUFFER_OVERFLOW = 0x42, // buffer overflow detected (code location {0})\n+ ERR_BUSY_SENDING = 0x43, // busy sending\n+ ERR_UNEXPECTED_SENDDONE = 0x44, // sendDone for packet I didn't send\n+ ERR_NO_FREE_PACKET_BUFFER = 0x45, // no free packet buffer (code location {0})\n+ ERR_NO_FREE_TIMER_OR_QUEUE_ENTRY = 0x46, // no free timer or queue entry (code location {0})\n+ ERR_FREEING_UNUSED = 0x47, // freeing unused memory\n+ ERR_FREEING_ERROR = 0x48, // freeing memory unsupported memory\n+ ERR_MSG_UNKNOWN_TYPE = 0x49, // unknown message type {0}\n+ ERR_WRONG_ADDR_TYPE = 0x4a, // wrong address type {0} (code location {1})\n+ ERR_PACKET_TOO_LONG = 0x4b, // total packet size is too long, length {1} (code location {0})\n+ ERR_INPUTBUFFER_LENGTH = 0x4c, // input length problem, length={0}\n+ ERR_BOOTED = 0x4d, // booted\n+ ERR_MAXRETRIES_REACHED = 0x4e, // maxretries reached (counter: {0})\n+ ERR_EMPTY_QUEUE_OR_UNKNOWN_TIMER = 0x4f, // empty queue or trying to remove unknown timer id (code location {0})\n+ ERR_PUSH_LOWER_LAYER = 0x50, // failed to push to lower layer\n};\n//=========================== typedef =========================================\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/02a-MAClow/IEEE802154E.c",
"new_path": "openstack/02a-MAClow/IEEE802154E.c",
"diff": "@@ -766,7 +766,7 @@ port_INLINE void activity_synchronize_endOfFrame(PORT_TIMER_WIDTH capturedTime)\nieee154e_vars.dataReceived->length > LENGTH_IEEE154_MAX) {\n// break from the do-while loop and execute abort code below\n- LOG_ERROR(COMPONENT_IEEE802154E, ERR_INVALIDPACKETFROMRADIO,\n+ LOG_ERROR(COMPONENT_IEEE802154E, ERR_INVALID_PACKET_FROM_RADIO,\n(errorparameter_t) 0,\nieee154e_vars.dataReceived->length);\nbreak;\n@@ -1520,7 +1520,7 @@ port_INLINE void activity_ti9(PORT_TIMER_WIDTH capturedTime) {\n// break if wrong length\nif (ieee154e_vars.ackReceived->length < LENGTH_CRC || ieee154e_vars.ackReceived->length > LENGTH_IEEE154_MAX) {\n// break from the do-while loop and execute the clean-up code below\n- LOG_ERROR(COMPONENT_IEEE802154E, ERR_INVALIDPACKETFROMRADIO,\n+ LOG_ERROR(COMPONENT_IEEE802154E, ERR_INVALID_PACKET_FROM_RADIO,\n(errorparameter_t) 1,\nieee154e_vars.ackReceived->length);\n@@ -1761,7 +1761,7 @@ port_INLINE void activity_ri5(PORT_TIMER_WIDTH capturedTime) {\nif (ieee154e_vars.dataReceived->length < LENGTH_CRC ||\nieee154e_vars.dataReceived->length > LENGTH_IEEE154_MAX) {\n// jump to the error code below this do-while loop\n- LOG_ERROR(COMPONENT_IEEE802154E, ERR_INVALIDPACKETFROMRADIO,\n+ LOG_ERROR(COMPONENT_IEEE802154E, ERR_INVALID_PACKET_FROM_RADIO,\n(errorparameter_t) ieee154e_vars.dataReceived->length,\n(errorparameter_t) 2);\nbreak;\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/02b-MAChigh/schedule.c",
"new_path": "openstack/02b-MAChigh/schedule.c",
"diff": "@@ -416,7 +416,7 @@ owerror_t schedule_addActiveSlot(\n}\nif (previousSlotWalker->slotOffset == slotContainer->slotOffset) {\n// slot is already in schedule\n- LOG_ERROR(COMPONENT_SCHEDULE, ERR_SCHEDULE_ADDDUPLICATESLOT,\n+ LOG_ERROR(COMPONENT_SCHEDULE, ERR_SCHEDULE_ADD_DUPLICATE_SLOT,\n(errorparameter_t) slotContainer->slotOffset,\n(errorparameter_t) 0);\n// reset the entry\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/03a-IPHC/frag.c",
"new_path": "openstack/03a-IPHC/frag.c",
"diff": "@@ -139,7 +139,7 @@ owerror_t frag_fragment6LoPacket(OpenQueueEntry_t *msg) {\ncleanup_fragments(frag_vars.global_tag);\n- LOG_ERROR(COMPONENT_FRAG, ERR_FRAG_BUFFER_OV, (errorparameter_t) 0, (errorparameter_t) 0);\n+ LOG_ERROR(COMPONENT_FRAG, ERR_BUFFER_OVERFLOW, (errorparameter_t) 1, (errorparameter_t) 0);\nreturn E_FAIL;\n}\n@@ -175,7 +175,7 @@ owerror_t frag_fragment6LoPacket(OpenQueueEntry_t *msg) {\nif (frag_vars.fragmentBuf[i].datagram_tag == frag_vars.global_tag) {\n// try to send the fragment. If this fails, abort the transmission of the other fragments.\nif (sixtop_send(frag_vars.fragmentBuf[i].pFragment) == E_FAIL) {\n- LOG_ERROR(COMPONENT_FRAG, ERR_FRAG_TX_FAIL,\n+ LOG_ERROR(COMPONENT_FRAG, ERR_PUSH_LOWER_LAYER,\n(errorparameter_t) frag_vars.global_tag,\n(errorparameter_t) frag_vars.fragmentBuf[i].datagram_offset);\ncleanup_fragments(frag_vars.global_tag);\n@@ -477,7 +477,7 @@ static void store_fragment(OpenQueueEntry_t *msg, uint16_t size, uint16_t tag, u\n// if we don't find any buffer space, delete all the related fragments\nif (i == FRAGMENT_BUFFER_SIZE) {\n- LOG_ERROR(COMPONENT_FRAG, ERR_FRAG_BUFFER_OV, (errorparameter_t) 0, (errorparameter_t) 0);\n+ LOG_ERROR(COMPONENT_FRAG, ERR_BUFFER_OVERFLOW, (errorparameter_t) 0, (errorparameter_t) 0);\ncleanup_fragments(tag);\nreturn;\n}\n@@ -659,7 +659,7 @@ static void fast_forward_frags(uint16_t tag, uint16_t size, uint8_t vrb_pos) {\nLOCK(frag_vars.fragmentBuf[i]);\nif (sixtop_send(frag_vars.fragmentBuf[i].pFragment) == E_FAIL) {\n- LOG_ERROR(COMPONENT_FRAG, ERR_FRAG_TX_FAIL,\n+ LOG_ERROR(COMPONENT_FRAG, ERR_PUSH_LOWER_LAYER,\n(errorparameter_t) frag_vars.fragmentBuf[i].datagram_tag,\n(errorparameter_t) frag_vars.fragmentBuf[i].datagram_offset);\n};\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/cross-layers/packetfunctions.c",
"new_path": "openstack/cross-layers/packetfunctions.c",
"diff": "@@ -296,7 +296,7 @@ void packetfunctions_reserveHeaderSize(OpenQueueEntry_t *pkt, uint16_t header_le\npkt->payload -= header_length;\npkt->length += header_length;\nif ((uint8_t * )(pkt->payload) < (uint8_t * )(pkt->packet)) {\n- LOG_CRITICAL(COMPONENT_PACKETFUNCTIONS, ERR_HEADER_TOO_LONG,\n+ LOG_CRITICAL(COMPONENT_PACKETFUNCTIONS, ERR_PACKET_TOO_LONG,\n(errorparameter_t) 0,\n(errorparameter_t) pkt->length);\n}\n@@ -315,7 +315,7 @@ void packetfunctions_tossHeader(OpenQueueEntry_t *pkt, uint16_t header_length) {\npkt->length -= header_length;\nif ((uint8_t * )(pkt->payload) > (uint8_t * )(pkt->packet + size)) {\n- LOG_ERROR(COMPONENT_PACKETFUNCTIONS, ERR_HEADER_TOO_LONG,\n+ LOG_ERROR(COMPONENT_PACKETFUNCTIONS, ERR_PACKET_TOO_LONG,\n(errorparameter_t) 1,\n(errorparameter_t) pkt->length);\n}\n@@ -331,7 +331,7 @@ void packetfunctions_reserveFooterSize(OpenQueueEntry_t *pkt, uint16_t header_le\npkt->length += header_length;\nif (pkt->length > size) {\n- LOG_CRITICAL(COMPONENT_PACKETFUNCTIONS, ERR_HEADER_TOO_LONG,\n+ LOG_CRITICAL(COMPONENT_PACKETFUNCTIONS, ERR_PACKET_TOO_LONG,\n(errorparameter_t) 2,\n(errorparameter_t) pkt->length);\n}\n@@ -348,7 +348,7 @@ void packetfunctions_tossFooter(OpenQueueEntry_t *pkt, uint16_t header_length) {\n#endif\nif (pkt->length > max_length) {//wraps around, so a negative value will be >128\n- LOG_ERROR(COMPONENT_PACKETFUNCTIONS, ERR_HEADER_TOO_LONG, (errorparameter_t) 3, (errorparameter_t) pkt->length);\n+ LOG_ERROR(COMPONENT_PACKETFUNCTIONS, ERR_PACKET_TOO_LONG, (errorparameter_t) 3, (errorparameter_t) pkt->length);\n}\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "openweb/opencoap/oscore.c",
"new_path": "openweb/opencoap/oscore.c",
"diff": "@@ -220,7 +220,7 @@ owerror_t oscore_protect_message(\nif (aadLen > AAD_MAX_LEN) {\n// corruption\n- LOG_ERROR(COMPONENT_OSCORE, ERR_BUFFER_OVERFLOW, (errorparameter_t) 0, (errorparameter_t) 0);\n+ LOG_ERROR(COMPONENT_OSCORE, ERR_BUFFER_OVERFLOW, (errorparameter_t) 0, (errorparameter_t) 1);\nreturn E_FAIL;\n}\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-867. Cleanup opendefs defines
|
491,595 |
04.06.2020 10:14:13
| -7,200 |
1152836048dcb0905b7f1215551988e6ec20e60b
|
update si70x sensor driver.
|
[
{
"change_type": "MODIFY",
"old_path": "bsp/boards/openmote-b-24ghz/sensors.c",
"new_path": "bsp/boards/openmote-b-24ghz/sensors.c",
"diff": "@@ -29,11 +29,9 @@ void sensors_init(void) {\nmemset(&sensors_vars,0,sizeof(sensors_vars_t));\n- if (si70x_is_present()==1) {\nsi70x_init();\nsensors_vars.sensorsTypes[SENSOR_TEMPERATURE] = 1;\nsensors_vars.sensorsTypes[SENSOR_HUMIDITY] = 1;\n- }\nadc_sensor_init();\nsensors_vars.sensorsTypes[SENSOR_ADCTEMPERATURE] = 1;\n"
},
{
"change_type": "MODIFY",
"old_path": "bsp/chips/si70x/si70x.c",
"new_path": "bsp/chips/si70x/si70x.c",
"diff": "//=========================== define ==========================================\n-#define SI70X_ADDRESS ( 0x80 )\n+#define SI70X_ADDRESS ( 0x40 )\n#define SI70X_USER_REG_READ ( 0xE7 )\n#define SI70X_USER_REG_WRITE ( 0xE6 )\n@@ -65,14 +65,6 @@ void si70x_init(void) {\n// Setup the configuration vector, the first position holds address\n// and the second position holds the actual configuration\nconfig[0] = SI70X_USER_REG_WRITE;\n- config[1] = 0;\n-\n- // Read the current configuration according to the datasheet (pag. 9, fig. 18)\n- i2c_write_byte(SI70X_ADDRESS, SI70X_USER_REG_READ);\n- i2c_read_byte(SI70X_ADDRESS, &config[1]);\n-\n- // Clean all the configuration bits except those reserved\n- config[1] &= SI70X_USER_REG_RESERVED_BITS;\n// Set the configuration bits without changing those reserved\nconfig[1] |= SI70X_USER_CONFIG;\n@@ -109,7 +101,7 @@ uint16_t si70x_read_temperature(void) {\ni2c_write_byte(SI70X_ADDRESS, SI70X_TEMPERATURE_HM_CMD);\ni2c_read_bytes(SI70X_ADDRESS, si70x_temperature, sizeof(si70x_temperature));\n- temperature = (si70x_temperature[0] << 8) | (si70x_temperature[1] & SI70X_STATUS_MASK);\n+ temperature = ((uint16_t)(si70x_temperature[0]) << 8) | (uint16_t)(si70x_temperature[1]);\nreturn temperature;\n}\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-876. update si70x sensor driver.
|
491,595 |
05.06.2020 17:09:36
| -7,200 |
0d008f37f84b3dbe8435b83fa736fc727ea14747
|
add bsp_dynamic_cal.c
|
[
{
"change_type": "ADD",
"old_path": null,
"new_path": "projects/common/01bsp_dynamic_cal/01bsp_dynamic_cal.c",
"diff": "+/**\n+\\brief This program shows the use of the \"radio\" bsp module.\n+\n+Since the bsp modules for different platforms have the same declaration, you\n+can use this project with any platform.\n+\n+This application has two phases:\n+\n+ 1. first the motes keeps sending frames for 10 seconds,\n+ 2. then mote goes to listen mode.\n+\n+During listen mode, the mote replies with an ACK when a valid frame is received.\n+\n+The frame sent by mote includes temperature data.\n+The ACK replied includes tempearture data and the frequency offset\n+corresponding to the incoming frame.\n+\n+\\author Tengfei Chang <tengfei.chang@inria.fr>, June 2020.\n+*/\n+\n+#include \"stdint.h\"\n+#include \"string.h\"\n+#include \"board.h\"\n+#include \"radio.h\"\n+#include \"leds.h\"\n+#include \"sctimer.h\"\n+#include \"sensors.h\"\n+\n+//=========================== defines =========================================\n+\n+#define LENGTH_PACKET 3+LENGTH_CRC // maximum length is 127 bytes\n+#define CHANNEL 11 // 24ghz: 11 = 2.405GHz, subghz: 11 = 865.325 in FSK operating mode #1\n+#define BEACON_PERIOD 10 // in seconds\n+#define TICKS_IN_ONE_SECOND 32768 // (32768>>1) = 500ms @ 32kHz\n+#define RX_TIMEOUT 10 // 10 = 300us @ 32kHz\n+\n+//=========================== variables =======================================\n+\n+typedef enum {\n+ S_SEND_BEACON = 0x00,\n+ S_LISTEN_PROBE = 0x01,\n+ S_REPLY_ACK = 0x02\n+} app_state_t;\n+\n+typedef struct {\n+ uint8_t time_in_second;\n+ uint8_t txpk_txDone;\n+ uint8_t txack_txDone;\n+ uint8_t rxpk_rxDone;\n+ uint8_t rx_timeout;\n+ uint8_t txack_started;\n+ uint8_t txpk_buf[LENGTH_PACKET];\n+ uint8_t txpk_len;\n+ app_state_t state;\n+ callbackRead_cbt read_temperature;\n+} app_vars_t;\n+\n+app_vars_t app_vars;\n+\n+//=========================== prototypes ======================================\n+\n+void cb_scTimerCompare(void);\n+void cb_startFrame(PORT_TIMER_WIDTH timestamp);\n+void cb_endFrame(PORT_TIMER_WIDTH timestamp);\n+void send_frame(uint8_t data);\n+\n+//=========================== main ============================================\n+\n+/**\n+\\brief The program starts executing here.\n+*/\n+int mote_main(void) {\n+\n+ uint8_t freq_offset;\n+\n+ // clear local variables\n+ memset(&app_vars,0,sizeof(app_vars_t));\n+\n+ // initialize board\n+ board_init();\n+\n+ // add radio callback functions\n+ sctimer_set_callback(cb_scTimerCompare);\n+ radio_setStartFrameCb(cb_startFrame);\n+ radio_setEndFrameCb(cb_endFrame);\n+\n+ // prepare radio\n+ radio_rfOn();\n+ // freq type only effects on scum port\n+ radio_setFrequency(CHANNEL, FREQ_TX);\n+ radio_rfOff();\n+\n+ // start the one second timer\n+ app_vars.time_in_second = 0;\n+ sctimer_setCompare(sctimer_readCounter()+ TICKS_IN_ONE_SECOND);\n+ sctimer_enable();\n+\n+ app_vars.read_temperature = sensors_getCallbackRead(SENSOR_TEMPERATURE);\n+\n+ app_vars.txpk_txDone = 1;\n+ app_vars.rx_timeout = 1;\n+\n+ while(1) {\n+\n+ switch(app_vars.state){\n+ case S_SEND_BEACON:\n+\n+ if (app_vars.txpk_txDone){\n+\n+ app_vars.txpk_txDone = 0;\n+ // led\n+ leds_error_toggle();\n+\n+ send_frame(app_vars.time_in_second);\n+ } else {\n+ board_sleep();\n+ }\n+ break;\n+ case S_LISTEN_PROBE:\n+ if (\n+ app_vars.rx_timeout == 1 ||\n+ app_vars.txack_txDone == 1\n+ ) {\n+\n+ app_vars.rxpk_rxDone = 0;\n+ app_vars.rx_timeout = 0;\n+\n+ radio_rfOff();\n+ radio_rxEnable();\n+ radio_rxNow();\n+\n+ } else {\n+ if (app_vars.rxpk_rxDone == 1) {\n+\n+ app_vars.rxpk_rxDone = 0;\n+ app_vars.txack_txDone = 0;\n+ app_vars.state = S_REPLY_ACK;\n+ } else {\n+ board_sleep();\n+ }\n+ }\n+ break;\n+ case S_REPLY_ACK:\n+ if (app_vars.txack_txDone == 1){\n+\n+ app_vars.txack_started = 0;\n+ app_vars.state = S_LISTEN_PROBE;\n+ } else {\n+\n+ if (app_vars.txack_started == 1) {\n+ board_sleep();\n+ } else {\n+ freq_offset = radio_getFrequencyOffset();\n+ send_frame(freq_offset);\n+ app_vars.txack_started = 1;\n+ }\n+ }\n+ break;\n+ }\n+ }\n+}\n+\n+//=========================== callbacks =======================================\n+\n+void cb_scTimerCompare(void) {\n+\n+ if (app_vars.state == S_SEND_BEACON) {\n+\n+ if (app_vars.time_in_second == BEACON_PERIOD) {\n+\n+ app_vars.state = S_LISTEN_PROBE;\n+ } else {\n+\n+ app_vars.time_in_second++;\n+ sctimer_setCompare(sctimer_readCounter()+ TICKS_IN_ONE_SECOND);\n+ }\n+ } else {\n+ // todo\n+\n+ app_vars.rx_timeout = 1;\n+ }\n+}\n+\n+void cb_startFrame(PORT_TIMER_WIDTH timestamp) {\n+\n+ // led\n+ leds_sync_on();\n+\n+ if (app_vars.state == S_LISTEN_PROBE){\n+\n+ // set a timeout for endFrame\n+ sctimer_setCompare(sctimer_readCounter()+ RX_TIMEOUT);\n+ }\n+\n+}\n+\n+void cb_endFrame(PORT_TIMER_WIDTH timestamp) {\n+\n+ if (app_vars.state == S_SEND_BEACON) {\n+\n+ app_vars.txpk_txDone = 1;\n+ } else {\n+\n+ if (app_vars.state == S_LISTEN_PROBE) {\n+\n+ sctimer_disable();\n+ app_vars.rxpk_rxDone = 1;\n+ } else {\n+\n+ if (app_vars.state == S_REPLY_ACK) {\n+\n+ app_vars.txack_txDone = 1;\n+ }\n+ }\n+\n+ }\n+\n+ // led\n+ leds_sync_off();\n+}\n+\n+// ========================== private =========================================\n+\n+void send_frame(uint8_t data) {\n+\n+ uint16_t temperature;\n+ uint16_t read;\n+ float result;\n+\n+ radio_rfOff();\n+ // prepare packet\n+ app_vars.txpk_len = sizeof(app_vars.txpk_buf);\n+\n+ // calculate the temperature\n+ read = app_vars.read_temperature();\n+ result = -46.85;\n+ result += 175.72 * read / 65536;\n+ temperature = (int16_t)(result);\n+\n+ app_vars.txpk_buf[0] = (uint8_t)((temperature & 0xff00)>>8);\n+ app_vars.txpk_buf[1] = (uint8_t)(temperature & 0x00ff);\n+ app_vars.txpk_buf[2] = data;\n+\n+ // send packet\n+ radio_loadPacket(app_vars.txpk_buf,app_vars.txpk_len);\n+ radio_txEnable();\n+ radio_txNow();\n+}\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-876. add bsp_dynamic_cal.c
|
491,595 |
10.06.2020 00:13:35
| -7,200 |
6d2c8d3cd7136bc9a3c48527fadf536956118f20
|
change the states in main function.
|
[
{
"change_type": "MODIFY",
"old_path": "projects/common/01bsp_continuously_cal/01bsp_continuously_cal.c",
"new_path": "projects/common/01bsp_continuously_cal/01bsp_continuously_cal.c",
"diff": "@@ -107,6 +107,12 @@ int mote_main(void) {\nif (app_vars.txpk_txDone){\n+ if (app_vars.time_in_second == BEACON_PERIOD) {\n+\n+ app_vars.state = S_LISTEN_PROBE;\n+ break;\n+ }\n+\napp_vars.txpk_txDone = 0;\n// led\nleds_error_toggle();\n@@ -166,14 +172,8 @@ void cb_scTimerCompare(void) {\nif (app_vars.state == S_SEND_BEACON) {\n- if (app_vars.time_in_second == BEACON_PERIOD) {\n-\n- app_vars.state = S_LISTEN_PROBE;\n- } else {\n-\napp_vars.time_in_second++;\nsctimer_setCompare(sctimer_readCounter()+ TICKS_IN_ONE_SECOND);\n- }\n} else {\n// todo\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-876. change the states in main function.
|
491,595 |
10.06.2020 15:00:18
| -7,200 |
2f7c8c09cc729a7f278c6fc465e29934c49caf74
|
verify receivedFrame and reset txAck_done flag.
|
[
{
"change_type": "MODIFY",
"old_path": "projects/common/01bsp_continuously_cal/01bsp_continuously_cal.c",
"new_path": "projects/common/01bsp_continuously_cal/01bsp_continuously_cal.c",
"diff": "@@ -29,8 +29,9 @@ corresponding to the incoming frame.\n//=========================== defines =========================================\n#define LENGTH_PACKET 3+LENGTH_CRC // maximum length is 127 bytes\n+#define MAX_PKT_LEN 125+LENGTH_CRC\n#define CHANNEL 11 // 24ghz: 11 = 2.405GHz, subghz: 11 = 865.325 in FSK operating mode #1\n-#define BEACON_PERIOD 10 // in seconds\n+#define BEACON_PERIOD 20 // in seconds\n#define TICKS_IN_ONE_SECOND 32768 // (32768>>1) = 500ms @ 32kHz\n#define RX_TIMEOUT 10 // 10 = 300us @ 32kHz\n@@ -128,6 +129,7 @@ int mote_main(void) {\napp_vars.txack_txDone == 1\n) {\n+ app_vars.txack_txDone = 0;\napp_vars.rxpk_rxDone = 0;\napp_vars.rx_timeout = 0;\n@@ -196,6 +198,12 @@ void cb_startFrame(PORT_TIMER_WIDTH timestamp) {\nvoid cb_endFrame(PORT_TIMER_WIDTH timestamp) {\n+ uint8_t packet[MAX_PKT_LEN];\n+ uint8_t pkt_len;\n+ int8_t rssi;\n+ uint8_t lqi;\n+ bool crc;\n+\nif (app_vars.state == S_SEND_BEACON) {\napp_vars.txpk_txDone = 1;\n@@ -203,8 +211,26 @@ void cb_endFrame(PORT_TIMER_WIDTH timestamp) {\nif (app_vars.state == S_LISTEN_PROBE) {\n+ radio_getReceivedFrame(\n+ packet,\n+ &pkt_len,\n+ sizeof(packet),\n+ &rssi,\n+ &lqi,\n+ &crc\n+ );\n+\n+ if (\n+ crc &&\n+ pkt_len==LENGTH_PACKET &&\n+ packet[0]=='S' &&\n+ packet[1]=='C' &&\n+ packet[2]=='M'\n+ ) {\n+\nsctimer_disable();\napp_vars.rxpk_rxDone = 1;\n+ }\n} else {\nif (app_vars.state == S_REPLY_ACK) {\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-876. verify receivedFrame and reset txAck_done flag.
|
491,587 |
11.06.2020 18:49:01
| -7,200 |
563a9e350af9591b4bdace668b179b4c1ea70f98
|
Bug fix for ENABLE_INTERRUPTS
|
[
{
"change_type": "MODIFY",
"old_path": "drivers/common/openserial.c",
"new_path": "drivers/common/openserial.c",
"diff": "@@ -594,10 +594,7 @@ void openserial_handleRxFrame() {\nopenbridge_triggerData();\nbreak;\ncase SERFRAME_PC2MOTE_TRIGGERSERIALECHO:\n- openserial_handleEcho(\n- &openserial_vars.inputBuf[1],\n- openserial_vars.inputBufFillLevel - 1\n- );\n+ openserial_handleEcho(&openserial_vars.inputBuf[1], openserial_vars.inputBufFillLevel - 1);\nbreak;\n}\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "inc/opendefs.h",
"new_path": "inc/opendefs.h",
"diff": "@@ -214,72 +214,72 @@ enum {\nERR_UNSUPPORTED_ICMPV6_TYPE = 0x0f, // unsupported ICMPv6 type {0} (code location {1})\nERR_6LOWPAN_UNSUPPORTED = 0x10, // unsupported 6LoWPAN parameter {1} at location {0}\nERR_NO_NEXTHOP = 0x11, // no next hop for layer 3 destination {0:x}{1:x}\n- ERR_INVALID_PARAM = 0x12, // invalid parameter\n- ERR_INVALID_FWDMODE = 0x13, // invalid forward mode\n- ERR_LARGE_DAGRANK = 0x14, // large DAGrank {0}, set to {1}\n- ERR_HOP_LIMIT_REACHED = 0x15, // packet discarded hop limit reached\n- ERR_LOOP_DETECTED = 0x16, // loop detected due to previous rank {0} lower than current node rank {1}\n- ERR_WRONG_DIRECTION = 0x17, // upstream packet set to be downstream, possible loop.\n- ERR_FORWARDING_PACKET_DROPPED = 0x18, // packet to forward is dropped (code location {0})\n- ERR_FRAG_INVALID_SIZE = 0x1a, // invalid original packet size ({0} > {1})\n- ERR_FRAG_REASSEMBLED = 0x1b, // reassembled fragments into big packet (size: {0}, tag: {1})\n- ERR_FRAG_FAST_FORWARD = 0x1c, // fast-forwarded all fragments with tag {0} (total size: {1})\n- ERR_FRAG_STORED = 0x1d, // stored a fragment with offset {0} (currently in buffer: {1})\n- ERR_FRAG_REASSEMBLY_OR_VRB_TIMEOUT = 0x1e, // reassembly or vrb timer expired for fragments with tag {0}\n- ERR_FRAG_FRAGMENTING = 0x1f, // fragmenting a big packet, original size {0}, number of fragments {1}\n- ERR_BRIDGE_MISMATCH = 0x20, // bridge mismatch (code location {0})\n+ ERR_INVALID_FWDMODE = 0x12, // invalid forward mode\n+ ERR_LARGE_DAGRANK = 0x13, // large DAGrank {0}, set to {1}\n+ ERR_HOP_LIMIT_REACHED = 0x14, // packet discarded hop limit reached\n+ ERR_LOOP_DETECTED = 0x15, // loop detected due to previous rank {0} lower than current node rank {1}\n+ ERR_WRONG_DIRECTION = 0x16, // upstream packet set to be downstream, possible loop.\n+ ERR_FORWARDING_PACKET_DROPPED = 0x17, // packet to forward is dropped (code location {0})\n+ ERR_FRAG_INVALID_SIZE = 0x19, // invalid original packet size ({0} > {1})\n+ ERR_FRAG_REASSEMBLED = 0x1a, // reassembled fragments into big packet (size: {0}, tag: {1})\n+ ERR_FRAG_FAST_FORWARD = 0x1b, // fast-forwarded all fragments with tag {0} (total size: {1})\n+ ERR_FRAG_STORED = 0x1c, // stored a fragment with offset {0} (currently in buffer: {1})\n+ ERR_FRAG_REASSEMBLY_OR_VRB_TIMEOUT = 0x1d, // reassembly or vrb timer expired for fragments with tag {0}\n+ ERR_FRAG_FRAGMENTING = 0x1e, // fragmenting a big packet, original size {0}, number of fragments {1}\n+ ERR_BRIDGE_MISMATCH = 0x1f, // bridge mismatch (code location {0})\n// l2b\n- ERR_SCHEDULE_ADD_DUPLICATE_SLOT = 0x21, // the slot {0} to be added is already in schedule\n- ERR_NEIGHBORS_FULL = 0x22, // neighbors table is full (max number of neighbor is {0})\n- ERR_NO_SENT_PACKET = 0x23, // there is no sent packet in queue\n- ERR_NO_RECEIVED_PACKET = 0x24, // there is no received packet in queue\n- ERR_SCHEDULE_OVERFLOWN = 0x25, // schedule overflown\n- ERR_SIXTOP_RETURNCODE = 0x26, // sixtop return code {0} at sixtop state {1}\n- ERR_SIXTOP_REQUEST = 0x27, // sending a 6top request\n- ERR_SIXTOP_COUNT = 0x28, // there are {0} cells to request mote\n- ERR_SIXTOP_LIST = 0x29, // the cells reserved to request mote contains slot {0} and slot {1}\n- ERR_UNSUPPORTED_FORMAT = 0x2a, // the received packet format is not supported (code location {0})\n- ERR_UNSUPPORTED_METADATA = 0x2b, // the metadata type is not suppored\n+ ERR_SCHEDULE_ADD_DUPLICATE_SLOT = 0x20, // the slot {0} to be added is already in schedule\n+ ERR_NEIGHBORS_FULL = 0x21, // neighbors table is full (max number of neighbor is {0})\n+ ERR_NO_SENT_PACKET = 0x22, // there is no sent packet in queue\n+ ERR_NO_RECEIVED_PACKET = 0x23, // there is no received packet in queue\n+ ERR_SCHEDULE_OVERFLOWN = 0x24, // schedule overflown\n+ ERR_SIXTOP_RETURNCODE = 0x25, // sixtop return code {0} at sixtop state {1}\n+ ERR_SIXTOP_REQUEST = 0x26, // sending a 6top request\n+ ERR_SIXTOP_COUNT = 0x27, // there are {0} cells to request mote\n+ ERR_SIXTOP_LIST = 0x28, // the cells reserved to request mote contains slot {0} and slot {1}\n+ ERR_UNSUPPORTED_FORMAT = 0x29, // the received packet format is not supported (code location {0})\n+ ERR_UNSUPPORTED_METADATA = 0x2a, // the metadata type is not suppored\n// l2a\n- ERR_WRONG_CELLTYPE = 0x2c, // wrong celltype {0} at slotOffset {1}\n- ERR_IEEE154_UNSUPPORTED = 0x2d, // unsupported IEEE802.15.4 parameter {1} at location {0}\n- ERR_DESYNCHRONIZED = 0x2e, // got desynchronized at slotOffset {0}\n- ERR_SYNCHRONIZED = 0x2f, // synchronized at slotOffset {0}\n- ERR_LARGE_TIMECORRECTION = 0x30, // large timeCorr.: {0} ticks (code loc. {1})\n- ERR_WRONG_STATE_IN_ENDFRAME_SYNC = 0x31, // wrong state {0} in end of frame+sync\n- ERR_WRONG_STATE_IN_STARTSLOT = 0x32, // wrong state {0} in startSlot, at slotOffset {1}\n- ERR_WRONG_STATE_IN_TIMERFIRES = 0x33, // wrong state {0} in timer fires, at slotOffset {1}\n- ERR_WRONG_STATE_IN_NEWSLOT = 0x34, // wrong state {0} in start of frame, at slotOffset {1}\n- ERR_WRONG_STATE_IN_ENDOFFRAME = 0x35, // wrong state {0} in end of frame, at slotOffset {1}\n- ERR_MAXTXDATAPREPARE_OVERFLOW = 0x36, // maxTxDataPrepare overflows while at state {0} in slotOffset {1}\n- ERR_MAXRXACKPREPARE_OVERFLOWS = 0x37, // maxRxAckPrepapare overflows while at state {0} in slotOffset {1}\n- ERR_MAXRXDATAPREPARE_OVERFLOWS = 0x38, // maxRxDataPrepapre overflows while at state {0} in slotOffset {1}\n- ERR_MAXTXACKPREPARE_OVERFLOWS = 0x39, // maxTxAckPrepapre overflows while at state {0} in slotOffset {1}\n- ERR_WDDATADURATION_OVERFLOWS = 0x3a, // wdDataDuration overflows while at state {0} in slotOffset {1}\n- ERR_WDRADIO_OVERFLOWS = 0x3b, // wdRadio overflows while at state {0} in slotOffset {1}\n- ERR_WDRADIOTX_OVERFLOWS = 0x3c, // wdRadioTx overflows while at state {0} in slotOffset {1}\n- ERR_WDACKDURATION_OVERFLOWS = 0x3d, // wdAckDuration overflows while at state {0} in slotOffset {1}\n- ERR_SECURITY = 0x3e, // security error on frameType {0}, code location {1}\n- ERR_INVALID_PACKET_FROM_RADIO = 0x3f,\n+ ERR_WRONG_CELLTYPE = 0x2b, // wrong celltype {0} at slotOffset {1}\n+ ERR_IEEE154_UNSUPPORTED = 0x2c, // unsupported IEEE802.15.4 parameter {1} at location {0}\n+ ERR_DESYNCHRONIZED = 0x2d, // got desynchronized at slotOffset {0}\n+ ERR_SYNCHRONIZED = 0x2e, // synchronized at slotOffset {0}\n+ ERR_LARGE_TIMECORRECTION = 0x2f, // large timeCorr.: {0} ticks (code loc. {1})\n+ ERR_WRONG_STATE_IN_ENDFRAME_SYNC = 0x30, // wrong state {0} in end of frame+sync\n+ ERR_WRONG_STATE_IN_STARTSLOT = 0x31, // wrong state {0} in startSlot, at slotOffset {1}\n+ ERR_WRONG_STATE_IN_TIMERFIRES = 0x32, // wrong state {0} in timer fires, at slotOffset {1}\n+ ERR_WRONG_STATE_IN_NEWSLOT = 0x33, // wrong state {0} in start of frame, at slotOffset {1}\n+ ERR_WRONG_STATE_IN_ENDOFFRAME = 0x34, // wrong state {0} in end of frame, at slotOffset {1}\n+ ERR_MAXTXDATAPREPARE_OVERFLOW = 0x35, // maxTxDataPrepare overflows while at state {0} in slotOffset {1}\n+ ERR_MAXRXACKPREPARE_OVERFLOWS = 0x36, // maxRxAckPrepapare overflows while at state {0} in slotOffset {1}\n+ ERR_MAXRXDATAPREPARE_OVERFLOWS = 0x37, // maxRxDataPrepapre overflows while at state {0} in slotOffset {1}\n+ ERR_MAXTXACKPREPARE_OVERFLOWS = 0x38, // maxTxAckPrepapre overflows while at state {0} in slotOffset {1}\n+ ERR_WDDATADURATION_OVERFLOWS = 0x39, // wdDataDuration overflows while at state {0} in slotOffset {1}\n+ ERR_WDRADIO_OVERFLOWS = 0x3a, // wdRadio overflows while at state {0} in slotOffset {1}\n+ ERR_WDRADIOTX_OVERFLOWS = 0x3b, // wdRadioTx overflows while at state {0} in slotOffset {1}\n+ ERR_WDACKDURATION_OVERFLOWS = 0x3c, // wdAckDuration overflows while at state {0} in slotOffset {1}\n+ ERR_SECURITY = 0x3d, // security error on frameType {0}, code location {1}\n+ ERR_INVALID_PACKET_FROM_RADIO = 0x3e,\n// drivers\n- ERR_GETDATA_ASKS_TOO_FEW_BYTES = 0x40, // getData asks for too few bytes, maxNumBytes={0}, fill level={1}\n- ERR_WRONG_CRC_INPUT = 0x41, // wrong CRC in input Buffer\n+ ERR_GETDATA_ASKS_TOO_FEW_BYTES = 0x3f, // getData asks for too few bytes, maxNumBytes={0}, fill level={1}\n+ ERR_WRONG_CRC_INPUT = 0x40, // wrong CRC in input Buffer\n// cross layer\n- ERR_BUFFER_OVERFLOW = 0x42, // buffer overflow detected (code location {0})\n- ERR_BUSY_SENDING = 0x43, // busy sending\n- ERR_UNEXPECTED_SENDDONE = 0x44, // sendDone for packet I didn't send\n- ERR_NO_FREE_PACKET_BUFFER = 0x45, // no free packet buffer (code location {0})\n- ERR_NO_FREE_TIMER_OR_QUEUE_ENTRY = 0x46, // no free timer or queue entry (code location {0})\n- ERR_FREEING_UNUSED = 0x47, // freeing unused memory\n- ERR_FREEING_ERROR = 0x48, // freeing memory unsupported memory\n- ERR_MSG_UNKNOWN_TYPE = 0x49, // unknown message type {0}\n- ERR_WRONG_ADDR_TYPE = 0x4a, // wrong address type {0} (code location {1})\n- ERR_PACKET_TOO_LONG = 0x4b, // total packet size is too long, length {1} (code location {0})\n- ERR_INPUTBUFFER_LENGTH = 0x4c, // input length problem, length={0}\n- ERR_BOOTED = 0x4d, // booted\n- ERR_MAXRETRIES_REACHED = 0x4e, // maxretries reached (counter: {0})\n- ERR_EMPTY_QUEUE_OR_UNKNOWN_TIMER = 0x4f, // empty queue or trying to remove unknown timer id (code location {0})\n- ERR_PUSH_LOWER_LAYER = 0x50, // failed to push to lower layer\n+ ERR_BUFFER_OVERFLOW = 0x41, // buffer overflow detected (code location {0})\n+ ERR_BUSY_SENDING = 0x42, // busy sending\n+ ERR_UNEXPECTED_SENDDONE = 0x43, // sendDone for packet I didn't send\n+ ERR_NO_FREE_PACKET_BUFFER = 0x44, // no free packet buffer (code location {0})\n+ ERR_NO_FREE_TIMER_OR_QUEUE_ENTRY = 0x45, // no free timer or queue entry (code location {0})\n+ ERR_FREEING_UNUSED = 0x46, // freeing unused memory\n+ ERR_FREEING_ERROR = 0x47, // freeing memory unsupported memory\n+ ERR_MSG_UNKNOWN_TYPE = 0x48, // unknown message type {0}\n+ ERR_WRONG_ADDR_TYPE = 0x49, // wrong address type {0} (code location {1})\n+ ERR_PACKET_TOO_LONG = 0x4a, // total packet size is too long, length {1} (code location {0})\n+ ERR_INPUTBUFFER_LENGTH = 0x4b, // input length problem, length={0}\n+ ERR_BOOTED = 0x4c, // booted\n+ ERR_MAXRETRIES_REACHED = 0x4d, // maxretries reached (counter: {0})\n+ ERR_EMPTY_QUEUE_OR_UNKNOWN_TIMER = 0x4e, // empty queue or trying to remove unknown timer id (code location {0})\n+ ERR_PUSH_LOWER_LAYER = 0x4f, // failed to push to lower layer\n+ ERR_INVALID_PARAM = 0x50, // received an invalid parameter\n};\n//=========================== typedef =========================================\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/03b-IPv6/icmpv6rpl.c",
"new_path": "openstack/03b-IPv6/icmpv6rpl.c",
"diff": "@@ -370,8 +370,7 @@ void icmpv6rpl_updateMyDAGrankAndParentSelection(void) {\n// if I'm a DAGroot, my DAGrank is always MINHOPRANKINCREASE\nif ((idmanager_getIsDAGroot()) == TRUE) {\n// the dagrank is not set through setting command, set rank to MINHOPRANKINCREASE here\n- if (icmpv6rpl_vars.myDAGrank !=\n- MINHOPRANKINCREASE) { // test for change so as not to report unchanged value when root\n+ if (icmpv6rpl_vars.myDAGrank != MINHOPRANKINCREASE) { // test for change so as not to report unchanged value when root\nicmpv6rpl_vars.myDAGrank = MINHOPRANKINCREASE;\nreturn;\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/cross-layers/idmanager.c",
"new_path": "openstack/cross-layers/idmanager.c",
"diff": "@@ -149,8 +149,8 @@ owerror_t idmanager_setMyID(open_addr_t *newID) {\n(errorparameter_t) 1);\nENABLE_INTERRUPTS();\nreturn E_FAIL;\n- ENABLE_INTERRUPTS();\n}\n+ ENABLE_INTERRUPTS();\nreturn E_SUCCESS;\n}\n@@ -231,6 +231,9 @@ void idmanager_triggerAboutRoot(void) {\nidmanager_vars.slotSkip = FALSE;\n}\nbreak;\n+ default:\n+ LOG_ERROR(COMPONENT_IDMANAGER, ERR_INVALID_PARAM, (errorparameter_t)0, (errorparameter_t)0);\n+ return;\n}\n// store prefix (bytes 1-8)\n@@ -249,8 +252,6 @@ void idmanager_triggerAboutRoot(void) {\nkeyValue = &input_buffer[10];\nIEEE802154_security_setBeaconKey(keyIndex, keyValue);\nIEEE802154_security_setDataKey(keyIndex, keyValue);\n-\n- return;\n}\nvoid idmanager_setJoinKey(uint8_t *key) {\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-867. Bug fix for ENABLE_INTERRUPTS
|
491,587 |
11.06.2020 18:58:12
| -7,200 |
0d42c1f7af6f2335e104cd5d806300a424c00026
|
Add space optimization flags
|
[
{
"change_type": "MODIFY",
"old_path": "SConscript",
"new_path": "SConscript",
"diff": "@@ -266,6 +266,8 @@ elif env['toolchain'] == 'armgcc':\nenv.Append(CCFLAGS='-Wall')\nenv.Append(CCFLAGS='-Wa,-adhlns=${TARGET.base}.lst')\nenv.Append(CCFLAGS='-c')\n+ env.Append(CCFLAGS='-ffunction-sections')\n+ env.Append(CCFLAGS='-fdata-sections')\nenv.Append(CCFLAGS='-fmessage-length=0')\nenv.Append(CCFLAGS='-mcpu=cortex-m3')\nenv.Append(CCFLAGS='-mthumb')\n@@ -286,6 +288,7 @@ elif env['toolchain'] == 'armgcc':\nenv.Append(LINKFLAGS='-specs=nosys.specs')\nenv.Append(LINKFLAGS='-specs=nano.specs')\nenv.Append(LINKFLAGS='-Wl,-Map,${TARGET.base}.map')\n+ env.Append(LINKFLAGS='-Wl,--gc-sections')\nenv.Append(LINKFLAGS='-mcpu=cortex-m3')\nenv.Append(LINKFLAGS='-mthumb')\nenv.Append(LINKFLAGS='-g3')\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-867. Add space optimization flags
|
491,595 |
12.06.2020 14:39:34
| -7,200 |
a323b73661f6f654d44bbd7879fa7f6a016d6aaf
|
delay required on SCuM side when configure to listen. So add delay on OpenMote-b side as well.
|
[
{
"change_type": "MODIFY",
"old_path": "projects/common/01bsp_continuously_cal/01bsp_continuously_cal.c",
"new_path": "projects/common/01bsp_continuously_cal/01bsp_continuously_cal.c",
"diff": "@@ -31,7 +31,7 @@ corresponding to the incoming frame.\n#define LENGTH_PACKET 3+LENGTH_CRC // maximum length is 127 bytes\n#define MAX_PKT_LEN 125+LENGTH_CRC\n#define CHANNEL 11 // 24ghz: 11 = 2.405GHz, subghz: 11 = 865.325 in FSK operating mode #1\n-#define BEACON_PERIOD 20 // in seconds\n+#define BEACON_PERIOD 5 // in seconds\n#define TICKS_IN_ONE_SECOND 32768 // (32768>>1) = 500ms @ 32kHz\n#define RX_TIMEOUT 10 // 10 = 300us @ 32kHz\n@@ -65,6 +65,8 @@ void cb_startFrame(PORT_TIMER_WIDTH timestamp);\nvoid cb_endFrame(PORT_TIMER_WIDTH timestamp);\nvoid send_frame(uint8_t data);\n+void delay(void);\n+\n//=========================== main ============================================\n/**\n@@ -159,6 +161,7 @@ int mote_main(void) {\nboard_sleep();\n} else {\nfreq_offset = radio_getFrequencyOffset();\n+ delay();\nsend_frame(freq_offset);\napp_vars.txack_started = 1;\n}\n@@ -272,3 +275,10 @@ void send_frame(uint8_t data) {\nradio_txEnable();\nradio_txNow();\n}\n+\n+// 0x0cff indicates rougly 2.3ms running on OpenMote-B\n+\n+void delay(void) {\n+ uint16_t i;\n+ for (i=0;i<0x0cff;i++);\n+}\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-876. delay required on SCuM side when configure to listen. So add delay on OpenMote-b side as well.
|
491,595 |
12.06.2020 16:15:59
| -7,200 |
6d56f72ec465fac58a157e551f4bea21e1aff1bd
|
add sensor reset callback after sent ack frame.
|
[
{
"change_type": "MODIFY",
"old_path": "bsp/boards/openmote-b-24ghz/sensors.c",
"new_path": "bsp/boards/openmote-b-24ghz/sensors.c",
"diff": "@@ -88,3 +88,9 @@ callbackConvert_cbt sensors_getCallbackConvert(uint8_t sensorType) {\n}\n//=========================== private =========================================\n+\n+callbackReset_cbt sensors_getCallbackReset(void) {\n+\n+ return &si70x_reset;\n+\n+}\n\\ No newline at end of file\n"
},
{
"change_type": "MODIFY",
"old_path": "bsp/boards/sensors.h",
"new_path": "bsp/boards/sensors.h",
"diff": "@@ -37,6 +37,8 @@ typedef uint16_t (*callbackRead_cbt)(void);\ntypedef float (*callbackConvert_cbt)(uint16_t value);\n+typedef void (*callbackReset_cbt)(void);\n+\ntypedef struct {\nuint8_t sensorsTypes[SENSOR_LAST];\n} sensors_vars_t;\n@@ -49,5 +51,6 @@ void sensors_init(void);\nbool sensors_is_present(uint8_t sensorType);\ncallbackRead_cbt sensors_getCallbackRead(uint8_t sensorType);\ncallbackConvert_cbt sensors_getCallbackConvert(uint8_t sensorType);\n+callbackReset_cbt sensors_getCallbackReset(void);\n#endif // __SENSORS_H__\n"
},
{
"change_type": "MODIFY",
"old_path": "projects/common/01bsp_continuously_cal/01bsp_continuously_cal.c",
"new_path": "projects/common/01bsp_continuously_cal/01bsp_continuously_cal.c",
"diff": "@@ -30,8 +30,8 @@ corresponding to the incoming frame.\n#define LENGTH_PACKET 3+LENGTH_CRC // maximum length is 127 bytes\n#define MAX_PKT_LEN 125+LENGTH_CRC\n-#define CHANNEL 11 // 24ghz: 11 = 2.405GHz, subghz: 11 = 865.325 in FSK operating mode #1\n-#define BEACON_PERIOD 5 // in seconds\n+#define CHANNEL 12 // 24ghz: 11 = 2.405GHz, subghz: 11 = 865.325 in FSK operating mode #1\n+#define BEACON_PERIOD 20 // in seconds\n#define TICKS_IN_ONE_SECOND 32768 // (32768>>1) = 500ms @ 32kHz\n#define RX_TIMEOUT 10 // 10 = 300us @ 32kHz\n@@ -155,6 +155,8 @@ int mote_main(void) {\napp_vars.txack_started = 0;\napp_vars.state = S_LISTEN_PROBE;\n+\n+ sensors_getCallbackReset();\n} else {\nif (app_vars.txack_started == 1) {\n@@ -280,5 +282,5 @@ void send_frame(uint8_t data) {\nvoid delay(void) {\nuint16_t i;\n- for (i=0;i<0x0cff;i++);\n+ for (i=0;i<0xaaff;i++);\n}\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-876. add sensor reset callback after sent ack frame.
|
491,595 |
14.06.2020 23:56:33
| -7,200 |
b15e69331debeac3a2d0905b1b731a3cc936fe4d
|
only read temperature in ack.
|
[
{
"change_type": "MODIFY",
"old_path": "projects/common/01bsp_continuously_cal/01bsp_continuously_cal.c",
"new_path": "projects/common/01bsp_continuously_cal/01bsp_continuously_cal.c",
"diff": "@@ -30,7 +30,7 @@ corresponding to the incoming frame.\n#define LENGTH_PACKET 3+LENGTH_CRC // maximum length is 127 bytes\n#define MAX_PKT_LEN 125+LENGTH_CRC\n-#define CHANNEL 12 // 24ghz: 11 = 2.405GHz, subghz: 11 = 865.325 in FSK operating mode #1\n+#define CHANNEL 11 // 24ghz: 11 = 2.405GHz, subghz: 11 = 865.325 in FSK operating mode #1\n#define BEACON_PERIOD 20 // in seconds\n#define TICKS_IN_ONE_SECOND 32768 // (32768>>1) = 500ms @ 32kHz\n#define RX_TIMEOUT 10 // 10 = 300us @ 32kHz\n@@ -262,7 +262,9 @@ void send_frame(uint8_t data) {\n// prepare packet\napp_vars.txpk_len = sizeof(app_vars.txpk_buf);\n- // calculate the temperature\n+ // calculate the temperature only when replying ack\n+ if (app_vars.state == S_REPLY_ACK) {\n+\nread = app_vars.read_temperature();\nresult = -46.85;\nresult += 175.72 * read / 65536;\n@@ -270,6 +272,10 @@ void send_frame(uint8_t data) {\napp_vars.txpk_buf[0] = (uint8_t)((temperature & 0xff00)>>8);\napp_vars.txpk_buf[1] = (uint8_t)(temperature & 0x00ff);\n+ }\n+\n+ // app_vars.txpk_buf[0] = (uint8_t)((temperature & 0xff00)>>8);\n+ // app_vars.txpk_buf[1] = (uint8_t)(temperature & 0x00ff);\napp_vars.txpk_buf[2] = data;\n// send packet\n@@ -282,5 +288,5 @@ void send_frame(uint8_t data) {\nvoid delay(void) {\nuint16_t i;\n- for (i=0;i<0xaaff;i++);\n+ for (i=0;i<0x70ff;i++);\n}\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-876. only read temperature in ack.
|
491,595 |
16.06.2020 20:16:25
| -7,200 |
abeb43e4a21050bdfc9d2dee29db8995b89e4683
|
schedule the ack according to payload of incoming frame (probe).
|
[
{
"change_type": "MODIFY",
"old_path": "projects/common/01bsp_continuously_cal/01bsp_continuously_cal.c",
"new_path": "projects/common/01bsp_continuously_cal/01bsp_continuously_cal.c",
"diff": "@@ -33,7 +33,9 @@ corresponding to the incoming frame.\n#define CHANNEL 11 // 24ghz: 11 = 2.405GHz, subghz: 11 = 865.325 in FSK operating mode #1\n#define BEACON_PERIOD 20 // in seconds\n#define TICKS_IN_ONE_SECOND 32768 // (32768>>1) = 500ms @ 32kHz\n+#define TICKS_IN_ONE_MS 33 // (32768>>1) = 500ms @ 32kHz\n#define RX_TIMEOUT 10 // 10 = 300us @ 32kHz\n+#define DELAY_TX 20 // 20 = 605us @ 32kHz\n//=========================== variables =======================================\n@@ -54,6 +56,9 @@ typedef struct {\nuint8_t txpk_len;\napp_state_t state;\ncallbackRead_cbt read_temperature;\n+\n+ uint8_t schedule_ack;\n+ uint8_t ok_to_send_ack;\n} app_vars_t;\napp_vars_t app_vars;\n@@ -63,7 +68,7 @@ app_vars_t app_vars;\nvoid cb_scTimerCompare(void);\nvoid cb_startFrame(PORT_TIMER_WIDTH timestamp);\nvoid cb_endFrame(PORT_TIMER_WIDTH timestamp);\n-void send_frame(uint8_t data);\n+void prepare_frame(uint8_t data);\nvoid delay(void);\n@@ -120,7 +125,8 @@ int mote_main(void) {\n// led\nleds_error_toggle();\n- send_frame(app_vars.time_in_second);\n+ prepare_frame(app_vars.time_in_second);\n+ radio_txNow();\n} else {\nboard_sleep();\n}\n@@ -163,8 +169,9 @@ int mote_main(void) {\nboard_sleep();\n} else {\nfreq_offset = radio_getFrequencyOffset();\n- delay();\n- send_frame(freq_offset);\n+ prepare_frame(freq_offset);\n+ while(app_vars.ok_to_send_ack==0);\n+ radio_txNow();\napp_vars.txack_started = 1;\n}\n}\n@@ -182,11 +189,18 @@ void cb_scTimerCompare(void) {\napp_vars.time_in_second++;\nsctimer_setCompare(sctimer_readCounter()+ TICKS_IN_ONE_SECOND);\n} else {\n- // todo\n+ if (\n+ app_vars.state == S_REPLY_ACK &&\n+ app_vars.schedule_ack == 1\n+ ) {\n+ app_vars.schedule_ack = 0;\n+ app_vars.ok_to_send_ack = 1;\n+ } else {\napp_vars.rx_timeout = 1;\n}\n}\n+}\nvoid cb_startFrame(PORT_TIMER_WIDTH timestamp) {\n@@ -228,13 +242,16 @@ void cb_endFrame(PORT_TIMER_WIDTH timestamp) {\nif (\ncrc &&\npkt_len==LENGTH_PACKET &&\n- packet[0]=='S' &&\n- packet[1]=='C' &&\n- packet[2]=='M'\n+ packet[0]=='C' &&\n+ packet[1]=='F'\n) {\nsctimer_disable();\napp_vars.rxpk_rxDone = 1;\n+\n+ app_vars.schedule_ack = 1;\n+ app_vars.ok_to_send_ack = 0;\n+ sctimer_setCompare(timestamp+((uint16_t)packet[2])*TICKS_IN_ONE_MS-DELAY_TX);\n}\n} else {\n@@ -252,7 +269,7 @@ void cb_endFrame(PORT_TIMER_WIDTH timestamp) {\n// ========================== private =========================================\n-void send_frame(uint8_t data) {\n+void prepare_frame(uint8_t data) {\nuint16_t temperature;\nuint16_t read;\n@@ -281,7 +298,6 @@ void send_frame(uint8_t data) {\n// send packet\nradio_loadPacket(app_vars.txpk_buf,app_vars.txpk_len);\nradio_txEnable();\n- radio_txNow();\n}\n// 0x0cff indicates rougly 2.3ms running on OpenMote-B\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-876. schedule the ack according to payload of incoming frame (probe).
|
491,587 |
15.06.2020 17:03:53
| -7,200 |
e8cbd8e2e0ed2dfaf47ceae3a2d9d813a7d58e97
|
Bug fix: Information Element parsing
|
[
{
"change_type": "MODIFY",
"old_path": "openstack/02a-MAClow/IEEE802154.c",
"new_path": "openstack/02a-MAClow/IEEE802154.c",
"diff": "@@ -422,17 +422,27 @@ void ieee802154_retrieveHeader(OpenQueueEntry_t *msg,\n// Record the position where we should start decrypting the ACK, if security is enabled\nmsg->l2_payload = &msg->payload[ieee802514_header->headerLength];\nbreak;\n- default:\n- break;\n+ default: // this is not a IE header or payload, reset the header length and return.\n+ ieee802514_header->headerLength -= 2;\n+ msg->l2_payload = &msg->payload[ieee802514_header->headerLength];\n+ ieee802514_header->valid = TRUE;\n+ return;\n}\n}\n+ else{\n+ ieee802514_header->headerLength -= 2;\n+ ieee802514_header->valid = TRUE;\n+ break;\n+ }\nif (ieee802514_header->headerLength == msg->length) {\n// nothing left, no payloadIE, no payload, this is the end of packet!\nieee802514_header->valid = TRUE;\nreturn;\n}\n- if (ieee802514_header->headerLength > msg->length) { return; } // no more to read!\n+ if (ieee802514_header->headerLength > msg->length) {\n+ return;\n+ } // no more to read!\n}\n}\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-867. Bug fix: Information Element parsing
|
491,587 |
16.06.2020 09:22:06
| -7,200 |
fac40813059819728130ffc27afa22a7a982307a
|
Add logging to MSF
|
[
{
"change_type": "MODIFY",
"old_path": "inc/config.h",
"new_path": "inc/config.h",
"diff": "* Allow the MSF algorithm to dynamically remove and allocate slots, based on the traffic load in the network.\n*\n*/\n-// #define OPENWSN_ADAPTIVE_MSF\n+#define OPENWSN_ADAPTIVE_MSF\n/**\n*\n* Enables the icmpv6 echo (ping) functionality\n*/\n-// #define OPENWSN_ICMPV6ECHO_C\n+#define OPENWSN_ICMPV6ECHO_C\n/**\n* cannot be combined with the python board.\n*\n*/\n-// #define BOARD_CRYPTOENGINE_ENABLED\n+#define BOARD_CRYPTOENGINE_ENABLED\n/**\n* \\def BOARD_OPENSERIAL_PRINTF\n"
},
{
"change_type": "MODIFY",
"old_path": "inc/opendefs.h",
"new_path": "inc/opendefs.h",
"diff": "@@ -152,38 +152,39 @@ enum {\nCOMPONENT_NEIGHBORS = 0x0d,\nCOMPONENT_SCHEDULE = 0x0e,\nCOMPONENT_SIXTOP_RES = 0x0f,\n+ COMPONENT_MSF = 0x10,\n//IPHC\n- COMPONENT_OPENBRIDGE = 0x10,\n- COMPONENT_IPHC = 0x11,\n- COMPONENT_FRAG = 0x12,\n+ COMPONENT_OPENBRIDGE = 0x11,\n+ COMPONENT_IPHC = 0x12,\n+ COMPONENT_FRAG = 0x13,\n//IPv6\n- COMPONENT_FORWARDING = 0x13,\n- COMPONENT_ICMPv6 = 0x14,\n- COMPONENT_ICMPv6ECHO = 0x15,\n- COMPONENT_ICMPv6ROUTER = 0x16,\n- COMPONENT_ICMPv6RPL = 0x17,\n+ COMPONENT_FORWARDING = 0x14,\n+ COMPONENT_ICMPv6 = 0x15,\n+ COMPONENT_ICMPv6ECHO = 0x16,\n+ COMPONENT_ICMPv6ROUTER = 0x17,\n+ COMPONENT_ICMPv6RPL = 0x18,\n//TRAN\n- COMPONENT_OPENUDP = 0x18,\n- COMPONENT_OPENCOAP = 0x19,\n+ COMPONENT_OPENUDP = 0x19,\n+ COMPONENT_OPENCOAP = 0x1a,\n// secure join\n- COMPONENT_CJOIN = 0x1a,\n- COMPONENT_OSCORE = 0x1b,\n+ COMPONENT_CJOIN = 0x1b,\n+ COMPONENT_OSCORE = 0x1c,\n// applications\n- COMPONENT_C6T = 0x1c,\n- COMPONENT_CEXAMPLE = 0x1d,\n- COMPONENT_CINFO = 0x1e,\n- COMPONENT_CLEDS = 0x1f,\n- COMPONENT_CSENSORS = 0x20,\n- COMPONENT_CSTORM = 0x21,\n- COMPONENT_CWELLKNOWN = 0x22,\n- COMPONENT_UECHO = 0x23,\n- COMPONENT_UINJECT = 0x24,\n- COMPONENT_RRT = 0x25,\n- COMPONENT_SECURITY = 0x26,\n- COMPONENT_USERIALBRIDGE = 0x27,\n- COMPONENT_UEXPIRATION = 0x28,\n- COMPONENT_UMONITOR = 0x29,\n- COMPONENT_CINFRARED = 0x2a,\n+ COMPONENT_C6T = 0x1d,\n+ COMPONENT_CEXAMPLE = 0x1e,\n+ COMPONENT_CINFO = 0x1f,\n+ COMPONENT_CLEDS = 0x20,\n+ COMPONENT_CSENSORS = 0x21,\n+ COMPONENT_CSTORM = 0x22,\n+ COMPONENT_CWELLKNOWN = 0x23,\n+ COMPONENT_UECHO = 0x24,\n+ COMPONENT_UINJECT = 0x25,\n+ COMPONENT_RRT = 0x26,\n+ COMPONENT_SECURITY = 0x27,\n+ COMPONENT_USERIALBRIDGE = 0x28,\n+ COMPONENT_UEXPIRATION = 0x29,\n+ COMPONENT_UMONITOR = 0x2a,\n+ COMPONENT_CINFRARED = 0x2b,\n};\n/**\n@@ -239,30 +240,32 @@ enum {\nERR_SIXTOP_LIST = 0x28, // the cells reserved to request mote contains slot {0} and slot {1}\nERR_UNSUPPORTED_FORMAT = 0x29, // the received packet format is not supported (code location {0})\nERR_UNSUPPORTED_METADATA = 0x2a, // the metadata type is not suppored\n+ ERR_TX_CELL_USAGE = 0x2b, // TX cell usage during last period: {}\n+ ERR_RX_CELL_USAGE = 0x2c, // RX cell usage during last period: {}\n// l2a\n- ERR_WRONG_CELLTYPE = 0x2b, // wrong celltype {0} at slotOffset {1}\n- ERR_IEEE154_UNSUPPORTED = 0x2c, // unsupported IEEE802.15.4 parameter {1} at location {0}\n- ERR_DESYNCHRONIZED = 0x2d, // got desynchronized at slotOffset {0}\n- ERR_SYNCHRONIZED = 0x2e, // synchronized at slotOffset {0}\n- ERR_LARGE_TIMECORRECTION = 0x2f, // large timeCorr.: {0} ticks (code loc. {1})\n- ERR_WRONG_STATE_IN_ENDFRAME_SYNC = 0x30, // wrong state {0} in end of frame+sync\n- ERR_WRONG_STATE_IN_STARTSLOT = 0x31, // wrong state {0} in startSlot, at slotOffset {1}\n- ERR_WRONG_STATE_IN_TIMERFIRES = 0x32, // wrong state {0} in timer fires, at slotOffset {1}\n- ERR_WRONG_STATE_IN_NEWSLOT = 0x33, // wrong state {0} in start of frame, at slotOffset {1}\n- ERR_WRONG_STATE_IN_ENDOFFRAME = 0x34, // wrong state {0} in end of frame, at slotOffset {1}\n- ERR_MAXTXDATAPREPARE_OVERFLOW = 0x35, // maxTxDataPrepare overflows while at state {0} in slotOffset {1}\n- ERR_MAXRXACKPREPARE_OVERFLOWS = 0x36, // maxRxAckPrepapare overflows while at state {0} in slotOffset {1}\n- ERR_MAXRXDATAPREPARE_OVERFLOWS = 0x37, // maxRxDataPrepapre overflows while at state {0} in slotOffset {1}\n- ERR_MAXTXACKPREPARE_OVERFLOWS = 0x38, // maxTxAckPrepapre overflows while at state {0} in slotOffset {1}\n- ERR_WDDATADURATION_OVERFLOWS = 0x39, // wdDataDuration overflows while at state {0} in slotOffset {1}\n- ERR_WDRADIO_OVERFLOWS = 0x3a, // wdRadio overflows while at state {0} in slotOffset {1}\n- ERR_WDRADIOTX_OVERFLOWS = 0x3b, // wdRadioTx overflows while at state {0} in slotOffset {1}\n- ERR_WDACKDURATION_OVERFLOWS = 0x3c, // wdAckDuration overflows while at state {0} in slotOffset {1}\n- ERR_SECURITY = 0x3d, // security error on frameType {0}, code location {1}\n- ERR_INVALID_PACKET_FROM_RADIO = 0x3e,\n+ ERR_WRONG_CELLTYPE = 0x2d, // wrong celltype {0} at slotOffset {1}\n+ ERR_IEEE154_UNSUPPORTED = 0x2e, // unsupported IEEE802.15.4 parameter {1} at location {0}\n+ ERR_DESYNCHRONIZED = 0x2f, // got desynchronized at slotOffset {0}\n+ ERR_SYNCHRONIZED = 0x30, // synchronized at slotOffset {0}\n+ ERR_LARGE_TIMECORRECTION = 0x31, // large timeCorr.: {0} ticks (code loc. {1})\n+ ERR_WRONG_STATE_IN_ENDFRAME_SYNC = 0x32, // wrong state {0} in end of frame+sync\n+ ERR_WRONG_STATE_IN_STARTSLOT = 0x33, // wrong state {0} in startSlot, at slotOffset {1}\n+ ERR_WRONG_STATE_IN_TIMERFIRES = 0x34, // wrong state {0} in timer fires, at slotOffset {1}\n+ ERR_WRONG_STATE_IN_NEWSLOT = 0x35, // wrong state {0} in start of frame, at slotOffset {1}\n+ ERR_WRONG_STATE_IN_ENDOFFRAME = 0x36, // wrong state {0} in end of frame, at slotOffset {1}\n+ ERR_MAXTXDATAPREPARE_OVERFLOW = 0x37, // maxTxDataPrepare overflows while at state {0} in slotOffset {1}\n+ ERR_MAXRXACKPREPARE_OVERFLOWS = 0x38, // maxRxAckPrepapare overflows while at state {0} in slotOffset {1}\n+ ERR_MAXRXDATAPREPARE_OVERFLOWS = 0x39, // maxRxDataPrepapre overflows while at state {0} in slotOffset {1}\n+ ERR_MAXTXACKPREPARE_OVERFLOWS = 0x3a, // maxTxAckPrepapre overflows while at state {0} in slotOffset {1}\n+ ERR_WDDATADURATION_OVERFLOWS = 0x3b, // wdDataDuration overflows while at state {0} in slotOffset {1}\n+ ERR_WDRADIO_OVERFLOWS = 0x3c, // wdRadio overflows while at state {0} in slotOffset {1}\n+ ERR_WDRADIOTX_OVERFLOWS = 0x3d, // wdRadioTx overflows while at state {0} in slotOffset {1}\n+ ERR_WDACKDURATION_OVERFLOWS = 0x3e, // wdAckDuration overflows while at state {0} in slotOffset {1}\n+ ERR_SECURITY = 0x3f, // security error on frameType {0}, code location {1}\n+ ERR_INVALID_PACKET_FROM_RADIO = 0x40, // invalid packet from radio\n// drivers\n- ERR_GETDATA_ASKS_TOO_FEW_BYTES = 0x3f, // getData asks for too few bytes, maxNumBytes={0}, fill level={1}\n- ERR_WRONG_CRC_INPUT = 0x40, // wrong CRC in input Buffer\n+ ERR_GETDATA_ASKS_TOO_FEW_BYTES = 0x41, // getData asks for too few bytes, maxNumBytes={0}, fill level={1}\n+ ERR_WRONG_CRC_INPUT = 0x42, // wrong CRC in input Buffer\n// cross layer\nERR_BUFFER_OVERFLOW = 0x43, // buffer overflow detected (code location {0})\nERR_BUSY_SENDING = 0x44, // busy sending\n"
},
{
"change_type": "MODIFY",
"old_path": "openstack/02b-MAChigh/msf.c",
"new_path": "openstack/02b-MAChigh/msf.c",
"diff": "@@ -102,10 +102,10 @@ void msf_updateCellsElapsed(open_addr_t *neighbor, cellType_t type) {\nreturn;\n}\n- // addapt to upward traffic\n-\n+ // adapt to upward traffic\nif (msf_vars.numCellsElapsed_tx == MAX_NUMCELLS) {\n+ LOG_VERBOSE(COMPONENT_MSF, ERR_TX_CELL_USAGE, msf_vars.numCellsUsed_tx, 0);\nmsf_vars.needAddTx = FALSE;\nmsf_vars.needDeleteTx = FALSE;\n@@ -127,15 +127,14 @@ void msf_updateCellsElapsed(open_addr_t *neighbor, cellType_t type) {\n}\n// adapt to downward traffic when there are negotiated Tx cells in schedule\n-\nif (schedule_getNumberOfNegotiatedCells(neighbor, CELLTYPE_TX) == 0) {\nreturn;\n}\n// adapt to downward traffic\n-\nif (msf_vars.numCellsElapsed_rx == MAX_NUMCELLS) {\n+ LOG_VERBOSE(COMPONENT_MSF, ERR_RX_CELL_USAGE, msf_vars.numCellsUsed_rx, 0);\nmsf_vars.needAddRx = FALSE;\nmsf_vars.needDeleteRx = FALSE;\n@@ -194,10 +193,7 @@ metadata_t msf_translateMetadata(void) {\nvoid msf_handleRCError(uint8_t code, open_addr_t *address) {\nuint16_t waitDuration;\n- if (\n- code == IANA_6TOP_RC_RESET ||\n- code == IANA_6TOP_RC_LOCKED\n- ) {\n+ if (code == IANA_6TOP_RC_RESET || code == IANA_6TOP_RC_LOCKED) {\n// waitretry\nmsf_vars.waitretry = TRUE;\nwaitDuration = WAITDURATION_MIN + openrandom_get16b() % WAITDURATION_RANDOM_RANGE;\n@@ -210,18 +206,11 @@ void msf_handleRCError(uint8_t code, open_addr_t *address) {\n);\n}\n- if (\n- code == IANA_6TOP_RC_ERROR ||\n- code == IANA_6TOP_RC_VER_ERR ||\n- code == IANA_6TOP_RC_SFID_ERR\n- ) {\n+ if (code == IANA_6TOP_RC_ERROR || code == IANA_6TOP_RC_VER_ERR || code == IANA_6TOP_RC_SFID_ERR) {\n// quarantine\n}\n- if (\n- code == IANA_6TOP_RC_SEQNUM_ERR ||\n- code == IANA_6TOP_RC_CELLLIST_ERR\n- ) {\n+ if (code == IANA_6TOP_RC_SEQNUM_ERR || code == IANA_6TOP_RC_CELLLIST_ERR) {\n// clear\nscheduler_push_task(msf_timer_clear_task, TASKPRIO_MSF);\n}\n@@ -298,7 +287,6 @@ void msf_trigger6pAdd(void) {\n}\n// get preferred parent\n-\nfoundNeighbor = icmpv6rpl_getPreferredParentEui64(&neighbor);\nif (foundNeighbor == FALSE) {\nreturn;\n@@ -364,7 +352,6 @@ void msf_trigger6pDelete(void) {\n}\n// check what type of cell need to delete\n-\nif (msf_vars.needDeleteTx) {\ncellOptions = CELLOPTIONS_TX;\n} else {\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-867. Add logging to MSF
|
491,587 |
25.06.2020 14:10:33
| -7,200 |
7e1c11008e9442b149d6287b7e8e724080cf8878
|
Fix macpong project
|
[
{
"change_type": "MODIFY",
"old_path": "SConscript",
"new_path": "SConscript",
"diff": "@@ -98,7 +98,10 @@ if env['toolchain'] == 'mspgcc':\n# compiler\nenv.Replace(CC='msp430-gcc')\nenv.Append(CCFLAGS='-Wstrict-prototypes')\n+ env.Append(CCFLAGS='-ffunction-sections')\n+ env.Append(CCFLAGS='-fdata-sections')\nenv.Append(CCFLAGS='')\n+\n# archiver\nenv.Replace(AR='msp430-ar')\nenv.Append(ARFLAGS='')\n@@ -109,24 +112,15 @@ if env['toolchain'] == 'mspgcc':\nenv.Append(LINKFLAGS='')\n# convert ELF to iHex\n- elf2iHexFunc = Builder(\n- action='msp430-objcopy --output-target=ihex $SOURCE $TARGET',\n- suffix='.ihex',\n- )\n+ elf2iHexFunc = Builder(action='msp430-objcopy --output-target=ihex $SOURCE $TARGET', suffix='.ihex')\nenv.Append(BUILDERS={'Elf2iHex': elf2iHexFunc})\n# convert ELF to bin\n- elf2BinFunc = Builder(\n- action='msp430-objcopy --output-target=binary $SOURCE $TARGET',\n- suffix='.bin',\n- )\n+ elf2BinFunc = Builder(action='msp430-objcopy --output-target=binary $SOURCE $TARGET', suffix='.bin')\nenv.Append(BUILDERS={'Elf2iBin': elf2BinFunc})\n# print sizes\n- printSizeFunc = Builder(\n- action='msp430-size $SOURCE',\n- suffix='.phonysize',\n- )\n+ printSizeFunc = Builder(action='msp430-size $SOURCE', suffix='.phonysize')\nenv.Append(BUILDERS={'PrintSize': printSizeFunc})\nelif env['toolchain'] == 'iar':\n@@ -163,10 +157,12 @@ elif env['toolchain'] == 'iar':\nenv.Replace(INCPREFIX='-I ')\nenv.Replace(CCCOM='$CC $SOURCES -o $TARGET $CFLAGS $CCFLAGS $_CCCOMCOM')\nenv.Replace(RANLIBCOM='')\n+\n# archiver\nenv.Replace(AR='\"' + os.path.join(iarEw430BinDir, 'xar') + '\"')\nenv.Replace(ARCOM='$AR $SOURCES -o $TARGET')\nenv.Append(ARFLAGS='')\n+\n# linker\nenv.Replace(LINK='\"' + os.path.join(iarEw430BinDir, 'xlink') + '\"')\nenv.Replace(PROGSUFFIX='.exe')\n@@ -186,23 +182,15 @@ elif env['toolchain'] == 'iar':\nenv.Append(LINKFLAGS='-Ointel-standard')\nenv.Replace(LINKCOM='$LINK $SOURCES -o $TARGET $LINKFLAGS $__RPATH $_LIBDIRFLAGS $_LIBFLAGS')\n-\n# converts ELF to iHex\ndef change_ext_function(target, source, env):\nbase_name = str(target[0]).split('.')[0]\nfrom_extension = '.a43'\nto_extension = '.ihex'\nprint 'change extension {0} {1}->{2}'.format(base_name, from_extension, to_extension)\n- os.rename(\n- base_name + from_extension,\n- base_name + to_extension,\n- )\n-\n+ os.rename(base_name + from_extension,base_name + to_extension)\n- change_ext_builder = Builder(\n- action=change_ext_function,\n- suffix='.ihex'\n- )\n+ change_ext_builder = Builder(action=change_ext_function,suffix='.ihex')\nenv.Append(BUILDERS={'Elf2iHex': change_ext_builder})\n# convert ELF to bin\n@@ -229,11 +217,7 @@ elif env['toolchain'] == 'iar-proj':\nExit(-1)\niar_proj_builder_func = Builder(\n- action='\"{0}\" $SOURCE Debug'.format(\n- os.path.join(iarEw430CommonBinDir, 'IarBuild')\n- ),\n- src_suffix='.ewp',\n- )\n+ action='\"{0}\" $SOURCE Debug'.format(os.path.join(iarEw430CommonBinDir, 'IarBuild')),src_suffix='.ewp')\nenv.Append(BUILDERS={'iarProjBuilder': iar_proj_builder_func})\n# converts ELF to iHex\n@@ -1086,12 +1070,12 @@ env.AddMethod(extras, 'PostBuildExtras')\n# ============================ helpers =========================================\ndef buildLibs(projectDir):\n+ # this order needed for mspgcc\nlibs_dict = {\n'00std': [],\n'01bsp': ['libbsp'],\n'02drv': ['libkernel', 'libdrivers', 'libbsp'],\n- '03oos': ['libopenstack', 'libopenapps', 'libopenweb', 'libopenstack', 'libkernel', 'libdrivers', 'libbsp'],\n- # this order needed for mspgcc\n+ '03oos': ['libopenstack', 'libopenapps', 'libopenweb', 'libkernel', 'libdrivers', 'libbsp'],\n}\nreturn_val = None\n@@ -1099,19 +1083,23 @@ def buildLibs(projectDir):\nif projectDir.startswith(k):\nreturn_val = v\n- assert return_val != None\n+ assert return_val is not None\nreturn return_val\n-def buildIncludePath(projectDir, localEnv):\n- if projectDir.startswith('03oos_'):\n- localEnv.Append(\n+def buildIncludePath(project_dir, local_env):\n+ if project_dir.startswith('03oos_'):\n+ local_env.Append(\nCPPPATH=[\n+ os.path.join('#', 'inc'),\n+ os.path.join('#', 'kernel'),\nos.path.join('#', 'openstack'),\n- os.path.join('#', 'openstack', '03b-IPv6'),\n- os.path.join('#', 'openstack', '02b-MAChigh'),\nos.path.join('#', 'openstack', '02a-MAClow'),\n+ os.path.join('#', 'openstack', '02b-MAChigh'),\n+ os.path.join('#', 'openstack', '03a-IPHC'),\n+ os.path.join('#', 'openstack', '03b-IPv6'),\n+ os.path.join('#', 'openstack', '04-TRAN'),\nos.path.join('#', 'openstack', 'cross-layers'),\nos.path.join('#', 'drivers', 'common'),\n]\n@@ -1136,113 +1124,90 @@ def project_finder(localEnv):\nif env['toolchain'] == 'iar-proj':\n# no VariantDir is used\n- PATH_TO_BOARD_PROJECTS = os.getcwd()\n+ projects = os.getcwd()\nelse:\n# VariantDir is used\n- PATH_TO_BOARD_PROJECTS = os.path.join('..', '..', '..', '..', 'projects', os.path.split(os.getcwd())[-1])\n- tempsubdirs = os.listdir(PATH_TO_BOARD_PROJECTS)\n- subdirs = [name for name in tempsubdirs if os.path.isdir(os.path.join(PATH_TO_BOARD_PROJECTS, name))]\n+ projects = os.path.join('..', '..', '..', '..', 'projects', os.path.split(os.getcwd())[-1])\n+\n+ sub_dirs = [name for name in os.listdir(projects) if os.path.isdir(os.path.join(projects, name))]\n# parse dirs and build targets\n- for projectDir in subdirs:\n+ for project_dir in sub_dirs:\n- src_dir = os.path.join(PATH_TO_BOARD_PROJECTS, projectDir)\n- variant_dir = os.path.join(env['VARDIR'], 'projects', projectDir)\n+ src_dir = os.path.join(projects, project_dir)\n+ variant_dir = os.path.join(env['VARDIR'], 'projects', project_dir)\nadded = False\n- targetName = projectDir[2:]\n+ target_name = project_dir[2:]\n- if (\n- ('{0}.c'.format(projectDir) in os.listdir(os.path.join(PATH_TO_BOARD_PROJECTS, projectDir))) and\n- (localEnv['toolchain'] != 'iar-proj') and\n- (localEnv['board'] != 'python')\n- ):\n+ if '{0}.c'.format(project_dir) in os.listdir(os.path.join(projects, project_dir)) and \\\n+ localEnv['toolchain'] != 'iar-proj' and localEnv['board'] != 'python':\n# \"normal\" case\n+ localEnv.VariantDir(src_dir=src_dir, variant_dir=variant_dir)\n- localEnv.VariantDir(\n- src_dir=src_dir,\n- variant_dir=variant_dir,\n- )\n-\n- target = projectDir\n- source = [\n- os.path.join(projectDir, '{0}.c'.format(projectDir)),\n- ]\n- libs = buildLibs(projectDir)\n+ target = project_dir\n+ source = [os.path.join(project_dir, '{0}.c'.format(project_dir))]\n+ libs = buildLibs(project_dir)\n- buildIncludePath(projectDir, localEnv)\n+ buildIncludePath(project_dir, localEnv)\n# In Linux, you cannot have the same target name as the name of the\n# directory name.\ntarget = target + \"_prog\"\n- exe = localEnv.Program(\n- target=target,\n- source=source,\n- LIBS=libs,\n- )\n- targetAction = localEnv.PostBuildExtras(exe)\n+ exe = localEnv.Program(target=target, source=source, LIBS=libs)\n+ target_action = localEnv.PostBuildExtras(exe)\n- Alias(targetName, [targetAction])\n+ Alias(target_name, [target_action])\nadded = True\n- elif (\n- ('{0}.c'.format(projectDir) in os.listdir(os.path.join(PATH_TO_BOARD_PROJECTS, projectDir))) and\n- (localEnv['board'] == 'python')\n- ):\n+ elif '{0}.c'.format(project_dir) in os.listdir(os.path.join(projects, project_dir)) and \\\n+ localEnv['board'] == 'python':\n# Python case\n# build the artifacts in a separate directory\n- localEnv.VariantDir(\n- src_dir=src_dir,\n- variant_dir=variant_dir,\n- )\n+ localEnv.VariantDir(src_dir=src_dir, variant_dir=variant_dir)\n# build both the application's and the Python module's main files\nsources_c = [\n- os.path.join(projectDir, '{0}.c'.format(projectDir)),\n- os.path.join(projectDir, 'openwsnmodule.c'),\n+ os.path.join(project_dir, '{0}.c'.format(project_dir)),\n+ os.path.join(project_dir, 'openwsnmodule.c'),\n]\nlocalEnv.Command(\n- os.path.join(projectDir, 'openwsnmodule.c'),\n+ os.path.join(project_dir, 'openwsnmodule.c'),\nos.path.join('#', 'bsp', 'boards', 'python', 'openwsnmodule.c'),\n- [\n- Copy('$TARGET', '$SOURCE')\n- ]\n+ [Copy('$TARGET', '$SOURCE')]\n)\n# objectify those two files\nfor s in sources_c:\n- localEnv.Objectify(\n- target=localEnv.ObjectifiedFilename(s),\n- source=s,\n- )\n+ localEnv.Objectify(target=localEnv.ObjectifiedFilename(s), source=s)\n# prepare environment for this build\nif os.name != 'nt' and localEnv['simhost'].endswith('-windows'):\n# Cross-build handling -- find DLL, rather than hardcode version,\n# like 'python27.dll'\n- pathnames = sconsUtils.findPattern('python*.dll', localEnv['simhostpy'])\n- if pathnames:\n- pathname = pathnames[0]\n+ path_names = sconsUtils.findPattern('python*.dll', localEnv['simhostpy'])\n+ if path_names:\n+ path_name = path_names[0]\nelse:\nprint c.Fore.RED + \"Can't find python dll in provided simhostpy\" + c.Fore.RESET\nExit(-1)\n# ':' means no prefix, like 'lib', for shared library name\n- pysyslib = ':{0}'.format(os.path.basename(pathname))\n+ pysyslib = ':{0}'.format(os.path.basename(path_name))\npylib_ext = '.pyd'\nelse:\npysyslib = 'python' + distutils.sysconfig.get_config_var('VERSION')\npylib_ext = distutils.sysconfig.get_config_var('SO')\n- target = targetName\n+ target = target_name\nsource = [localEnv.ObjectifiedFilename(s) for s in sources_c]\n- libs = buildLibs(projectDir)\n+ libs = buildLibs(project_dir)\nlibs += [[pysyslib]]\n- buildIncludePath(projectDir, localEnv)\n+ buildIncludePath(project_dir, localEnv)\n# build a shared library (a Python extension module) rather than an exe\n@@ -1254,26 +1219,26 @@ def project_finder(localEnv):\nSHLIBSUFFIX=pylib_ext,\n)\n- Alias(targetName, [targetAction])\n+ Alias(target_name, [targetAction])\nadded = True\nelif (\n- ('{0}.ewp'.format(projectDir) in os.listdir(os.path.join(PATH_TO_BOARD_PROJECTS, projectDir))) and\n+ ('{0}.ewp'.format(project_dir) in os.listdir(os.path.join(projects, project_dir))) and\n(localEnv['toolchain'] == 'iar-proj')\n):\n# iar-proj case\n- source = [os.path.join(projectDir, '{0}.ewp'.format(projectDir)), ]\n+ source = [os.path.join(project_dir, '{0}.ewp'.format(project_dir)), ]\ntargetAction = localEnv.iarProjBuilder(\nsource=source,\n)\n- Alias(targetName, [targetAction])\n+ Alias(target_name, [targetAction])\nadded = True\nif added:\n- populateTargetGroup(localEnv, targetName)\n+ populateTargetGroup(localEnv, target_name)\nenv.AddMethod(project_finder, 'ProjectFinder')\n"
},
{
"change_type": "MODIFY",
"old_path": "SConstruct",
"new_path": "SConstruct",
"diff": "@@ -337,7 +337,6 @@ env.SConscript('SConscript', exports=['env'])\nfor k, v in env['targets'].items():\nAlias(k, v)\n-\n# ============================ admin targets ===================================\n# ===== list\n@@ -345,7 +344,7 @@ for k, v in env['targets'].items():\ndef list_function(env, target, source):\noutput = []\noutput += ['\\n']\n- output += ['Avaiable targets for board={0} toolchain={1}'.format(env['board'], env['toolchain'])]\n+ output += ['Available targets for board={0} toolchain={1}'.format(env['board'], env['toolchain'])]\noutput += ['\\n']\nfor k, v in env['targets'].items():\noutput += [' - {0}'.format(k)]\n@@ -365,7 +364,6 @@ Alias('list', list_output)\ndef env_function(env, target, source):\nprint env.Dump()\n-\nenv_command = env.Command('env', None, env_function)\nAlwaysBuild(env_command)\nAlias('env', env_command)\n"
},
{
"change_type": "MODIFY",
"old_path": "projects/common/03oos_macpong/03oos_macpong.c",
"new_path": "projects/common/03oos_macpong/03oos_macpong.c",
"diff": "@@ -34,6 +34,7 @@ macpong_vars_t macpong_vars;\n//=========================== prototypes ======================================\nvoid macpong_initSend(opentimers_id_t id);\n+\nvoid macpong_send(uint8_t payloadCtr);\n//=========================== initialization ==================================\n@@ -81,19 +82,17 @@ void macpong_send(uint8_t payloadCtr) {\npkt = openqueue_getFreePacketBuffer(COMPONENT_UECHO);\nif (pkt == NULL) {\n- openserial_printError(\n- COMPONENT_IPHC,\n- ERR_NO_FREE_PACKET_BUFFER,\n- (errorparameter_t)0,\n- (errorparameter_t)0\n- );\n+ LOG_ERROR(COMPONENT_IPHC, ERR_NO_FREE_PACKET_BUFFER, (errorparameter_t) 0, (errorparameter_t) 0);\nreturn;\n}\npkt->creator = COMPONENT_IPHC;\npkt->owner = COMPONENT_IPHC;\nneighbors_getNeighborEui64(&pkt->l2_nextORpreviousHop, ADDR_64B, 0);\n- packetfunctions_reserveHeaderSize(pkt,LEN_PAYLOAD);\n+ if (packetfunctions_reserveHeader(&pkt, LEN_PAYLOAD) == E_FAIL){\n+ openqueue_freePacketBuffer(pkt);\n+ return;\n+ }\n((uint8_t *) pkt->payload)[0] = payloadCtr;\nfor (i = 1; i < LEN_PAYLOAD; i++) {\n((uint8_t *) pkt->payload)[i] = i;\n@@ -103,15 +102,9 @@ void macpong_send(uint8_t payloadCtr) {\n//=========================== stubbing ========================================\n-//===== FRAG\n-\n-void iphc_init(void) {return; }\n-void iphc_sendDone(OpenQueueEntry_t *msg, owerror_t sendError) {return; }\n-void iphc_receive(OpenQueueEntry_t *msg) {return; }\n-\n//===== IPHC\n-void frag_init(void) {\n+void iphc_init(void) {\nmacpong_vars.timerId = opentimers_create(TIMER_GENERAL_PURPOSE, TASKPRIO_IPHC);\nopentimers_scheduleIn(\nmacpong_vars.timerId, // timerId\n@@ -122,12 +115,12 @@ void frag_init(void) {\n);\n}\n-void frag_sendDone(OpenQueueEntry_t* msg, owerror_t error) {\n+void iphc_sendDone(OpenQueueEntry_t *msg, owerror_t sendError) {\nmsg->owner = COMPONENT_IPHC;\nopenqueue_freePacketBuffer(msg);\n}\n-void frag_receive(OpenQueueEntry_t* msg) {\n+void iphc_receive(OpenQueueEntry_t *msg) {\nmsg->owner = COMPONENT_IPHC;\nmacpong_send(++msg->payload[0]);\nopenqueue_freePacketBuffer(msg);\n@@ -140,24 +133,37 @@ void sniffer_setListeningChannel(uint8_t channel) { return; }\n//===== L3\nvoid forwarding_init(void) { return; }\n+\nvoid openbridge_init(void) { return; }\n+\nvoid openbridge_triggerData(void) { return; }\n//===== L4\nvoid icmpv6_init(void) { return; }\n+\nvoid icmpv6echo_init(void) { return; }\n+\nvoid icmpv6echo_trigger(void) { return; }\n+\nvoid icmpv6router_init(void) { return; }\n+\nvoid icmpv6router_trigger(void) { return; }\n+\nvoid icmpv6rpl_init(void) { return; }\n+\nvoid icmpv6rpl_trigger(void) { return; }\n+\nvoid icmpv6rpl_writeDODAGid(uint8_t *dodagid) { return; }\n+\nvoid icmpv6rpl_setDIOPeriod(uint16_t dioPeriod) { return; }\n+\nvoid icmpv6rpl_setDAOPeriod(uint16_t daoPeriod) { return; }\n+\nbool icmpv6rpl_getPreferredParentIndex(uint8_t *indexptr) {\nreturn FALSE;\n}\n+\nbool icmpv6rpl_getPreferredParentEui64(open_addr_t *addressToWrite) {\nif (idmanager_getIsDAGroot() == TRUE) {\n@@ -169,6 +175,7 @@ bool icmpv6rpl_getPreferredParentEui64(open_addr_t* addressToWrite) {\n}\nreturn TRUE;\n}\n+\nbool icmpv6rpl_isPreferredParent(open_addr_t *address) {\nopen_addr_t temp;\n@@ -183,19 +190,25 @@ bool icmpv6rpl_isPreferredParent(open_addr_t* address) {\nreturn FALSE;\n}\n}\n+\ndagrank_t icmpv6rpl_getMyDAGrank(void) {\nreturn 0;\n}\n+\nbool icmpv6rpl_daoSent(void) {\nreturn TRUE;\n}\n+\nvoid icmpv6rpl_setMyDAGrank(dagrank_t rank) { return; }\n+\nvoid icmpv6rpl_updateMyDAGrankAndParentSelection(void) { return; }\n+\nvoid icmpv6echo_setIsReplyEnabled(bool isEnabled) { return; }\n-void openudp_init(void) { return; }\n-void opencoap_init(void) { return; }\n+void udp_init(void) { return; }\n+\n+void coap_init(void) { return; }\n//===== L7\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-867. Fix macpong project
|
491,587 |
25.06.2020 14:15:16
| -7,200 |
1fe511fd35eb54a566a44fea4a0ebfe47fac5338
|
Set default config.h file
Disable everything, otherwise macpong will not compile
|
[
{
"change_type": "MODIFY",
"old_path": "inc/config.h",
"new_path": "inc/config.h",
"diff": "*\n*/\n-#define OPENWSN_CJOIN_C\n+// #define OPENWSN_CJOIN_C\n// ======================= OpenWeb configuration =======================\n*\n*/\n-#define OPENWSN_COAP_C\n+// #define OPENWSN_COAP_C\n// ======================== Stack configuration ========================\n*\n*/\n-#define OPENWSN_UDP_C\n+// #define OPENWSN_UDP_C\n/**\n* Allow the MSF algorithm to dynamically remove and allocate slots, based on the traffic load in the network.\n*\n*/\n-#define OPENWSN_ADAPTIVE_MSF\n+// #define OPENWSN_ADAPTIVE_MSF\n/**\n*\n* Enables the icmpv6 echo (ping) functionality\n*/\n-#define OPENWSN_ICMPV6ECHO_C\n+// #define OPENWSN_ICMPV6ECHO_C\n/**\n*\n* Requires: OPENWSN_CJOIN_C, OPENWSN_COAP_C, OPENWSN_UDP_C\n*/\n-#define OPENWSN_IEEE802154E_SECURITY_C\n+// #define OPENWSN_IEEE802154E_SECURITY_C\n/**\n* increase RAM usage.\n*\n*/\n-#define PACKETQUEUE_LENGTH 10\n+#define PACKETQUEUE_LENGTH 20\n// ======================== Board configuration ========================\n* cannot be combined with the python board.\n*\n*/\n-#define BOARD_CRYPTOENGINE_ENABLED\n+// #define BOARD_CRYPTOENGINE_ENABLED\n/**\n* \\def BOARD_OPENSERIAL_PRINTF\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-867. Set default config.h file
Disable everything, otherwise macpong will not compile
|
491,587 |
25.06.2020 14:30:49
| -7,200 |
ae4dc091318e39cf9b214e38ababf67855ea174a
|
Update header guards
|
[
{
"change_type": "MODIFY",
"old_path": "openstack/cross-layers/openrandom.h",
"new_path": "openstack/cross-layers/openrandom.h",
"diff": "-#ifndef __OPENRANDOM_H\n-#define __OPENRANDOM_H\n+#ifndef OPENWSN_OPENRANDOM_H\n+#define OPENWSN_OPENRANDOM_H\n/**\n\\addtogroup cross-layers\n@@ -33,4 +33,4 @@ uint16_t openrandom_getRandomizePeriod(uint16_t period, uint16_t range);\n\\}\n*/\n-#endif\n+#endif /* OPENWSN_OPENRANDOM_H */\n"
},
{
"change_type": "MODIFY",
"old_path": "openweb/opencoap/cborencoder.h",
"new_path": "openweb/opencoap/cborencoder.h",
"diff": "-#ifndef _CBORENCODER_H\n-#define _CBORENCODER_H\n+#ifndef OPENWSN_CBORENCODER_H\n+#define OPENWSN_CBORENCODER_H\n#include \"opendefs.h\"\n@@ -16,4 +16,4 @@ uint8_t cborencoder_put_array(uint8_t *buffer, uint8_t elements);\nuint8_t cborencoder_put_map(uint8_t *buffer, uint8_t elements);\n-#endif /* _CBORENCODER_H */\n+#endif /* OPENWSN_CBORENCODER_H */\n"
},
{
"change_type": "MODIFY",
"old_path": "openweb/opencoap/coap.h",
"new_path": "openweb/opencoap/coap.h",
"diff": "-#ifndef __COAP_H\n-#define __COAP_H\n+#ifndef OPENWSN_COAP_H\n+#define OPENWSN_COAP_H\n/**\n\\addtogroup Transport\n@@ -261,4 +261,4 @@ uint8_t coap_find_option(coap_option_iht *array, uint8_t arrayLen, coap_option_t\n\\}\n*/\n-#endif\n+#endif /* OPENWSN_COAP_H */\n"
},
{
"change_type": "MODIFY",
"old_path": "openweb/opencoap/oscore.h",
"new_path": "openweb/opencoap/oscore.h",
"diff": "-#ifndef __OPENOSCOAP_H\n-#define __OPENOSCOAP_H\n+#ifndef OPENWSN_OSCORE_H\n+#define OPENWSN_OSCORE_H\n/**\n\\addtogroup Transport\n@@ -77,4 +77,4 @@ uint8_t oscore_parse_compressed_COSE(uint8_t *buffer,\n\\}\n*/\n-#endif\n+#endif /* OPENWSN_OSCORE_H*/\n"
},
{
"change_type": "MODIFY",
"old_path": "openweb/openweb.c",
"new_path": "openweb/openweb.c",
"diff": "#include \"coap.h\"\n#endif\n-void openweb_init() {\n+void openweb_init(void) {\n#if defined(OPENWSN_COAP_C)\ncoap_init();\n"
},
{
"change_type": "MODIFY",
"old_path": "openweb/openweb.h",
"new_path": "openweb/openweb.h",
"diff": "-#ifndef __OPENCOAP_H\n-#define __OPENCOAP_H\n+#ifndef OPENWSN_OPENWEB_H\n+#define OPENWSN_OPENWEB_H\n//=========================== define ==========================================\nvoid openweb_init(void);\n-#endif /* __OPENCOAP_H */\n\\ No newline at end of file\n+#endif /* OPENWSN_OPENWEB_H */\n\\ No newline at end of file\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-867. Update header guards
|
491,587 |
25.06.2020 15:32:46
| -7,200 |
71e96740eea57fedb67c58e90da8e873709ed7b3
|
Bug fix for opentimers (thanks to Francisco)
|
[
{
"change_type": "MODIFY",
"old_path": "drivers/common/opentimers.c",
"new_path": "drivers/common/opentimers.c",
"diff": "@@ -60,6 +60,7 @@ opentimers_id_t opentimers_create(uint8_t timer_id, uint8_t task_prio){\nopentimers_vars.timersBuf[timer_id].isUsed = TRUE;\n// the TSCH timer and inhibit timer won't push a task,\n// hence task_prio is not used\n+ ENABLE_INTERRUPTS();\nreturn timer_id;\n}\n}\n@@ -69,6 +70,7 @@ opentimers_id_t opentimers_create(uint8_t timer_id, uint8_t task_prio){\nif (opentimers_vars.timersBuf[id].isUsed == FALSE){\nopentimers_vars.timersBuf[id].isUsed = TRUE;\nopentimers_vars.timersBuf[id].timer_task_prio = task_prio;\n+ ENABLE_INTERRUPTS();\nreturn id;\n}\n}\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-867. Bug fix for opentimers (thanks to Francisco)
|
491,587 |
25.06.2020 16:10:02
| -7,200 |
ca4869ae9c6b5c1208e4688676e577d60c3ddb6b
|
Update log level names to prevent namespace collision
|
[
{
"change_type": "MODIFY",
"old_path": "drivers/common/openserial.c",
"new_path": "drivers/common/openserial.c",
"diff": "@@ -146,22 +146,22 @@ owerror_t openserial_printLog(\nchar severity;\nswitch (log_level) {\n- case VERBOSE:\n+ case L_VERBOSE:\nseverity = SERFRAME_MOTE2PC_VERBOSE;\nbreak;\n- case INFO:\n+ case L_INFO:\nseverity = SERFRAME_MOTE2PC_INFO;\nbreak;\n- case WARNING:\n+ case L_WARNING:\nseverity = SERFRAME_MOTE2PC_WARNING;\nbreak;\n- case SUCCESS:\n+ case L_SUCCESS:\nseverity = SERFRAME_MOTE2PC_SUCCESS;\nbreak;\n- case ERROR:\n+ case L_ERROR:\nseverity = SERFRAME_MOTE2PC_ERROR;\nbreak;\n- case CRITICAL:\n+ case L_CRITICAL:\nseverity = SERFRAME_MOTE2PC_CRITICAL;\n// blink error LED, this is serious\nleds_error_blink();\n"
},
{
"change_type": "MODIFY",
"old_path": "drivers/common/openserial.h",
"new_path": "drivers/common/openserial.h",
"diff": "#endif\n#if (OPENWSN_DEBUG_LEVEL >= 6)\n-#define LOG_VERBOSE(component, message, p1, p2) openserial_printLog(VERBOSE, (component), (message), (p1), (p2))\n+#define LOG_VERBOSE(component, message, p1, p2) openserial_printLog(L_VERBOSE, (component), (message), (p1), (p2))\n#else\n#define LOG_VERBOSE(component, message, p1, p2)\n#endif\n#if (OPENWSN_DEBUG_LEVEL >= 5)\n-#define LOG_INFO(component, message, p1, p2) openserial_printLog(INFO, (component), (message), (p1), (p2))\n+#define LOG_INFO(component, message, p1, p2) openserial_printLog(L_INFO, (component), (message), (p1), (p2))\n#else\n#define LOG_INFO(component, message, p1, p2)\n#endif\n#if (OPENWSN_DEBUG_LEVEL >= 4)\n-#define LOG_WARNING(component, message, p1, p2) openserial_printLog(WARNING, (component), (message), (p1), (p2))\n+#define LOG_WARNING(component, message, p1, p2) openserial_printLog(L_WARNING, (component), (message), (p1), (p2))\n#else\n#define LOG_WARNING(component, message, p1, p2)\n#endif\n#if (OPENWSN_DEBUG_LEVEL >= 3)\n-#define LOG_SUCCESS(component, message, p1, p2) openserial_printLog(SUCCESS, (component), (message), (p1), (p2))\n+#define LOG_SUCCESS(component, message, p1, p2) openserial_printLog(L_SUCCESS, (component), (message), (p1), (p2))\n#else\n#define LOG_SUCCESS(component, message, p1, p2)\n#endif\n#if (OPENWSN_DEBUG_LEVEL >= 2)\n-#define LOG_ERROR(component, message, p1, p2) openserial_printLog(ERROR, (component), (message), (p1), (p2))\n+#define LOG_ERROR(component, message, p1, p2) openserial_printLog(L_ERROR, (component), (message), (p1), (p2))\n#else\n#define LOG_ERROR(component, message, p1, p2)\n#endif\n#if (OPENWSN_DEBUG_LEVEL >= 1)\n-#define LOG_CRITICAL(component, message, p1, p2) openserial_printLog(CRITICAL, (component), (message), (p1), (p2))\n+#define LOG_CRITICAL(component, message, p1, p2) openserial_printLog(L_CRITICAL, (component), (message), (p1), (p2))\n#else\n#define LOG_CRITICAL(component, message, p1, p2)\n#endif\n//=========================== typedef =========================================\nenum {\n- CRITICAL = 1,\n- ERROR = 2,\n- SUCCESS = 3,\n- WARNING = 4,\n- INFO = 5,\n- VERBOSE = 6\n+ L_CRITICAL = 1,\n+ L_ERROR = 2,\n+ L_SUCCESS = 3,\n+ L_WARNING = 4,\n+ L_INFO = 5,\n+ L_VERBOSE = 6\n};\n//=========================== variables =======================================\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-867. Update log level names to prevent namespace collision
|
491,587 |
25.06.2020 16:10:35
| -7,200 |
540b52899519665dd7b6c70af45b4346d5c6b72b
|
Update board checks in check_config.h
|
[
{
"change_type": "MODIFY",
"old_path": "SConscript",
"new_path": "SConscript",
"diff": "@@ -52,8 +52,12 @@ elif env['board'] == 'agilefox':\nenv.Append(CPPDEFINES='AGILEFOX')\nelif env['board'] == 'iot-lab_M3':\nenv.Append(CPPDEFINES='IOTLAB_M3')\n+elif env['board'] == 'iot-lab_A8-M3':\n+ env.Append(CPPDEFINES='IOTLAB_A8_M3')\nelif env['board'] == 'nrf52840':\nenv.Append(CPPDEFINES='NRF52840')\n+elif env['board'] == 'samr21_xpro':\n+ env.Append(CPPDEFINES='SAMR21_XPRO')\nelse:\nprint c.Fore.RED + \"Unsupported board: {}\".format(env['board']) + c.Fore.RESET\nExit(-1)\n"
},
{
"change_type": "MODIFY",
"old_path": "inc/check_config.h",
"new_path": "inc/check_config.h",
"diff": "!defined(WSN430V14) && \\\n!defined(GINA) && \\\n!defined(Z1) && \\\n+ !defined(OPENMOTESTM) && \\\n!defined(OPENMOTE_CC2538) && \\\n!defined(OPENMOTE_B) && \\\n!defined(OPENMOTE_B_24GHZ) && \\\n- !defined(OPENMOTE_B_SUBGHZ)\n+ !defined(OPENMOTE_B_SUBGHZ) && \\\n+ !defined(AGILEFOX) && \\\n+ !defined(IOTLAB_M3) && \\\n+ !defined(IOTLAB_A8_M3) && \\\n+ !defined(SAMR21_XPRO) && \\\n+ !defined(NRF52840)\n#error 'Board name must be specified to check for configuration errors'\n#endif\ndefined(TELOSB) || \\\ndefined(WSN430V13B) || \\\ndefined(WSN430V14) || \\\n+ defined(OPENMOTESTM) || \\\ndefined(GINA) || \\\n+ defined(NRF52840) || \\\n+ defined(AGILEFOX) || \\\n+ defined(IOTLAB_M3) || \\\n+ defined(IOTLAB_A8_M3) || \\\n+ defined(SAMR21_XPRO) || \\\ndefined(Z1)) && \\\ndefined(OPENWSN_IEEE802154E_SECURITY_C) && \\\n!defined(BOARD_CRYPTOENGINE_ENABLED)\n#warning 'Software encryption might be too slow on certain hardware. It is recommend to use BOARD_CRYTPOENGINE_ENABLED where possible.'\n#endif\n+#if defined(BOARD_CRYPTOENGINE_ENABLED) && (\\\n+ defined(WSN430V13B) || \\\n+ defined(WSN430V14) || \\\n+ defined(AGILEFOX) || \\\n+ defined(GINA) || \\\n+ defined(NRF52840) || \\\n+ defined(SAMR21_XPRO) || \\\n+ defined(Z1) || \\\n+ defined(OPENMOTESTM))\n+#error 'Hardware encryption not supported on this platform.'\n+#endif\n+\n#if defined(OPENWSN_IEEE802154E_SECURITY_C) && !defined(OPENWSN_CJOIN_C)\n-#error 'Link-layer security requires CJOIN application'\n+#error 'Link-layer security requires CJOIN application.'\n#endif\n#if defined(PYTHON_BOARD) && defined(BOARD_CRYPTOENGINE_ENABLED)\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-867. Update board checks in check_config.h
|
491,587 |
25.06.2020 16:17:16
| -7,200 |
7301a402b2158a53f423d2846a3e957a58548dea
|
Fix unterminated #if
|
[
{
"change_type": "MODIFY",
"old_path": "bsp/boards/iot-lab_A8-M3/board.c",
"new_path": "bsp/boards/iot-lab_A8-M3/board.c",
"diff": "@@ -101,7 +101,7 @@ void board_init(void){\n#if defined(BOARD_CRYPTOENGINE_ENABLED)\ncryptoengine_init();\n-#enabled\n+#endif\n}\nvoid board_sleep(void) {\n"
},
{
"change_type": "MODIFY",
"old_path": "bsp/boards/iot-lab_A8-M3/cryptoengine.c",
"new_path": "bsp/boards/iot-lab_A8-M3/cryptoengine.c",
"diff": "//=========================== prototypes ======================================\nowerror_t at86rf231_crypto_load_key(uint8_t key[16]);\n+\nowerror_t at86rf231_crypto_opt_ecb(uint8_t *buffer);\n-static owerror_t aes_cbc_mac(uint8_t* a, uint8_t len_a, uint8_t* m, uint8_t len_m, uint8_t* nonce, uint8_t* mac, uint8_t len_mac, uint8_t l);\n+\n+static owerror_t aes_cbc_mac(uint8_t *a, uint8_t len_a, uint8_t *m, uint8_t len_m, uint8_t *nonce, uint8_t *mac,\n+ uint8_t len_mac, uint8_t l);\n+\nstatic owerror_t aes_ctr_enc(uint8_t *m, uint8_t len_m, uint8_t *nonce, uint8_t *mac, uint8_t len_mac, uint8_t l);\n+\nowerror_t aes_cbc_enc_raw(uint8_t *buffer, uint8_t len, uint8_t iv[16]);\n+\nowerror_t aes_ctr_enc_raw(uint8_t *buffer, uint8_t len, uint8_t iv[16]);\n+\nstatic void inc_counter(uint8_t *counter);\n//=========================== public ==========================================\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-867. Fix unterminated #if
|
491,587 |
25.06.2020 16:24:13
| -7,200 |
f8b74384d33fd6c5b32daf8d72d066de1aaedaff
|
Fix sniffer project
|
[
{
"change_type": "MODIFY",
"old_path": "projects/common/03oos_sniffer/03oos_sniffer.c",
"new_path": "projects/common/03oos_sniffer/03oos_sniffer.c",
"diff": "@@ -55,8 +55,11 @@ app_vars_t app_vars;\n//=========================== prototypes ======================================\nvoid cb_startFrame(PORT_TIMER_WIDTH timestamp);\n+\nvoid cb_endFrame(PORT_TIMER_WIDTH timestamp);\n+\nvoid cb_timer(opentimers_id_t id);\n+\nvoid task_uploadPacket(void);\n//=========================== main ============================================\n@@ -178,15 +181,21 @@ void task_uploadPacket(void) {\nvoid ieee154e_setSingleChannel(uint8_t channel) {\nsniffer_setListeningChannel(channel);\n}\n+\nvoid ieee154e_setIsSecurityEnabled(bool isEnabled) { return; }\n+\nvoid ieee154e_setSlotDuration(uint16_t duration) { return; }\n+\nvoid ieee154e_setIsAckEnabled(bool isEnabled) { return; }\n+\nvoid ieee154e_getAsn(uint8_t *array) { return; }\nvoid schedule_startDAGroot(void) { return; }\n+\nvoid schedule_setFrameLength(uint16_t frameLength) { return; }\nvoid sixtop_setEBPeriod(uint8_t ebPeriod) { return; }\n+\nowerror_t sixtop_request(\nuint8_t code,\nopen_addr_t *neighbor,\n@@ -198,30 +207,51 @@ owerror_t sixtop_request(\nuint16_t listingOffset,\nuint16_t listingMaxNumCells\n) { return E_FAIL; }\n+\nvoid sixtop_setIsResponseEnabled(bool isEnabled) { return; }\n+\nvoid sixtop_setKaPeriod(uint16_t kaPeriod) { return; }\n+\nvoid msf_appPktPeriod(uint8_t numAppPacketsPerSlotFrame) { return; }\n+\nuint8_t msf_getsfid(void) { return 0; }\nvoid openbridge_triggerData(void) { return; }\nvoid icmpv6rpl_setDIOPeriod(uint16_t dioPeriod) { return; }\n+\nvoid icmpv6rpl_setDAOPeriod(uint16_t daoPeriod) { return; }\n+\nvoid icmpv6rpl_setMyDAGrank(uint16_t rank) { return; }\n+\nvoid icmpv6rpl_writeDODAGid(uint8_t *dodagid) { return; }\n+\nvoid icmpv6rpl_updateMyDAGrankAndParentSelection(void) { return; }\n+\nbool icmpv6rpl_getPreferredParentEui64(open_addr_t *neighbor) { return TRUE; }\n+\nvoid icmpv6echo_setIsReplyEnabled(bool isEnabled) { return; }\nbool debugPrint_asn(void) { return TRUE; }\n+\n+bool debugPrint_msf(void) { return TRUE; }\n+\nbool debugPrint_isSync(void) { return TRUE; }\n+\nbool debugPrint_macStats(void) { return TRUE; }\n+\nbool debugPrint_schedule(void) { return TRUE; }\n+\nbool debugPrint_backoff(void) { return TRUE; }\n+\nbool debugPrint_queue(void) { return TRUE; }\n+\nbool debugPrint_neighbors(void) { return TRUE; }\n+\nbool debugPrint_myDAGrank(void) { return TRUE; }\n+\nbool debugPrint_kaPeriod(void) { return TRUE; }\nvoid IEEE802154_security_setBeaconKey(uint8_t index, uint8_t *value) { return; }\n+\nvoid IEEE802154_security_setDataKey(uint8_t index, uint8_t *value) { return; }\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-867. Fix sniffer project
|
491,609 |
03.06.2020 10:40:05
| -7,200 |
2bbe6dda7c77637382e0f04962c691792ffd4da0
|
Update OSCORE option name and number.
|
[
{
"change_type": "MODIFY",
"old_path": "openapps/cjoin/cjoin.c",
"new_path": "openapps/cjoin/cjoin.c",
"diff": "@@ -281,7 +281,7 @@ owerror_t cjoin_sendJoinRequest(open_addr_t *joinProxy) {\n// object security option\n// length and value are set by the CoAP library\n- options[2].type = COAP_OPTION_NUM_OBJECTSECURITY;\n+ options[2].type = COAP_OPTION_NUM_OSCORE;\n// ProxyScheme set to \"coap\"\noptions[3].type = COAP_OPTION_NUM_PROXYSCHEME;\n"
},
{
"change_type": "MODIFY",
"old_path": "openweb/opencoap/coap.c",
"new_path": "openweb/opencoap/coap.c",
"diff": "@@ -200,7 +200,7 @@ void coap_receive(OpenQueueEntry_t *msg) {\n//== Object Security Option\n- option_count = coap_find_option(coap_incomingOptions, coap_incomingOptionsLen, COAP_OPTION_NUM_OBJECTSECURITY,\n+ option_count = coap_find_option(coap_incomingOptions, coap_incomingOptionsLen, COAP_OPTION_NUM_OSCORE,\n&option_index);\nif (option_count >= 1) {\nobjectSecurity = &coap_incomingOptions[option_index];\n@@ -430,7 +430,7 @@ void coap_receive(OpenQueueEntry_t *msg) {\n}\nif (temp_desc->securityContext != NULL) {\n- coap_outgoingOptions[coap_outgoingOptionsLen++].type = COAP_OPTION_NUM_OBJECTSECURITY;\n+ coap_outgoingOptions[coap_outgoingOptionsLen++].type = COAP_OPTION_NUM_OSCORE;\nif (coap_outgoingOptionsLen > MAX_COAP_OPTIONS) {\nsecurityReturnCode = COAP_CODE_RESP_SERVERERROR; // no space for object security option\n}\n@@ -810,7 +810,7 @@ coap_option_class_t coap_get_option_class(coap_option_t type) {\ncase COAP_OPTION_NUM_URIPORT:\ncase COAP_OPTION_NUM_PROXYURI:\ncase COAP_OPTION_NUM_PROXYSCHEME:\n- case COAP_OPTION_NUM_OBJECTSECURITY:\n+ case COAP_OPTION_NUM_OSCORE:\nreturn COAP_OPTION_CLASS_U;\ndefault:\nreturn COAP_OPTION_CLASS_U;\n"
},
{
"change_type": "MODIFY",
"old_path": "openweb/opencoap/coap.h",
"new_path": "openweb/opencoap/coap.h",
"diff": "@@ -106,6 +106,7 @@ typedef enum {\nCOAP_OPTION_NUM_IFNONEMATCH = 5,\nCOAP_OPTION_NUM_URIPORT = 7,\nCOAP_OPTION_NUM_LOCATIONPATH = 8,\n+ COAP_OPTION_NUM_OSCORE = 9,\nCOAP_OPTION_NUM_URIPATH = 11,\nCOAP_OPTION_NUM_CONTENTFORMAT = 12,\nCOAP_OPTION_NUM_MAXAGE = 14,\n@@ -114,7 +115,6 @@ typedef enum {\nCOAP_OPTION_NUM_LOCATIONQUERY = 20,\nCOAP_OPTION_NUM_PROXYURI = 35,\nCOAP_OPTION_NUM_PROXYSCHEME = 39,\n- COAP_OPTION_NUM_OBJECTSECURITY = 21,\nCOAP_OPTION_NUM_STATELESSPROXY = 40,\n} coap_option_t;\n"
},
{
"change_type": "MODIFY",
"old_path": "openweb/opencoap/oscore.c",
"new_path": "openweb/opencoap/oscore.c",
"diff": "@@ -161,7 +161,7 @@ owerror_t oscore_protect_message(\nuint8_t option_index;\n// find object security option in the list of passed options\n- option_count = coap_find_option(incomingOptions, incomingOptionsLen, COAP_OPTION_NUM_OBJECTSECURITY,\n+ option_count = coap_find_option(incomingOptions, incomingOptionsLen, COAP_OPTION_NUM_OSCORE,\n&option_index);\nif (option_count >= 1) {\nobjectSecurity = &incomingOptions[option_index];\n@@ -298,7 +298,7 @@ owerror_t oscore_unprotect_message(\nuint8_t option_index;\n// find object security option in the list of passed options\n- option_count = coap_find_option(incomingOptions, *incomingOptionsLen, COAP_OPTION_NUM_OBJECTSECURITY,\n+ option_count = coap_find_option(incomingOptions, *incomingOptionsLen, COAP_OPTION_NUM_OSCORE,\n&option_index);\nif (option_count >= 1) {\nobjectSecurity = &incomingOptions[option_index];\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-880. Update OSCORE option name and number.
|
491,609 |
03.06.2020 11:19:43
| -7,200 |
c35d31227c5afc05e22ec7eabb76fde4ecc212c8
|
Update security context and its derivation.
|
[
{
"change_type": "MODIFY",
"old_path": "openapps/cjoin/cjoin.c",
"new_path": "openapps/cjoin/cjoin.c",
"diff": "@@ -112,6 +112,8 @@ void cjoin_init_security_context(void) {\nsizeof(senderID),\nrecipientID,\nsizeof(recipientID),\n+ NULL,\n+ 0,\njoinKey,\n16,\nNULL,\n"
},
{
"change_type": "MODIFY",
"old_path": "openweb/opencoap/coap.h",
"new_path": "openweb/opencoap/coap.h",
"diff": "@@ -161,17 +161,18 @@ typedef struct {\ntypedef struct {\n// common context\nuint8_t aeadAlgorithm;\n+ uint8_t commonIV[AES_CCM_16_64_128_IV_LEN];\n+ uint8_t idContext[OSCOAP_MAX_ID_LEN];\n+ uint8_t idContextLen;\n// sender context\nuint8_t senderID[OSCOAP_MAX_ID_LEN];\nuint8_t senderIDLen;\nuint8_t senderKey[AES_CCM_16_64_128_KEY_LEN];\n- uint8_t senderIV[AES_CCM_16_64_128_IV_LEN];\nuint16_t sequenceNumber;\n// recipient context\nuint8_t recipientID[OSCOAP_MAX_ID_LEN];\nuint8_t recipientIDLen;\nuint8_t recipientKey[AES_CCM_16_64_128_KEY_LEN];\n- uint8_t recipientIV[AES_CCM_16_64_128_IV_LEN];\nreplay_window_t window;\n} oscore_security_context_t;\n"
},
{
"change_type": "MODIFY",
"old_path": "openweb/opencoap/oscore.c",
"new_path": "openweb/opencoap/oscore.c",
"diff": "#define EAAD_MAX_LEN 9 + OSCOAP_MAX_ID_LEN // assumes no Class I options\n#define AAD_MAX_LEN 12 + EAAD_MAX_LEN\n+#define INFO_MAX_LEN 2 * OSCOAP_MAX_ID_LEN + 2 + 1 + 4 + 1 + 3\n//=========================== variables =======================================\n@@ -22,6 +23,8 @@ owerror_t hkdf_derive_parameter(uint8_t *buffer,\nuint8_t masterSaltLen,\nuint8_t *identifier,\nuint8_t identifierLen,\n+ uint8_t *idContext,\n+ uint8_t idContextLen,\nuint8_t algorithm,\noscore_derivation_t type,\nuint8_t length\n@@ -63,6 +66,8 @@ void oscore_init_security_context(oscore_security_context_t *ctx,\nuint8_t senderIDLen,\nuint8_t *recipientID,\nuint8_t recipientIDLen,\n+ uint8_t *idContext,\n+ uint8_t idContextLen,\nuint8_t *masterSecret,\nuint8_t masterSecretLen,\nuint8_t *masterSalt,\n@@ -75,6 +80,21 @@ void oscore_init_security_context(oscore_security_context_t *ctx,\n// common context\nctx->aeadAlgorithm = AES_CCM_16_64_128;\n+ // invoke HKDF to get common IV\n+ hkdf_derive_parameter(ctx->commonIV,\n+ masterSecret,\n+ masterSecretLen,\n+ masterSalt,\n+ masterSaltLen,\n+ NULL,\n+ 0,\n+ idContext,\n+ idContextLen,\n+ AES_CCM_16_64_128,\n+ OSCOAP_DERIVATION_TYPE_IV,\n+ AES_CCM_16_64_128_IV_LEN);\n+\n+\n// sender context\nmemcpy(ctx->senderID, senderID, senderIDLen);\nctx->senderIDLen = senderIDLen;\n@@ -86,21 +106,11 @@ void oscore_init_security_context(oscore_security_context_t *ctx,\nmasterSaltLen,\nsenderID,\nsenderIDLen,\n+ idContext,\n+ idContextLen,\nAES_CCM_16_64_128,\nOSCOAP_DERIVATION_TYPE_KEY,\nAES_CCM_16_64_128_KEY_LEN);\n- // invoke HKDF to get sender IV\n- hkdf_derive_parameter(ctx->senderIV,\n- masterSecret,\n- masterSecretLen,\n- masterSalt,\n- masterSaltLen,\n- senderID,\n- senderIDLen,\n- AES_CCM_16_64_128,\n- OSCOAP_DERIVATION_TYPE_IV,\n- AES_CCM_16_64_128_IV_LEN);\n-\nctx->sequenceNumber = 0;\n// recipient context\n@@ -114,22 +124,12 @@ void oscore_init_security_context(oscore_security_context_t *ctx,\nmasterSaltLen,\nrecipientID,\nrecipientIDLen,\n+ idContext,\n+ idContextLen,\nAES_CCM_16_64_128,\nOSCOAP_DERIVATION_TYPE_KEY,\nAES_CCM_16_64_128_KEY_LEN);\n- // invoke HKDF to get recipient IV\n- hkdf_derive_parameter(ctx->recipientIV,\n- masterSecret,\n- masterSecretLen,\n- masterSalt,\n- masterSaltLen,\n- recipientID,\n- recipientIDLen,\n- AES_CCM_16_64_128,\n- OSCOAP_DERIVATION_TYPE_IV,\n- AES_CCM_16_64_128_IV_LEN);\n-\nctx->window.bitArray = 0x01; // LSB set\nctx->window.rightEdge = 0;\n@@ -227,9 +227,9 @@ owerror_t oscore_protect_message(\n// construct nonce\nif (is_request(code)) {\n- xor_arrays(context->senderIV, partialIV, nonce, AES_CCM_16_64_128_IV_LEN);\n+ xor_arrays(context->commonIV, partialIV, nonce, AES_CCM_16_64_128_IV_LEN);\n} else {\n- flip_first_bit(context->senderIV, nonce, AES_CCM_16_64_128_IV_LEN);\n+ flip_first_bit(context->commonIV, nonce, AES_CCM_16_64_128_IV_LEN);\nxor_arrays(nonce, partialIV, nonce, AES_CCM_16_64_128_IV_LEN);\n// do not encode sequence number and ID in the response\nrequestSeq = NULL;\n@@ -355,9 +355,9 @@ owerror_t oscore_unprotect_message(\n// construct nonce\nif (is_request(code)) {\n- xor_arrays(context->recipientIV, partialIV, nonce, AES_CCM_16_64_128_IV_LEN);\n+ xor_arrays(context->commonIV, partialIV, nonce, AES_CCM_16_64_128_IV_LEN);\n} else {\n- flip_first_bit(context->recipientIV, nonce, AES_CCM_16_64_128_IV_LEN);\n+ flip_first_bit(context->commonIV, nonce, AES_CCM_16_64_128_IV_LEN);\nxor_arrays(nonce, partialIV, nonce, AES_CCM_16_64_128_IV_LEN);\n}\n@@ -455,6 +455,8 @@ owerror_t hkdf_derive_parameter(uint8_t *buffer,\nuint8_t masterSaltLen,\nuint8_t *identifier,\nuint8_t identifierLen,\n+ uint8_t *idContext,\n+ uint8_t idContextLen,\nuint8_t algorithm,\noscore_derivation_t type,\nuint8_t length\n@@ -462,13 +464,18 @@ owerror_t hkdf_derive_parameter(uint8_t *buffer,\nconst uint8_t iv[] = \"IV\";\nconst uint8_t key[] = \"Key\";\n- uint8_t info[20];\n+ uint8_t info[INFO_MAX_LEN];\nuint8_t infoLen;\nuint8_t ret;\ninfoLen = 0;\n- infoLen += cborencoder_put_array(&info[infoLen], 4);\n+ infoLen += cborencoder_put_array(&info[infoLen], 5);\ninfoLen += cborencoder_put_bytes(&info[infoLen], identifier, identifierLen);\n+ if (idContextLen && idContext) {\n+ infoLen += cborencoder_put_bytes(&info[infoLen], idContext, idContextLen);\n+ } else {\n+ infoLen += cborencoder_put_null(&info[infoLen]);\n+ }\ninfoLen += cborencoder_put_unsigned(&info[infoLen], algorithm);\nif (type == OSCOAP_DERIVATION_TYPE_KEY) {\n"
},
{
"change_type": "MODIFY",
"old_path": "openweb/opencoap/oscore.h",
"new_path": "openweb/opencoap/oscore.h",
"diff": "@@ -44,6 +44,8 @@ void oscore_init_security_context(oscore_security_context_t *ctx,\nuint8_t senderIDLen,\nuint8_t *recipientID,\nuint8_t recipientIDLen,\n+ uint8_t *idContext,\n+ uint8_t idContextLen,\nuint8_t *masterSecret,\nuint8_t masterSecretLen,\nuint8_t *masterSalt,\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-880. Update security context and its derivation.
|
491,609 |
03.06.2020 11:40:18
| -7,200 |
8a519e951fb8d3e95a4931cfbf63331c03abff7d
|
Update external AAD construct.
|
[
{
"change_type": "MODIFY",
"old_path": "openweb/opencoap/oscore.c",
"new_path": "openweb/opencoap/oscore.c",
"diff": "@@ -34,15 +34,13 @@ bool is_request(uint8_t code);\nuint8_t oscore_construct_aad(uint8_t *buffer,\nuint8_t version,\n- uint8_t code,\n- uint8_t *optionsSerialized,\n- uint8_t optionsSerializedLen,\nuint8_t aeadAlgorithm,\nuint8_t *requestKid,\nuint8_t requestKidLen,\nuint8_t *requestSeq,\n- uint8_t requestSeqLen\n-);\n+ uint8_t requestSeqLen,\n+ uint8_t *optionsSerialized,\n+ uint8_t optionsSerializedLen);\nvoid oscore_encode_compressed_COSE(OpenQueueEntry_t *msg,\nuint8_t *requestSeq, uint8_t requestSeqLen,\n@@ -210,14 +208,13 @@ owerror_t oscore_protect_message(\naadLen = oscore_construct_aad(aad,\nversion,\n- code,\n- NULL,\n- 0, // do not support Class I options at the moment\nAES_CCM_16_64_128,\nrequestKid,\nrequestKidLen,\nrequestSeq,\n- requestSeqLen);\n+ requestSeqLen,\n+ NULL,\n+ 0); // do not support Class I options at the moment\nif (aadLen > AAD_MAX_LEN) {\n// corruption\n@@ -338,14 +335,13 @@ owerror_t oscore_unprotect_message(\naadLen = oscore_construct_aad(aad,\nversion,\n- code,\n- NULL,\n- 0, // do not support Class I options at the moment\nAES_CCM_16_64_128,\nrequestKid,\nrequestKidLen,\nrequestSeq,\n- requestSeqLen);\n+ requestSeqLen,\n+ NULL,\n+ 0); // do not support Class I options at the moment\nif (aadLen > AAD_MAX_LEN) {\n// corruption\n@@ -509,14 +505,13 @@ bool is_request(uint8_t code) {\nuint8_t oscore_construct_aad(uint8_t *buffer,\nuint8_t version,\n- uint8_t code,\n- uint8_t *optionsSerialized,\n- uint8_t optionsSerializedLen,\nuint8_t aeadAlgorithm,\nuint8_t *requestKid,\nuint8_t requestKidLen,\nuint8_t *requestSeq,\n- uint8_t requestSeqLen\n+ uint8_t requestSeqLen,\n+ uint8_t *optionsSerialized,\n+ uint8_t optionsSerializedLen\n) {\nuint8_t externalAAD[EAAD_MAX_LEN];\nuint8_t externalAADLen;\n@@ -526,13 +521,13 @@ uint8_t oscore_construct_aad(uint8_t *buffer,\nret = 0;\nexternalAADLen = 0;\n- externalAADLen += cborencoder_put_array(&externalAAD[externalAADLen], 6);\n+ externalAADLen += cborencoder_put_array(&externalAAD[externalAADLen], 5);\nexternalAADLen += cborencoder_put_unsigned(&externalAAD[externalAADLen], version);\n- externalAADLen += cborencoder_put_unsigned(&externalAAD[externalAADLen], code);\n- externalAADLen += cborencoder_put_bytes(&externalAAD[externalAADLen], optionsSerialized, optionsSerializedLen);\n+ externalAADLen += cborencoder_put_array(&externalAAD[externalAADLen], 1);\nexternalAADLen += cborencoder_put_unsigned(&externalAAD[externalAADLen], aeadAlgorithm);\nexternalAADLen += cborencoder_put_bytes(&externalAAD[externalAADLen], requestKid, requestKidLen);\nexternalAADLen += cborencoder_put_bytes(&externalAAD[externalAADLen], requestSeq, requestSeqLen);\n+ externalAADLen += cborencoder_put_bytes(&externalAAD[externalAADLen], optionsSerialized, optionsSerializedLen);\nif (externalAADLen > EAAD_MAX_LEN) {\n// corruption\n"
}
] |
C
|
BSD 3-Clause New or Revised License
|
openwsn-berkeley/openwsn-fw
|
FW-880. Update external AAD construct.
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.