wireless/ieee802154: Beginning of support for IEEE 802.15.4 MAC library.
This commit is contained in:
parent
b87e6c81cf
commit
e6e353c065
@ -120,6 +120,65 @@ int sixlowpan_energydetect(int sock, FAR const char *ifname,
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* libmac *******************************************************************/
|
/* libmac *******************************************************************/
|
||||||
|
/* Character driver IOCTL helpers */
|
||||||
|
|
||||||
|
int ieee802154_assoc_req(int fd, FAR struct ieee802154_assoc_req_s *req);
|
||||||
|
int ieee802154_desassoc_req(int fd,
|
||||||
|
FAR struct ieee802154_disassoc_req_s *req);
|
||||||
|
int ieee802154_get_req(int fd, FAR struct ieee802154_get_req_s *req);
|
||||||
|
int ieee802154_gts_req(int fd, FAR struct ieee802154_gts_req_s *req);
|
||||||
|
int ieee802154_orphan_resp(int fd,
|
||||||
|
FAR struct ieee802154_orphan_resp_s *resp);
|
||||||
|
int ieee802154_rxenable_req(int fd,
|
||||||
|
FAR struct ieee802154_rxenable_req_s *req);
|
||||||
|
int ieee802154_scan_req(int fd, FAR struct ieee802154_scan_req_s *req);
|
||||||
|
int ieee802154_set_req(int fd, FAR struct ieee802154_set_req_s *req);
|
||||||
|
int ieee802154_start_req(int fd, FAR struct ieee802154_start_req_s *req);
|
||||||
|
int ieee802154_sync_req(int fd, FAR struct ieee802154_sync_req_s *req);
|
||||||
|
int ieee802154_poll_req(int fd, FAR struct ieee802154_poll_req_s *req);
|
||||||
|
#if 0
|
||||||
|
int ieee802154_dps_req(int fd, FAR struct ieee802154_dps_req_s *req);
|
||||||
|
int ieee802154_sounding_req(int fd,
|
||||||
|
FAR struct ieee802154_sounding_req_s *req);
|
||||||
|
int ieee802154_calibrate_req(int fd,
|
||||||
|
FAR struct ieee802154_calibrate_req_s *req);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONFIG_NET_6LOWPAN
|
||||||
|
/* Netork driver IOCTL helpers */
|
||||||
|
|
||||||
|
int sixlowpan_assoc_req(int sock, FAR const char *ifname,
|
||||||
|
FAR struct ieee802154_assoc_req_s *req);
|
||||||
|
int sixlowpan_desassoc_req(int sock, FAR const char *ifname,
|
||||||
|
FAR struct ieee802154_disassoc_req_s *req);
|
||||||
|
int sixlowpan_get_req(int sock, FAR const char *ifname,
|
||||||
|
FAR struct ieee802154_get_req_s *req);
|
||||||
|
int sixlowpan_gts_req(int sock, FAR const char *ifname,
|
||||||
|
FAR struct ieee802154_gts_req_s *req);
|
||||||
|
int sixlowpan_orphan_resp(int sock, FAR const char *ifname,
|
||||||
|
FAR struct ieee802154_orphan_resp_s *resp);
|
||||||
|
int sixlowpan_rxenable_req(int sock, FAR const char *ifname,
|
||||||
|
FAR struct ieee802154_rxenable_req_s *req);
|
||||||
|
int sixlowpan_scan_req(int sock, FAR const char *ifname,
|
||||||
|
FAR struct ieee802154_scan_req_s *req);
|
||||||
|
int sixlowpan_set_req(int sock, FAR const char *ifname,
|
||||||
|
FAR struct ieee802154_set_req_s *req);
|
||||||
|
int sixlowpan_start_req(int sock, FAR const char *ifname,
|
||||||
|
FAR struct ieee802154_start_req_s *req);
|
||||||
|
int sixlowpan_sync_req(int sock, FAR const char *ifname,
|
||||||
|
FAR struct ieee802154_sync_req_s *req);
|
||||||
|
int sixlowpan_poll_req(int sock, FAR const char *ifname,
|
||||||
|
FAR struct ieee802154_poll_req_s *req);
|
||||||
|
#if 0
|
||||||
|
int sixlowpan_dps_req(int sock, FAR const char *ifname,
|
||||||
|
FAR struct ieee802154_dps_req_s *req);
|
||||||
|
int sixlowpan_sounding_req(int sock, FAR const char *ifname,
|
||||||
|
FAR struct ieee802154_sounding_req_s *req);
|
||||||
|
int sixlowpan_calibrate_req(int sock, FAR const char *ifname,
|
||||||
|
FAR struct ieee802154_calibrate_req_s *req);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
/* libutils *****************************************************************/
|
/* libutils *****************************************************************/
|
||||||
|
|
||||||
|
11
wireless/ieee802154/libmac/Kconfig
Normal file
11
wireless/ieee802154/libmac/Kconfig
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
#
|
||||||
|
# For a description of the syntax of this configuration file,
|
||||||
|
# see misc/tools/kconfig-language.txt.
|
||||||
|
#
|
||||||
|
|
||||||
|
config IEEE802154_LIBMAC
|
||||||
|
bool "IEEE 802.15.4 MAC library routines"
|
||||||
|
default n
|
||||||
|
---help---
|
||||||
|
Some MAC library routines for ieee 802.15.4 apps
|
||||||
|
|
40
wireless/ieee802154/libmac/Make.defs
Normal file
40
wireless/ieee802154/libmac/Make.defs
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
############################################################################
|
||||||
|
# apps/wireless/ieee802154/libradio/Make.defs
|
||||||
|
# Adds selected applications to apps/ build
|
||||||
|
#
|
||||||
|
# Copyright (C) 2016-17 Gregory Nutt. All rights reserved.
|
||||||
|
# Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
|
#
|
||||||
|
# Redistribution and use in source and binary forms, with or without
|
||||||
|
# modification, are permitted provided that the following conditions
|
||||||
|
# are met:
|
||||||
|
#
|
||||||
|
# 1. Redistributions of source code must retain the above copyright
|
||||||
|
# notice, this list of conditions and the following disclaimer.
|
||||||
|
# 2. Redistributions in binary form must reproduce the above copyright
|
||||||
|
# notice, this list of conditions and the following disclaimer in
|
||||||
|
# the documentation and/or other materials provided with the
|
||||||
|
# distribution.
|
||||||
|
# 3. Neither the name NuttX nor the names of its contributors may be
|
||||||
|
# used to endorse or promote products derived from this software
|
||||||
|
# without specific prior written permission.
|
||||||
|
#
|
||||||
|
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||||
|
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||||
|
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||||
|
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||||
|
# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||||
|
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||||
|
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||||
|
# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||||
|
# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||||
|
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||||
|
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
|
# POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
#
|
||||||
|
############################################################################
|
||||||
|
|
||||||
|
ifeq ($(CONFIG_IEEE802154_LIBMAC),y)
|
||||||
|
CONFIGURED_APPS += wireless/ieee802154/libmac
|
||||||
|
endif
|
||||||
|
|
101
wireless/ieee802154/libmac/Makefile
Normal file
101
wireless/ieee802154/libmac/Makefile
Normal file
@ -0,0 +1,101 @@
|
|||||||
|
############################################################################
|
||||||
|
# apps/wireless/ieee802154/libmac/Makefile
|
||||||
|
#
|
||||||
|
# Copyright (C) 2017 Gregory Nutt. All rights reserved.
|
||||||
|
# Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
|
#
|
||||||
|
# Redistribution and use in source and binary forms, with or without
|
||||||
|
# modification, are permitted provided that the following conditions
|
||||||
|
# are met:
|
||||||
|
#
|
||||||
|
# 1. Redistributions of source code must retain the above copyright
|
||||||
|
# notice, this list of conditions and the following disclaimer.
|
||||||
|
# 2. Redistributions in binary form must reproduce the above copyright
|
||||||
|
# notice, this list of conditions and the following disclaimer in
|
||||||
|
# the documentation and/or other materials provided with the
|
||||||
|
# distribution.
|
||||||
|
# 3. Neither the name NuttX nor the names of its contributors may be
|
||||||
|
# used to endorse or promote products derived from this software
|
||||||
|
# without specific prior written permission.
|
||||||
|
#
|
||||||
|
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||||
|
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||||
|
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||||
|
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||||
|
# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||||
|
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||||
|
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||||
|
# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||||
|
# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||||
|
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||||
|
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
|
# POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
#
|
||||||
|
############################################################################
|
||||||
|
|
||||||
|
-include $(TOPDIR)/.config
|
||||||
|
-include $(TOPDIR)/Make.defs
|
||||||
|
include $(APPDIR)/Make.defs
|
||||||
|
|
||||||
|
# libmac source files
|
||||||
|
|
||||||
|
ASRCS =
|
||||||
|
CSRCS =
|
||||||
|
|
||||||
|
ifeq ($(CONFIG_NET_6LOWPAN),y)
|
||||||
|
endif
|
||||||
|
|
||||||
|
AOBJS = $(ASRCS:.S=$(OBJEXT))
|
||||||
|
COBJS = $(CSRCS:.c=$(OBJEXT))
|
||||||
|
|
||||||
|
SRCS = $(ASRCS) $(CSRCS)
|
||||||
|
OBJS = $(AOBJS) $(COBJS)
|
||||||
|
|
||||||
|
ifeq ($(CONFIG_WINDOWS_NATIVE),y)
|
||||||
|
BIN = ..\..\..\libapps$(LIBEXT)
|
||||||
|
else
|
||||||
|
ifeq ($(WINTOOL),y)
|
||||||
|
BIN = ..\\..\\..\\libapps$(LIBEXT)
|
||||||
|
else
|
||||||
|
BIN = ../../../libapps$(LIBEXT)
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
ROOTDEPPATH = --dep-path .
|
||||||
|
VPATH =
|
||||||
|
|
||||||
|
# Build targets
|
||||||
|
|
||||||
|
all: .built
|
||||||
|
.PHONY: context .depend depend clean distclean
|
||||||
|
|
||||||
|
$(AOBJS): %$(OBJEXT): %.S
|
||||||
|
$(call ASSEMBLE, $<, $@)
|
||||||
|
|
||||||
|
$(COBJS): %$(OBJEXT): %.c
|
||||||
|
$(call COMPILE, $<, $@)
|
||||||
|
|
||||||
|
.built: $(OBJS)
|
||||||
|
$(call ARCHIVE, $(BIN), $(OBJS))
|
||||||
|
@touch .built
|
||||||
|
|
||||||
|
install:
|
||||||
|
|
||||||
|
context:
|
||||||
|
|
||||||
|
.depend: Makefile $(SRCS)
|
||||||
|
@$(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
|
||||||
|
@touch $@
|
||||||
|
|
||||||
|
depend: .depend
|
||||||
|
|
||||||
|
clean:
|
||||||
|
$(call DELFILE, .built)
|
||||||
|
$(call CLEAN)
|
||||||
|
|
||||||
|
distclean: clean
|
||||||
|
$(call DELFILE, Make.dep)
|
||||||
|
$(call DELFILE, .depend)
|
||||||
|
|
||||||
|
-include Make.dep
|
||||||
|
|
@ -7,6 +7,7 @@ menuconfig WIRELESS_IWPAN
|
|||||||
bool "IEEE 802.15.4 Command Line Tool"
|
bool "IEEE 802.15.4 Command Line Tool"
|
||||||
default n
|
default n
|
||||||
depends on NET && DRIVERS_WIRELESS
|
depends on NET && DRIVERS_WIRELESS
|
||||||
|
select IEEE802154_LIBMAC
|
||||||
select IEEE802154_LIBRADIO
|
select IEEE802154_LIBRADIO
|
||||||
select IEEE802154_LIBUTILS
|
select IEEE802154_LIBUTILS
|
||||||
---help---
|
---help---
|
||||||
|
Loading…
x
Reference in New Issue
Block a user