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

tests/cc2538_rf: set event_callback before init

This commit is contained in:
Jose Alamos 2022-10-14 16:06:29 +02:00
parent 5d5e8d6163
commit f259292df9
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(&cc2538_rf);
/* set the application-provided callback */
netdev->event_callback = cb;
/* setup and initialize the specific driver */
cc2538_rf_hal_setup(&cc2538_rf.submac.dev);
cc2538_init();
/* set the application-provided callback */
netdev->event_callback = cb;
/* initialize the device driver */
int res = netdev->driver->init(netdev);
if (res != 0) {