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

fabian18 notifications at github.com
Mon May 4 11:52:02 CEST 2020


@fabian18 commented on this pull request.



> + * @brief   Statically allocate memory for interfaces
+ */
+static gnrc_netif_t _netif[NRF24L01P_NG_NUM];
+
+/**
+ * @brief   Statically allocate memory for the MAC layer thread(s)
+ */
+static char stacks[NRF24L01P_NG_NUM][NRF24L01P_NG_MAC_STACKSIZE];
+
+void auto_init_nrf24l01p_ng(void)
+{
+    for (unsigned i = 0; i < NRF24L01P_NG_NUM; i++) {
+        LOG_DEBUG("[auto_init_netif] initializing nrf24l01p #%u\n", i);
+
+        nrf24l01p_ng_setup(&_nrf24l01p_ng_devs[i], &nrf24l01p_ng_params[i]);
+        gnrc_netif_nrf24l01p_ng_create(&_netif[i], stacks[i],

Hi @benpicco,
first of all, thank you very much that you looked at the code and even ordered some modules.

I did this because there is also `gnrc_netif_cc1xxx_create()`. If I simply call `gnrc_netif_create()`,
then I need to make `nrf24l01p_ng_netif_ops` visible to `auto_init_nrf24l01p_ng`, which means that `nrf24l01p_ng_netif_ops` cannot longer live statically in `gnrc_netif_nrf24l01p_ng.c`.
I cannot use `gnrc_netif_ethernet_create()` or `gnrc_netif_ieee802154_create()` because those technologies do not apply to the nrf24l01+.


-- 
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_r419325216
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20200504/ed490ad0/attachment.htm>


More information about the notifications mailing list