[riot-notifications] [RIOT-OS/RIOT] cpu/nrf52/radio: initial support for nrf52's ieee802.15.4 radio (#10268)

Martine Lenders notifications at github.com
Tue Feb 26 17:08:03 CET 2019


miri64 requested changes on this pull request.



> +#define NRF802154_H
+
+#include "net/netdev/ieee802154.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @brief   Export the netdev device descriptor
+ */
+extern netdev_ieee802154_t nrf802154_dev;
+
+/**
+ * @brief   IEEE 802.15.4 radio timer configuration
+ * @note    this radio relies on a dedicated hardware timer to maintain IFS

Nit-pick: rather looks like a detailed description to me, so just drop the `@note`

> +#include "cpu.h"
+#include "luid.h"
+#include "mutex.h"
+
+#include "net/ieee802154.h"
+#include "periph/timer.h"
+#include "net/netdev/ieee802154.h"
+#include "nrf802154.h"
+
+#define ENABLE_DEBUG    (0)
+#include "debug.h"
+
+static const netdev_driver_t nrf802154_netdev_driver;
+
+netdev_ieee802154_t nrf802154_dev = {
+    {

Very elegant way to not require a set-up routine. ;-) Maybe we should adapt this for other drivers if applicable ;-).

> +
+netdev_ieee802154_t nrf802154_dev = {
+    {
+        .driver = &nrf802154_netdev_driver,
+        .event_callback = NULL,
+        .context = NULL,
+    },
+#ifdef MODULE_GNRC
+#ifdef MODULE_GNRC_SIXLOWPAN
+    .proto = GNRC_NETTYPE_SIXLOWPAN,
+#else
+    .proto = GNRC_NETTYPE_UNDEF,
+#endif
+#endif
+    .pan = IEEE802154_DEFAULT_PANID,
+    .short_addr = { 0, 0 },

Everything not mentioned here will be set to 0, so I suggest to leave the address parts out.

> @@ -32,14 +32,17 @@ extern "C" {
 #endif
 
 /**
- * @brief IEEE 802.15.4 address lengths

Any reason for these unrelated doc removals?

>  #ifndef IEEE802154_DEFAULT_TXPOWER
-#define IEEE802154_DEFAULT_TXPOWER          (0)
+#define IEEE802154_DEFAULT_TXPOWER          (0) /* in dBm */

This is already documented in the `@brief` you removed a few lines up ;-).

> @@ -37,7 +37,7 @@ USEMODULE += ps
 USEMODULE += saul_default
 
 BOARD_PROVIDES_NETIF := acd52832 airfy-beacon b-l072z-lrwan1 cc2538dk fox iotlab-m3 iotlab-a8-m3 mulle \
-        microbit native nrf51dk nrf51dongle nrf52dk nrf6310 openmote-cc2538 pba-d-01-kw2x \

Merge error to remove `nrf51dk`?

-- 
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/10268#pullrequestreview-208045836
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190226/5f8dbdbd/attachment-0001.html>


More information about the notifications mailing list