1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-18 12:52:44 +01:00

tests/nrf802154: set event_callback before init

This commit is contained in:
Jose Alamos 2022-10-14 16:06:43 +02:00
parent f259292df9
commit 209f64ccb2
No known key found for this signature in database
GPG Key ID: F483EB800EF89DD9

View File

@ -36,13 +36,13 @@ int netdev_ieee802154_minimal_init_devs(netdev_event_cb_t cb) {
netdev_register(netdev, NETDEV_CC2538, 0);
netdev_ieee802154_submac_init(&nrf802154);
/* set the application-provided callback */
netdev->event_callback = cb;
/* setup and initialize the specific driver */
nrf802154_hal_setup(&nrf802154.submac.dev);
nrf802154_init();
/* set the application-provided callback */
netdev->event_callback = cb;
/* initialize the device driver */
int res = netdev->driver->init(netdev);
if (res != 0) {