Skip to content

Commit

Permalink
pkg/openthread: set event callback before netdev init
Browse files Browse the repository at this point in the history
When using openthread with the ieee802154_submac module, a hard fault is
triggered otherwise because the submac's init function calls the
event_handler callback.
  • Loading branch information
bergzand committed May 4, 2023
1 parent 26c61be commit c2e377d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/openthread/contrib/netdev/openthread_netdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ static void *_openthread_event_loop(void *arg)

event_queue_init(&ev_queue);

netdev->driver->init(netdev);
netdev->event_callback = _event_cb;
netdev->driver->init(netdev);

netopt_enable_t enable = NETOPT_ENABLE;
netdev->driver->set(netdev, NETOPT_TX_END_IRQ, &enable, sizeof(enable));
Expand Down

0 comments on commit c2e377d

Please sign in to comment.