wireless/ieee802154: Adds MAC character driver structure. Nonfunctional

This commit is contained in:
Anthony Merlino
2017-03-29 12:51:01 -04:00
parent 4836534894
commit 8df78cc74b
5 changed files with 565 additions and 30 deletions
+8
View File
@@ -21,6 +21,14 @@ config IEEE802154_MAC
such as 6lowpan. It is not required to use 802.15.4 radios,
but is strongly suggested to ensure exchange of valid frames.
config IEEE802154_MAC_DEV
bool "Character driver for IEEE 802.15.4 MAC layer"
default n
depends on IEEE802154_MAC
---help---
Enable the device driver to expose the IEEE 802.15.4 MAC layer
access to user space as IOCTLs
config IEEE802154_DEV
bool "Debug character driver for ieee802.15.4 radio interfaces"
default n
+4
View File
@@ -45,6 +45,10 @@ ifeq ($(CONFIG_IEEE802154_MAC),y)
CSRCS += mac802154.c
endif
ifeq ($(CONFIG_IEEE802154_MAC_DEV),y)
CSRCS += mac802154_device.c
endif
ifeq ($(CONFIG_IEEE802154_DEV),y)
CSRCS += radio802154_device.c
endif
+15 -12
View File
@@ -506,29 +506,32 @@ static int mac802154_rsporphan(FAR struct ieee802154_mac_s *mac,
****************************************************************************/
/****************************************************************************
* Name: mac802154_register
* Name: mac802154_create
*
* Description:
* Create a 802.15.4 MAC device from a 802.15.4 compatible radio device.
* To create a 802.15.4 MAC, you need to pass:
*
* - an instance of a radio driver in radiodev
* - a pointer to a structure that contains MAC callback routines to
* handle confirmations and indications. NULL entries indicate no
* callback.
* The returned MAC structure should be passed to either the next highest
* layer in the network stack, or registered with a mac802154dev character
* driver. In either of these scenarios, the next highest layer should
* register a set of callbacks with the MAC layer by setting the mac->cbs
* member.
*
* In return you get a mac structure that has pointers to MAC operations
* and responses.
*
* This API does not create any device accessible to userspace. If you
* NOTE: This API does not create any device accessible to userspace. If you
* want to call these APIs from userspace, you have to wrap your mac in a
* character device via mac802154_device.c.
*
* Input Parameters:
* radiodev - an instance of an IEEE 802.15.4 radio
*
* Returned Value:
* A MAC structure that has pointers to MAC operations
* and responses.
*
****************************************************************************/
FAR struct ieee802154_mac_s *
mac802154_register(FAR struct ieee802154_radio_s *radiodev,
unsigned int minor)
mac802154_create(FAR struct ieee802154_radio_s *radiodev)
{
FAR struct ieee802154_privmac_s *mac;
File diff suppressed because it is too large Load Diff