From f259292df9c6f1a32675ecc61966e12b988e431d Mon Sep 17 00:00:00 2001 From: Jose Alamos Date: Fri, 14 Oct 2022 16:06:29 +0200 Subject: [PATCH] tests/cc2538_rf: set event_callback before init --- tests/driver_cc2538_rf/main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/driver_cc2538_rf/main.c b/tests/driver_cc2538_rf/main.c index aa85f91c71..bc9bc6f104 100644 --- a/tests/driver_cc2538_rf/main.c +++ b/tests/driver_cc2538_rf/main.c @@ -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) {