[riot-notifications] [RIOT-OS/RIOT] drivers/nrf24l01p: Netdev driver for nrf24l01p (#13743)

benpicco notifications at github.com
Sun May 3 18:06:22 CEST 2020


@benpicco commented on this pull request.



> +    if (nrf24l01p_ng_acquire(dev) < 0) {
+        DEBUG("[nrf24l01p_ng] _init(): nrf24l01p_ng_acquire() failed\n");
+        return -EIO;
+    }
+    if (dev->state != NRF24L01P_NG_STATE_POWER_DOWN) {
+        nrf24l01p_ng_transition_to_power_down(dev);
+    }
+    nrf24l01p_ng_flush_tx(dev);
+    nrf24l01p_ng_flush_rx(dev);
+    uint8_t addr_size = NRF24L01P_NG_ADDR_WIDTH;
+    uint8_t pipes = 0;
+    uint8_t cnt = 1; /* counter assures that the LSB is different
+                        for all pipe addresses*/
+    uint8_t addr_p0[] = NRF24L01P_NG_L2ADDR_AUTO;
+    if (!memcmp(dev->params.urxaddr.rxaddrpx.rx_p0, addr_p0, addr_size)) {
+        luid_base(dev->params.urxaddr.rxaddrpx.rx_p0, addr_size);

But what is this doing? luid apparently isn't used to generate unique addresses, so what does this do - please add a comment.

-- 
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/13743#discussion_r419123833
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20200503/83a990ad/attachment.htm>


More information about the notifications mailing list