1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

pkg/openthread: set event callback before netdev init

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.
This commit is contained in:
Koen Zandberg 2023-05-04 18:25:16 +02:00
parent 26c61beda7
commit c2e377dcf3
No known key found for this signature in database
GPG Key ID: BA1718B37D79F51C

View File

@ -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));