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

tests/socket_zep: set event_callback before init

This commit is contained in:
Jose Alamos 2022-10-14 16:07:19 +02:00
parent cfe8149c35
commit ca9461834f
No known key found for this signature in database
GPG Key ID: F483EB800EF89DD9

View File

@ -55,10 +55,10 @@ static void test_init(void)
printf("Initializing socket ZEP with (local: [%s]:%s, remote: [%s]:%s)\n",
p->local_addr, p->local_port, p->remote_addr, p->remote_port);
netdev_register(&_socket_zep_netdev.dev.netdev, NETDEV_SOCKET_ZEP, 0);
netdev->event_callback = _event_cb;
netdev_ieee802154_submac_init(&_socket_zep_netdev);
socket_zep_hal_setup(&_dev, &_socket_zep_netdev.submac.dev);
socket_zep_setup(&_dev, p);
netdev->event_callback = _event_cb;
expect(netdev->driver->init(netdev) >= 0);
_print_info(netdev);
}