mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
auto_init/loramac: avoid explicit cast to netdev
This commit is contained in:
parent
513b13b8de
commit
eebf5de051
@ -48,13 +48,13 @@ void auto_init_loramac(void)
|
|||||||
{
|
{
|
||||||
#if IS_USED(MODULE_SX127X)
|
#if IS_USED(MODULE_SX127X)
|
||||||
sx127x_setup(&sx127x, &sx127x_params[0], 0);
|
sx127x_setup(&sx127x, &sx127x_params[0], 0);
|
||||||
loramac.netdev = (netdev_t *)&sx127x;
|
loramac.netdev = &sx127x.netdev;
|
||||||
loramac.netdev->driver = &sx127x_driver;
|
loramac.netdev->driver = &sx127x_driver;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if IS_USED(MODULE_SX126X)
|
#if IS_USED(MODULE_SX126X)
|
||||||
sx126x_setup(&sx126x, &sx126x_params[0], 0);
|
sx126x_setup(&sx126x, &sx126x_params[0], 0);
|
||||||
loramac.netdev = (netdev_t *)&sx126x;
|
loramac.netdev = &sx126x.netdev;
|
||||||
loramac.netdev->driver = &sx126x_driver;
|
loramac.netdev->driver = &sx126x_driver;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user