[riot-notifications] [RIOT-OS/RIOT] pkg/openwsn: re-integrate the network stack as a package (#13824)

Francisco notifications at github.com
Tue May 19 10:45:25 CEST 2020


@fjmolinas commented on this pull request.



> +#include "net/ieee802154.h"
+
+extern openwsn_radio_t openwsn_radio;
+
+void eui64_get(uint8_t *addressToWrite)
+{
+    eui64_t eui64;
+
+    if (openwsn_radio.dev->driver->get(openwsn_radio.dev, NETOPT_ADDRESS_LONG,
+                                       &eui64,
+                                       sizeof(eui64_t)) == sizeof(eui64_t)) {
+        memcpy(addressToWrite, eui64.uint8, sizeof(eui64.uint8));
+    }
+    else {
+        /* Use your code as a fallback or print an error message here */
+        luid_get((void *)addressToWrite, IEEE802154_LONG_ADDRESS_LEN);

Wrong cast, but there is still a type conflict if not casted to `(eui64_t *)`, I did that.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/13824#discussion_r427132667
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20200519/69e9d154/attachment.htm>


More information about the notifications mailing list