mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-25 22:43:50 +01:00
pkg/lwip: add support for nrf802154
This commit is contained in:
parent
d69ef1367b
commit
b3620b35b8
@ -55,6 +55,10 @@
|
||||
#include "stm32_eth.h"
|
||||
#endif
|
||||
|
||||
#ifdef MODULE_NRF802154
|
||||
#include "nrf802154.h"
|
||||
#endif
|
||||
|
||||
#include "lwip.h"
|
||||
|
||||
#define ENABLE_DEBUG (0)
|
||||
@ -92,6 +96,10 @@
|
||||
#define LWIP_NETIF_NUMOF (1)
|
||||
#endif
|
||||
|
||||
#ifdef MODULE_NRF802154
|
||||
#define LWIP_NETIF_NUMOF (1)
|
||||
#endif
|
||||
|
||||
#ifdef LWIP_NETIF_NUMOF
|
||||
static struct netif netif[LWIP_NETIF_NUMOF];
|
||||
#endif
|
||||
@ -131,6 +139,10 @@ static netdev_t stm32_eth;
|
||||
extern void stm32_eth_netdev_setup(netdev_t *netdev);
|
||||
#endif
|
||||
|
||||
#ifdef MODULE_NRF802154
|
||||
extern netdev_ieee802154_t nrf802154_dev;
|
||||
#endif
|
||||
|
||||
void lwip_bootstrap(void)
|
||||
{
|
||||
/* TODO: do for every eligible netdev */
|
||||
@ -233,6 +245,12 @@ void lwip_bootstrap(void)
|
||||
return;
|
||||
}
|
||||
#endif /* MODULE_LWIP_IPV4 */
|
||||
#elif defined(MODULE_NRF802154)
|
||||
if (netif_add(&netif[0], &nrf802154_dev, lwip_netdev_init,
|
||||
tcpip_6lowpan_input) == NULL) {
|
||||
DEBUG("Could not add nrf802154 device\n");
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
if (netif[0].state != NULL) {
|
||||
/* state is set to a netdev_t in the netif_add() functions above */
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user