1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2026-01-01 01:41:18 +01:00

tests/ieee802154_hal: add nrf802154

This commit is contained in:
Jose Alamos 2020-08-20 10:33:44 +02:00
parent 377560f5cc
commit d523ae35a4
2 changed files with 30 additions and 3 deletions

View File

@ -1,12 +1,22 @@
include ../Makefile.tests_common
BOARD_WHITELIST := cc2538dk \
BOARD_WHITELIST := \
adafruit-clue \
adafruit-itsybitsy-nrf52 \
arduino-nano-33-ble \
cc2538dk \
feather-nrf52840 \
nrf52840dk \
nrf52840dongle \
nrf52840-mdk \
omote \
openmote-b \
openmote-cc2538 \
reel \
remote-pa \
remote-reva \
remote-revb
remote-revb \
#
DISABLE_MODULE += auto_init_at86rf2xx auto_init_nrf802154

View File

@ -26,11 +26,20 @@
#include "cc2538_rf.h"
#endif
#ifdef MODULE_NRF802154
#include "nrf802154.h"
#endif
#ifdef MODULE_CC2538_RF
extern ieee802154_dev_t cc2538_rf_dev;
#endif
#define RADIOS_NUMOF IS_USED(MODULE_CC2538_RF)
#ifdef MODULE_NRF802154
extern ieee802154_dev_t nrf802154_hal_dev;
#endif
#define RADIOS_NUMOF IS_USED(MODULE_CC2538_RF) + \
IS_USED(MODULE_NRF802154)
#if RADIOS_NUMOF == 0
#error "Radio is not supported"
@ -46,6 +55,10 @@ static void _register_radios(void)
_radios[i++] = &cc2538_rf_dev;
#endif
#ifdef MODULE_NRF802154
_radios[i++] = &nrf802154_hal_dev;
#endif
assert(i == RADIOS_NUMOF);
}
@ -59,6 +72,10 @@ void ieee802154_hal_test_init_devs(void)
#ifdef MODULE_CC2538_RF
cc2538_init();
#endif
#ifdef MODULE_NRF802154
nrf802154_init();
#endif
}
ieee802154_dev_t *ieee802154_hal_test_get_dev(int id)