Merge branch 'ieee802154'
This commit is contained in:
commit
17e9a88d0d
@ -16,7 +16,7 @@ CONFIG_HOST_LINUX=y
|
|||||||
#
|
#
|
||||||
# Build Configuration
|
# Build Configuration
|
||||||
#
|
#
|
||||||
# CONFIG_APPS_DIR="../apps"
|
CONFIG_APPS_DIR="../apps"
|
||||||
CONFIG_BUILD_FLAT=y
|
CONFIG_BUILD_FLAT=y
|
||||||
# CONFIG_BUILD_2PASS is not set
|
# CONFIG_BUILD_2PASS is not set
|
||||||
|
|
||||||
@ -979,8 +979,7 @@ CONFIG_IOB_NCHAINS=0
|
|||||||
#
|
#
|
||||||
CONFIG_WIRELESS=y
|
CONFIG_WIRELESS=y
|
||||||
CONFIG_WIRELESS_IEEE802154=y
|
CONFIG_WIRELESS_IEEE802154=y
|
||||||
CONFIG_IEEE802154_MAC=y
|
CONFIG_IEEE802154_MAC_DEV=y
|
||||||
# CONFIG_IEEE802154_MAC_DEV is not set
|
|
||||||
CONFIG_MAC802154_HPWORK=y
|
CONFIG_MAC802154_HPWORK=y
|
||||||
CONFIG_IEEE802154_NTXDESC=3
|
CONFIG_IEEE802154_NTXDESC=3
|
||||||
CONFIG_IEEE802154_IND_PREALLOC=20
|
CONFIG_IEEE802154_IND_PREALLOC=20
|
||||||
@ -1163,10 +1162,10 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024
|
|||||||
CONFIG_EXAMPLES_NSH=y
|
CONFIG_EXAMPLES_NSH=y
|
||||||
CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y
|
CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y
|
||||||
# CONFIG_EXAMPLES_NULL is not set
|
# CONFIG_EXAMPLES_NULL is not set
|
||||||
# CONFIG_EXAMPLES_NX is not set
|
|
||||||
# CONFIG_EXAMPLES_NXFFS is not set
|
# CONFIG_EXAMPLES_NXFFS is not set
|
||||||
# CONFIG_EXAMPLES_NXHELLO is not set
|
# CONFIG_EXAMPLES_NXHELLO is not set
|
||||||
# CONFIG_EXAMPLES_NXIMAGE is not set
|
# CONFIG_EXAMPLES_NXIMAGE is not set
|
||||||
|
# CONFIG_EXAMPLES_NX is not set
|
||||||
# CONFIG_EXAMPLES_NXLINES is not set
|
# CONFIG_EXAMPLES_NXLINES is not set
|
||||||
# CONFIG_EXAMPLES_NXTERM is not set
|
# CONFIG_EXAMPLES_NXTERM is not set
|
||||||
# CONFIG_EXAMPLES_NXTEXT is not set
|
# CONFIG_EXAMPLES_NXTEXT is not set
|
||||||
@ -1371,7 +1370,7 @@ CONFIG_READLINE_ECHO=y
|
|||||||
#
|
#
|
||||||
# IEEE 802.15.4 applications
|
# IEEE 802.15.4 applications
|
||||||
#
|
#
|
||||||
# CONFIG_IEEE802154_LIBMAC is not set
|
CONFIG_IEEE802154_LIBMAC=y
|
||||||
CONFIG_IEEE802154_LIBUTILS=y
|
CONFIG_IEEE802154_LIBUTILS=y
|
||||||
CONFIG_IEEE802154_I8SAK=y
|
CONFIG_IEEE802154_I8SAK=y
|
||||||
CONFIG_IEEE802154_I8SAK_PRIORITY=100
|
CONFIG_IEEE802154_I8SAK_PRIORITY=100
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* configs/freedom-kl25z/src/stm32_mrf24j40.c
|
* configs/clicker2-stm32/src/stm32_mrf24j40.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2017 Gregory Nutt, All rights reserver
|
* Copyright (C) 2017 Gregory Nutt, All rights reserver
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
@ -220,9 +220,7 @@ static void stm32_enable_irq(FAR const struct mrf24j40_lower_s *lower,
|
|||||||
static int stm32_mrf24j40_devsetup(FAR struct stm32_priv_s *priv)
|
static int stm32_mrf24j40_devsetup(FAR struct stm32_priv_s *priv)
|
||||||
{
|
{
|
||||||
FAR struct ieee802154_radio_s *radio;
|
FAR struct ieee802154_radio_s *radio;
|
||||||
#ifdef CONFIG_IEEE802154_MAC
|
|
||||||
MACHANDLE mac;
|
MACHANDLE mac;
|
||||||
#endif
|
|
||||||
FAR struct spi_dev_s *spi;
|
FAR struct spi_dev_s *spi;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
@ -248,7 +246,6 @@ static int stm32_mrf24j40_devsetup(FAR struct stm32_priv_s *priv)
|
|||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(CONFIG_IEEE802154_MAC)
|
|
||||||
/* Create a 802.15.4 MAC device from a 802.15.4 compatible radio device. */
|
/* Create a 802.15.4 MAC device from a 802.15.4 compatible radio device. */
|
||||||
|
|
||||||
mac = mac802154_create(radio);
|
mac = mac802154_create(radio);
|
||||||
@ -285,8 +282,6 @@ static int stm32_mrf24j40_devsetup(FAR struct stm32_priv_s *priv)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* CONFIG_IEEE802154_MAC */
|
|
||||||
|
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -66,11 +66,9 @@
|
|||||||
|
|
||||||
#ifdef CONFIG_WIRELESS_IEEE802154
|
#ifdef CONFIG_WIRELESS_IEEE802154
|
||||||
|
|
||||||
#ifdef CONFIG_IEEE802154_MAC
|
|
||||||
/* Include ieee802.15.4 MAC IOCTL definitions */
|
/* Include ieee802.15.4 MAC IOCTL definitions */
|
||||||
|
|
||||||
# include <nuttx/wireless/ieee802154/ieee802154_mac.h>
|
# include <nuttx/wireless/ieee802154/ieee802154_mac.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_IEEE802154_MAC_DEV
|
#ifdef CONFIG_IEEE802154_MAC_DEV
|
||||||
/* Include ieee802.15.4 character driver IOCTL definitions */
|
/* Include ieee802.15.4 character driver IOCTL definitions */
|
||||||
|
@ -3,31 +3,22 @@
|
|||||||
# see the file kconfig-language.txt in the NuttX tools repository.
|
# see the file kconfig-language.txt in the NuttX tools repository.
|
||||||
#
|
#
|
||||||
|
|
||||||
config WIRELESS_IEEE802154
|
menuconfig WIRELESS_IEEE802154
|
||||||
bool "IEEE 802.15.4 Wireless Support"
|
bool "IEEE 802.15.4 Support"
|
||||||
default n
|
default n
|
||||||
select MM_IOB
|
select MM_IOB
|
||||||
---help---
|
depends on WIRELESS
|
||||||
Enables support for the IEEE 802.14.5 Wireless library.
|
|
||||||
|
|
||||||
if WIRELESS_IEEE802154
|
|
||||||
|
|
||||||
menuconfig IEEE802154_MAC
|
|
||||||
bool "Generic Media Access Control (MAC) layer for 802.15.4 radios"
|
|
||||||
default n
|
|
||||||
depends on WIRELESS_IEEE802154
|
|
||||||
---help---
|
---help---
|
||||||
Enables a Media Access Controller for any IEEE802.15.4 radio
|
Enables a Media Access Controller for any IEEE802.15.4 radio
|
||||||
device. This in turn can be used by higher layer entities
|
device. This in turn can be used by higher layer entities
|
||||||
such as 6lowpan. It is not required to use 802.15.4 radios,
|
such as 6lowpan.
|
||||||
but is strongly suggested to ensure exchange of valid frames.
|
|
||||||
|
|
||||||
if IEEE802154_MAC
|
if WIRELESS_IEEE802154
|
||||||
|
|
||||||
config IEEE802154_MAC_DEV
|
config IEEE802154_MAC_DEV
|
||||||
bool "Character driver for IEEE 802.15.4 MAC layer"
|
bool "Character driver for IEEE 802.15.4 MAC layer"
|
||||||
default n
|
default n
|
||||||
depends on IEEE802154_MAC
|
depends on WIRELESS_IEEE802154
|
||||||
---help---
|
---help---
|
||||||
Enable the device driver to expose the IEEE 802.15.4 MAC layer
|
Enable the device driver to expose the IEEE 802.15.4 MAC layer
|
||||||
access to user space as IOCTLs
|
access to user space as IOCTLs
|
||||||
@ -58,8 +49,6 @@ config IEEE802154_NTXDESC
|
|||||||
---help---
|
---help---
|
||||||
Configured number of Tx descriptors. Default: 3
|
Configured number of Tx descriptors. Default: 3
|
||||||
|
|
||||||
endif # IEEE802154_MAC
|
|
||||||
|
|
||||||
config IEEE802154_IND_PREALLOC
|
config IEEE802154_IND_PREALLOC
|
||||||
int "Number of pre-allocated meta-data structures"
|
int "Number of pre-allocated meta-data structures"
|
||||||
default 20
|
default 20
|
||||||
|
@ -37,22 +37,14 @@ ifeq ($(CONFIG_WIRELESS_IEEE802154),y)
|
|||||||
|
|
||||||
# Include IEEE 802.15.4 support
|
# Include IEEE 802.15.4 support
|
||||||
|
|
||||||
CSRCS += mac802154_indalloc.c
|
CSRCS += mac802154.c mac802154_indalloc.c
|
||||||
|
|
||||||
# Include wireless devices build support
|
# Include wireless devices build support
|
||||||
|
|
||||||
ifeq ($(CONFIG_IEEE802154_MAC),y)
|
|
||||||
CSRCS += mac802154.c
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(CONFIG_IEEE802154_MAC_DEV),y)
|
ifeq ($(CONFIG_IEEE802154_MAC_DEV),y)
|
||||||
CSRCS += mac802154_device.c
|
CSRCS += mac802154_device.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(CONFIG_IEEE802154_DEV),y)
|
|
||||||
CSRCS += radio802154_device.c
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(CONFIG_IEEE802154_NETDEV),y)
|
ifeq ($(CONFIG_IEEE802154_NETDEV),y)
|
||||||
CSRCS += mac802154_netdev.c
|
CSRCS += mac802154_netdev.c
|
||||||
endif
|
endif
|
||||||
|
@ -1842,6 +1842,8 @@ int mac802154_req_start(MACHANDLE mac, FAR struct ieee802154_start_req_s *req)
|
|||||||
return -ENOTTY;
|
return -ENOTTY;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mac802154_givesem(&priv->exclsem);
|
||||||
|
|
||||||
return OK;
|
return OK;
|
||||||
|
|
||||||
errout:
|
errout:
|
||||||
|
Loading…
Reference in New Issue
Block a user