[riot-notifications] [RIOT-OS/RIOT] netdev_test_ieee802154: initial import of an IEEE 802.15.4 device mock (#16020)

Martine Lenders notifications at github.com
Tue May 4 12:06:34 CEST 2021

@miri64 commented on this pull request.

> +    (void)value;
+    (void)max_len;
+    return -ENOTSUP;
+void netdev_test_ieee802154_setup(netdev_test_ieee802154_t *netdev, void *state,
+                                  const eui64_t *eui64)
+    netdev_test_setup(&netdev->netdev, state);
+    mutex_lock(&netdev->netdev.mutex);
+    if (eui64 != NULL) {
+        memcpy(&netdev->eui64, eui64, sizeof(netdev->eui64));
+    }
+    else {
+        netdev_eui64_get((netdev_t *)netdev, &netdev->eui64);

It goes much deeper since `netdev_test_ieee802154_t` is a subclass of `netdev_test_t` which is a subclass of `netdev_ieee802154_t` which is a subclass of `netdev_t` (see https://github.com/RIOT-OS/RIOT/pull/16020/commits/456c2095b8a824bcd33c8d56b79ffeaa9e27c1bc). If that is too deep and we decide to rather go for the cast, we can still revert https://github.com/RIOT-OS/RIOT/pull/16020/commits/456c2095b8a824bcd33c8d56b79ffeaa9e27c1bc.

You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210504/d2b57830/attachment.htm>

More information about the notifications mailing list