From e5422404ffbec9d87d6bceded24a557b3e4d190c Mon Sep 17 00:00:00 2001 From: Martine Lenders Date: Tue, 15 Mar 2016 23:52:49 +0100 Subject: [PATCH] fixup! tests: modify driver_at86rf2xx for pure netdev2 [ci skip] [ci skip] [ci skip] --- tests/driver_at86rf2xx/main.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/driver_at86rf2xx/main.c b/tests/driver_at86rf2xx/main.c index f5ec88ddc552..e269fbd72182 100644 --- a/tests/driver_at86rf2xx/main.c +++ b/tests/driver_at86rf2xx/main.c @@ -93,11 +93,13 @@ int main(void) for (unsigned i = 0; i < AT86RF2XX_NUM; i++) { const at86rf2xx_params_t *p = &at86rf2xx_params[i]; + netdev2_t *dev = (netdev2_t *)(&devs[i]); + printf("Initializing AT86RF2xx radio at SPI_%d\n", p->spi); at86rf2xx_setup(&devs[i], p->spi, p->spi_speed, p->cs_pin, p->int_pin, p->sleep_pin, p->reset_pin); - devs[i].driver->init((netdev2_t *)&devs[i]); - devs[i].event_callback = _event_cb; + dev->driver->init(dev); + dev->event_callback = _event_cb; } _recv_pid = thread_create(stack, sizeof(stack), THREAD_PRIORITY_MAIN - 1,