mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
openthread/cc2538_rf: add support for CC2538 radios
This commit is contained in:
parent
edc4d1df34
commit
48a65d2617
@ -4,7 +4,22 @@ APPLICATION = openthread
|
||||
BOARD ?= samr21-xpro
|
||||
|
||||
# These are the boards that OpenThread stack has been tested on
|
||||
BOARD_WHITELIST := samr21-xpro iotlab-m3 fox iotlab-a8-m3 frdm-kw41z openlabs-kw41z-mini-256kib openlabs-kw41z-mini phynode-kw41z usb-kw41z
|
||||
BOARD_WHITELIST := \
|
||||
samr21-xpro \
|
||||
iotlab-m3 \
|
||||
fox \
|
||||
iotlab-a8-m3 \
|
||||
frdm-kw41z \
|
||||
openlabs-kw41z-mini-256kib \
|
||||
openlabs-kw41z-mini \
|
||||
phynode-kw41z \
|
||||
usb-kw41z \
|
||||
cc2538dk \
|
||||
remote-reva \
|
||||
remote-revb \
|
||||
omote \
|
||||
openmote-cc2538 \
|
||||
#
|
||||
|
||||
# This has to be the absolute path to the RIOT base directory:
|
||||
RIOTBASE ?= $(CURDIR)/../..
|
||||
|
@ -4,4 +4,9 @@ USEMODULE += openthread_contrib_netdev
|
||||
USEMODULE += l2util
|
||||
USEMODULE += xtimer
|
||||
USEMODULE += event
|
||||
|
||||
ifneq (,$(filter cc2538_rf,$(USEMODULE)))
|
||||
USEMODULE += netdev_ieee802154_submac
|
||||
endif
|
||||
|
||||
FEATURES_REQUIRED += cpp
|
||||
|
@ -34,6 +34,10 @@
|
||||
#include "kw41zrf.h"
|
||||
#endif
|
||||
|
||||
#ifdef MODULE_CC2538_RF
|
||||
#include "cc2538_rf.h"
|
||||
#endif
|
||||
|
||||
#define ENABLE_DEBUG (0)
|
||||
#include "debug.h"
|
||||
|
||||
@ -45,6 +49,10 @@
|
||||
#define OPENTHREAD_NETIF_NUMOF (1U)
|
||||
#endif
|
||||
|
||||
#ifdef MODULE_CC2538_RF
|
||||
static cc2538_rf_t cc2538_rf_dev;
|
||||
#endif
|
||||
|
||||
#ifdef MODULE_AT86RF2XX
|
||||
static at86rf2xx_t at86rf2xx_dev;
|
||||
#endif
|
||||
@ -71,6 +79,10 @@ void openthread_bootstrap(void)
|
||||
kw41zrf_setup(&kw41z_dev);
|
||||
netdev_t *netdev = (netdev_t *) &kw41z_dev;
|
||||
#endif
|
||||
#ifdef MODULE_CC2538_RF
|
||||
cc2538_setup(&cc2538_rf_dev);
|
||||
netdev_t *netdev = (netdev_t*) &cc2538_rf_dev;
|
||||
#endif
|
||||
|
||||
openthread_radio_init(netdev, tx_buf, rx_buf);
|
||||
openthread_netdev_init(ot_thread_stack, sizeof(ot_thread_stack), THREAD_PRIORITY_MAIN - 5, "openthread", netdev);
|
||||
|
Loading…
Reference in New Issue
Block a user