mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
gnrc_netif/auto_init_*: avoid explicit cast to netdev
This commit is contained in:
parent
bd0d03eb10
commit
5e3f7e35f1
@ -57,17 +57,17 @@ void auto_init_at86rf2xx(void)
|
||||
gnrc_netif_gomach_create(&_netif[i], _at86rf2xx_stacks[i],
|
||||
AT86RF2XX_MAC_STACKSIZE,
|
||||
AT86RF2XX_MAC_PRIO, "at86rf2xx-gomach",
|
||||
(netdev_t *)&at86rf2xx_devs[i]);
|
||||
&at86rf2xx_devs[i].netdev.netdev);
|
||||
#elif defined(MODULE_GNRC_LWMAC)
|
||||
gnrc_netif_lwmac_create(&_netif[i], _at86rf2xx_stacks[i],
|
||||
AT86RF2XX_MAC_STACKSIZE,
|
||||
AT86RF2XX_MAC_PRIO, "at86rf2xx-lwmac",
|
||||
(netdev_t *)&at86rf2xx_devs[i]);
|
||||
&at86rf2xx_devs[i].netdev.netdev);
|
||||
#else
|
||||
gnrc_netif_ieee802154_create(&_netif[i], _at86rf2xx_stacks[i],
|
||||
AT86RF2XX_MAC_STACKSIZE,
|
||||
AT86RF2XX_MAC_PRIO, "at86rf2xx",
|
||||
(netdev_t *)&at86rf2xx_devs[i]);
|
||||
&at86rf2xx_devs[i].netdev.netdev);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
@ -63,7 +63,7 @@ void auto_init_atwinc15x0(void)
|
||||
gnrc_netif_ethernet_create(&_netif[i], stack[i],
|
||||
ATWINC15X0_MAC_STACKSIZE,
|
||||
ATWINC15X0_MAC_PRIO, "atwinc15x0",
|
||||
(netdev_t *)&dev[i]);
|
||||
&dev[i].netdev);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -75,7 +75,7 @@ void auto_init_cc110x(void)
|
||||
|
||||
cc110x_setup(&_cc110x_devs[i], &cc110x_params[i], i);
|
||||
gnrc_netif_cc1xxx_create(&_netif[i], stacks[i], CC110X_MAC_STACKSIZE, CC110X_MAC_PRIO,
|
||||
"cc110x", (netdev_t *)&_cc110x_devs[i]);
|
||||
"cc110x", &_cc110x_devs[i].netdev);
|
||||
}
|
||||
}
|
||||
/** @} */
|
||||
|
@ -60,7 +60,7 @@ void auto_init_cc2420(void)
|
||||
cc2420_setup(&cc2420_devs[i], &cc2420_params[i], i);
|
||||
gnrc_netif_ieee802154_create(&_netif[i], _cc2420_stacks[i], CC2420_MAC_STACKSIZE,
|
||||
CC2420_MAC_PRIO, "cc2420",
|
||||
(netdev_t *)&cc2420_devs[i]);
|
||||
&cc2420_devs[i].netdev.netdev);
|
||||
}
|
||||
}
|
||||
/** @} */
|
||||
|
@ -44,6 +44,6 @@ void auto_init_cc2538_rf(void)
|
||||
gnrc_netif_ieee802154_create(&_netif, _cc2538_rf_stack,
|
||||
CC2538_MAC_STACKSIZE,
|
||||
CC2538_MAC_PRIO, "cc2538_rf",
|
||||
(netdev_t *)&cc2538_rf_dev);
|
||||
&cc2538_rf_dev.netdev.dev.netdev);
|
||||
}
|
||||
/** @} */
|
||||
|
@ -46,7 +46,7 @@ void auto_init_dose(void)
|
||||
|
||||
dose_setup(&dose[i], &dose_params[i], i);
|
||||
gnrc_netif_ethernet_create(&_netif[i], _netdev_eth_stack[i], DOSE_MAC_STACKSIZE,
|
||||
DOSE_MAC_PRIO, "dose", (netdev_t *)&dose[i]);
|
||||
DOSE_MAC_PRIO, "dose", &dose[i].netdev);
|
||||
}
|
||||
}
|
||||
/** @} */
|
||||
|
@ -63,7 +63,7 @@ void auto_init_enc28j60(void)
|
||||
enc28j60_setup(&dev[i], &enc28j60_params[i], i);
|
||||
gnrc_netif_ethernet_create(&_netif[i], stack[i], ENC28J60_MAC_STACKSIZE,
|
||||
ENC28J60_MAC_PRIO, "enc28j60",
|
||||
(netdev_t *)&dev[i]);
|
||||
&dev[i].netdev);
|
||||
}
|
||||
}
|
||||
/** @} */
|
||||
|
@ -53,6 +53,6 @@ void auto_init_encx24j600(void)
|
||||
/* initialize netdev<->gnrc adapter state */
|
||||
gnrc_netif_ethernet_create(&_netif, _netdev_eth_stack, ENCX24J600_MAC_STACKSIZE,
|
||||
ENCX24J600_MAC_PRIO, "encx24j600",
|
||||
(netdev_t *)&encx24j600);
|
||||
&encx24j600.netdev);
|
||||
}
|
||||
/** @} */
|
||||
|
@ -59,7 +59,7 @@ void auto_init_ethos(void)
|
||||
|
||||
/* initialize netdev<->gnrc adapter state */
|
||||
gnrc_netif_ethernet_create(&_netif[i], _netdev_eth_stack[i], ETHOS_MAC_STACKSIZE,
|
||||
ETHOS_MAC_PRIO, "ethos", (netdev_t *)ðos[i]);
|
||||
ETHOS_MAC_PRIO, "ethos", ðos[i].netdev);
|
||||
}
|
||||
}
|
||||
/** @} */
|
||||
|
@ -54,7 +54,7 @@ void auto_init_kw2xrf(void)
|
||||
kw2xrf_setup(&kw2xrf_devs[i], (kw2xrf_params_t*) p);
|
||||
gnrc_netif_ieee802154_create(&_netif[i], _kw2xrf_stacks[i], KW2XRF_MAC_STACKSIZE,
|
||||
KW2XRF_MAC_PRIO, "kw2xrf",
|
||||
(netdev_t *)&kw2xrf_devs[i]);
|
||||
&kw2xrf_devs[i].netdev.netdev);
|
||||
}
|
||||
}
|
||||
/** @} */
|
||||
|
@ -62,15 +62,15 @@ void auto_init_kw41zrf(void)
|
||||
#if defined(MODULE_GNRC_GOMACH)
|
||||
gnrc_netif_gomach_create(&_netif[i], _kw41zrf_stacks[i], KW41ZRF_NETIF_STACKSIZE,
|
||||
KW41ZRF_NETIF_PRIO, "kw41zrf-gomach",
|
||||
(netdev_t *)&kw41zrf_devs[i]);
|
||||
&kw41zrf_devs[i].netdev.netdev);
|
||||
#elif defined(MODULE_GNRC_LWMAC)
|
||||
gnrc_netif_lwmac_create(&_netif[i], _kw41zrf_stacks[i], KW41ZRF_NETIF_STACKSIZE,
|
||||
KW41ZRF_NETIF_PRIO, "kw41zrf-lwmac",
|
||||
(netdev_t *)&kw41zrf_devs[i]);
|
||||
&kw41zrf_devs[i].netdev.netdev);
|
||||
#else
|
||||
gnrc_netif_ieee802154_create(&_netif[i], _kw41zrf_stacks[i], KW41ZRF_NETIF_STACKSIZE,
|
||||
KW41ZRF_NETIF_PRIO, "kw41zrf",
|
||||
(netdev_t *)&kw41zrf_devs[i]);
|
||||
&kw41zrf_devs[i].netdev.netdev);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
@ -51,7 +51,7 @@ void auto_init_mrf24j40(void)
|
||||
gnrc_netif_ieee802154_create(&_netif[i], _mrf24j40_stacks[i],
|
||||
MRF24J40_MAC_STACKSIZE, MRF24J40_MAC_PRIO,
|
||||
"mrf24j40",
|
||||
(netdev_t *)&mrf24j40_devs[i]);
|
||||
&mrf24j40_devs[i].netdev.netdev);
|
||||
}
|
||||
}
|
||||
/** @} */
|
||||
|
@ -77,7 +77,7 @@ void auto_init_nrf24l01p_ng(void)
|
||||
NRF24L01P_NG_MAC_STACKSIZE,
|
||||
NRF24L01P_NG_MAC_PRIO,
|
||||
"nrf24l01p_ng",
|
||||
(netdev_t *)&_nrf24l01p_ng_devs[i]);
|
||||
&_nrf24l01p_ng_devs[i].netdev);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -48,6 +48,6 @@ void auto_init_nrf802154(void)
|
||||
gnrc_netif_ieee802154_create(&_netif, _stack,
|
||||
NRF802154_MAC_STACKSIZE,
|
||||
NRF802154_MAC_PRIO, "nrf802154",
|
||||
(netdev_t *)&nrf802154_dev);
|
||||
&nrf802154_dev.netdev.dev.netdev);
|
||||
}
|
||||
/** @} */
|
||||
|
@ -51,7 +51,7 @@ void auto_init_slipdev(void)
|
||||
slipdev_setup(&slipdevs[i], p, i);
|
||||
gnrc_netif_raw_create(&_netif[i], _slipdev_stacks[i], SLIPDEV_STACKSIZE,
|
||||
SLIPDEV_PRIO, "slipdev",
|
||||
(netdev_t *)&slipdevs[i]);
|
||||
&slipdevs[i].netdev);
|
||||
}
|
||||
}
|
||||
/** @} */
|
||||
|
@ -50,7 +50,7 @@ void auto_init_socket_zep(void)
|
||||
gnrc_netif_ieee802154_create(&_netif[i], _socket_zep_stacks[i],
|
||||
SOCKET_ZEP_MAC_STACKSIZE,
|
||||
SOCKET_ZEP_MAC_PRIO, "socket_zep",
|
||||
(netdev_t *)&_socket_zeps[i]);
|
||||
&_socket_zeps[i].netdev.netdev);
|
||||
}
|
||||
}
|
||||
/** @} */
|
||||
|
@ -59,12 +59,12 @@ void auto_init_sx126x(void)
|
||||
|
||||
gnrc_netif_lorawan_create(&_netif[i], sx126x_stacks[i],
|
||||
SX126X_STACKSIZE, SX126X_PRIO,
|
||||
"sx126x", (netdev_t *)&sx126x_devs[i]);
|
||||
"sx126x", &sx126x_devs[i].netdev);
|
||||
}
|
||||
else {
|
||||
gnrc_netif_raw_create(&_netif[i], sx126x_stacks[i],
|
||||
SX126X_STACKSIZE, SX126X_PRIO,
|
||||
"sx126x", (netdev_t *)&sx126x_devs[i]);
|
||||
"sx126x", &sx126x_devs[i].netdev);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -64,12 +64,12 @@ void auto_init_sx127x(void)
|
||||
|
||||
gnrc_netif_lorawan_create(&_netif[i], sx127x_stacks[i],
|
||||
SX127X_STACKSIZE, SX127X_PRIO,
|
||||
"sx127x", (netdev_t *)&sx127x_devs[i]);
|
||||
"sx127x", &sx127x_devs[i].netdev);
|
||||
}
|
||||
else {
|
||||
gnrc_netif_raw_create(&_netif[i], sx127x_stacks[i],
|
||||
SX127X_STACKSIZE, SX127X_PRIO,
|
||||
"sx127x", (netdev_t *)&sx127x_devs[i]);
|
||||
"sx127x", &sx127x_devs[i].netdev);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -59,7 +59,7 @@ void auto_init_w5100(void)
|
||||
w5100_setup(&dev[i], &w5100_params[i]);
|
||||
/* initialize netdev <-> gnrc adapter state */
|
||||
gnrc_netif_ethernet_create(&_netif[i], stack[i], MAC_STACKSIZE, MAC_PRIO, "w5100",
|
||||
(netdev_t *)&dev[i]);
|
||||
&dev[i].nd);
|
||||
}
|
||||
}
|
||||
/** @} */
|
||||
|
Loading…
Reference in New Issue
Block a user