diff options
author | Johann F <j.fischer@phytec.de> | 2016-11-16 23:07:23 +0100 |
---|---|---|
committer | Jukka Rissanen <jukka.rissanen@linux.intel.com> | 2017-01-27 12:35:51 +0200 |
commit | 12306df1ad93d1a875deb2b65d07db902c748f20 (patch) | |
tree | c39c02bd681febea32d3ab2aade0c2ccdeec541d /samples | |
parent | fcf27119a7ec31891fb9a1c41aaf32b618852621 (diff) |
samples: ieee802154: add MCR20A
Add MCR20A to 802154 driver test application.
Change-Id: I18d4178668542c1da197d5a2b3b0b502c9b128c1
Signed-off-by: Johann Fischer <j.fischer@phytec.de>
Diffstat (limited to 'samples')
-rw-r--r-- | samples/net/ieee802154/hw/prj_mcr20a.conf | 47 | ||||
-rw-r--r-- | samples/net/ieee802154/hw/src/ieee802154_test.c | 13 |
2 files changed, 57 insertions, 3 deletions
diff --git a/samples/net/ieee802154/hw/prj_mcr20a.conf b/samples/net/ieee802154/hw/prj_mcr20a.conf new file mode 100644 index 000000000..759538b13 --- /dev/null +++ b/samples/net/ieee802154/hw/prj_mcr20a.conf @@ -0,0 +1,47 @@ +CONFIG_SPI=y +CONFIG_SYS_LOG_SPI_LEVEL=1 + +CONFIG_NETWORKING=y +CONFIG_TEST_RANDOM_GENERATOR=y + +CONFIG_NET_NBUF_RX_COUNT=6 +CONFIG_NET_NBUF_TX_COUNT=6 +CONFIG_NET_NBUF_DATA_COUNT=10 + +CONFIG_NET_IPV4=n +CONFIG_NET_IPV6=y +CONFIG_NET_IPV6_RA_RDNSS=y +#CONFIG_NET_IPV6_NO_ND=y +#CONFIG_NET_IPV6_NO_DAD=y +CONFIG_NET_IF_UNICAST_IPV6_ADDR_COUNT=2 + +CONFIG_NET_6LO=y +CONFIG_NET_DEBUG_6LO=y + +CONFIG_NET_LOG=y +CONFIG_SYS_LOG_NET_LEVEL=1 +CONFIG_SYS_LOG_SHOW_COLOR=y +CONFIG_INIT_STACKS=y +CONFIG_PRINTK=y + +CONFIG_NET_DEBUG_CORE=y +CONFIG_NET_DEBUG_IPV6_NBR_CACHE=y +CONFIG_NET_DEBUG_IPV6=y +CONFIG_NET_DEBUG_CONTEXT=y +CONFIG_NET_DEBUG_NET_BUF=y +CONFIG_NET_DEBUG_UTILS=y +CONFIG_NET_DEBUG_IF=y +CONFIG_NET_DEBUG_ICMPV6=y +CONFIG_NET_DEBUG_CONN=y +CONFIG_NET_STATISTICS=y + +CONFIG_NET_L2_IEEE802154=y +CONFIG_NET_DEBUG_L2_IEEE802154=y +CONFIG_NET_L2_IEEE802154_RFD=y +CONFIG_NET_L2_IEEE802154_FRAGMENT=y +#CONFIG_NET_DEBUG_L2_IEEE802154_FRAGMENT=y + +CONFIG_NXP_MCR20A=y +CONFIG_SYS_LOG_IEEE802154_DRIVER_LEVEL=1 + +CONFIG_NET_L2_IEEE802154_SHELL=y diff --git a/samples/net/ieee802154/hw/src/ieee802154_test.c b/samples/net/ieee802154/hw/src/ieee802154_test.c index f1eed4080..6bfe55fc9 100644 --- a/samples/net/ieee802154/hw/src/ieee802154_test.c +++ b/samples/net/ieee802154/hw/src/ieee802154_test.c @@ -15,6 +15,13 @@ #include <misc/printk.h> #define PRINT printk +#ifdef CONFIG_TI_CC2520_DRV_NAME +#define IEEE802154_DRV_NAME CONFIG_TI_CC2520_DRV_NAME +#endif +#ifdef CONFIG_NXP_MCR20A_DRV_NAME +#define IEEE802154_DRV_NAME CONFIG_NXP_MCR20A_DRV_NAME +#endif + #ifndef CONFIG_NET_L2_IEEE802154_SHELL static struct ieee802154_req_params scan_ctx; @@ -56,15 +63,15 @@ static struct net_if *init_device(void) struct net_if *iface; struct device *dev; - dev = device_get_binding(CONFIG_TI_CC2520_DRV_NAME); + dev = device_get_binding(IEEE802154_DRV_NAME); if (!dev) { - PRINT("Cannot get CC250 device\n"); + PRINT("Cannot get device binding\n"); return NULL; } iface = net_if_lookup_by_dev(dev); if (!iface) { - PRINT("Cannot get CC2520 network interface\n"); + PRINT("Cannot get 802.15.4 network interface\n"); return NULL; } |