Skip to content

Commit

Permalink
examples/lorawan: avoid explicit cast to netdev
Browse files Browse the repository at this point in the history
  • Loading branch information
jia200x committed Jul 9, 2021
1 parent bfbbec3 commit e04d62a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/lorawan/main.c
Expand Up @@ -129,13 +129,13 @@ int main(void)
/* Initialize the radio driver */
#if IS_USED(MODULE_SX127X)
sx127x_setup(&sx127x, &sx127x_params[0], 0);
loramac.netdev = (netdev_t *)&sx127x;
loramac.netdev = &sx127x.netdev;
loramac.netdev->driver = &sx127x_driver;
#endif

#if IS_USED(MODULE_SX126X)
sx126x_setup(&sx126x, &sx126x_params[0], 0);
loramac.netdev = (netdev_t *)&sx126x;
loramac.netdev = &sx126x.netdev;
loramac.netdev->driver = &sx126x_driver;
#endif

Expand Down

0 comments on commit e04d62a

Please sign in to comment.