diff --git a/ChangeLog b/ChangeLog index 878c036e541..bf8516b95ee 100755 --- a/ChangeLog +++ b/ChangeLog @@ -11523,4 +11523,6 @@ data buffers (2016-02-22). * fs/fat: Add an option to force all transfers to be performed indirectly using the FAT file system's internal sector buffers (2016-02-22). + * drivers/wireless/ieee802154: New directory. Nothing there yet (2016-02-25). + * wireless/: New top level directory. Nothing there yet (2015-02-26). diff --git a/Directories.mk b/Directories.mk index dcf9fd65105..6eeedc79e8a 100644 --- a/Directories.mk +++ b/Directories.mk @@ -1,7 +1,7 @@ ############################################################################ # Directories.mk # -# Copyright (C) 2007-2012, 2014 Gregory Nutt. All rights reserved. +# Copyright (C) 2007-2012, 2014, 2016 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without diff --git a/FlatLibs.mk b/FlatLibs.mk index ebe69cbb618..13dcc6c3400 100644 --- a/FlatLibs.mk +++ b/FlatLibs.mk @@ -1,7 +1,7 @@ ############################################################################ # FlatLibs.mk # -# Copyright (C) 2007-2012, 2014 Gregory Nutt. All rights reserved. +# Copyright (C) 2007-2012, 2014, 2016 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -109,6 +109,12 @@ ifeq ($(CONFIG_AUDIO),y) NUTTXLIBS += lib$(DELIM)libaudio$(LIBEXT) endif +# Add libraries for the Wireless sub-system + +ifeq ($(CONFIG_WIRELESS),y) +NUTTXLIBS += lib$(DELIM)libwireless$(LIBEXT) +endif + # Export all libraries EXPORTLIBS = $(NUTTXLIBS) diff --git a/Kconfig b/Kconfig index 09991c5e6da..4584b625467 100644 --- a/Kconfig +++ b/Kconfig @@ -418,6 +418,7 @@ comment "Subsystem Debug Options" config DEBUG_AUDIO bool "Audio Device Debug Output" default n + depends on AUDIO ---help--- Enable low level debug SYSLOG output from the audio subsystem and device drivers. (disabled by default). Support for this debug option @@ -426,6 +427,7 @@ config DEBUG_AUDIO config DEBUG_BINFMT bool "Binary Loader Debug Output" default n + depends on !BINFMT_DISABLE ---help--- Enable binary loader debug SYSLOG output (disabled by default) @@ -488,6 +490,15 @@ config DEBUG_SYSCALL Enable very low level output related to system calls. This gives you basically a poor man's version of strace. +config DEBUG_WIRELESS + bool "Wireless Device Debug Output" + default n + depends on WIRELESS + ---help--- + Enable low level debug SYSLOG output from the wireless subsystem and + device drivers. (disabled by default). Support for this debug option + is architecture-specific and may not be available for some MCUs. + comment "OS Function Debug Options" config DEBUG_DMA @@ -782,6 +793,10 @@ menu "Audio Support" source audio/Kconfig endmenu +menu "Wireless Support" +source wireless/Kconfig +endmenu + menu "Binary Loader" source binfmt/Kconfig endmenu diff --git a/KernelLibs.mk b/KernelLibs.mk index 02f9f8aa901..a7888d714dc 100644 --- a/KernelLibs.mk +++ b/KernelLibs.mk @@ -1,7 +1,7 @@ ############################################################################ # KernalLibs.mk # -# Copyright (C) 2014 Gregory Nutt. All rights reserved. +# Copyright (C) 2014, 2016 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -104,6 +104,12 @@ ifeq ($(CONFIG_AUDIO),y) NUTTXLIBS += lib$(DELIM)libaudio$(LIBEXT) endif +# Add libraries for the Wireless sub-system + +ifeq ($(CONFIG_WIRELESS),y) +NUTTXLIBS += lib$(DELIM)libwireless$(LIBEXT) +endif + # Export only the user libraries EXPORTLIBS = $(USERLIBS) diff --git a/LibTargets.mk b/LibTargets.mk index 24a2627a9c5..873958f00a3 100755 --- a/LibTargets.mk +++ b/LibTargets.mk @@ -118,6 +118,12 @@ audio$(DELIM)libaudio$(LIBEXT): context lib$(DELIM)libaudio$(LIBEXT): audio$(DELIM)libaudio$(LIBEXT) $(Q) install audio$(DELIM)libaudio$(LIBEXT) lib$(DELIM)libaudio$(LIBEXT) +wireless$(DELIM)libwireless$(LIBEXT): context + $(Q) $(MAKE) -C wireless TOPDIR="$(TOPDIR)" libwireless$(LIBEXT) KERNEL=y EXTRADEFINES=$(KDEFINE) + +lib$(DELIM)libwireless$(LIBEXT): wireless$(DELIM)libwireless$(LIBEXT) + $(Q) install wireless$(DELIM)libwireless$(LIBEXT) lib$(DELIM)libwireless$(LIBEXT) + $(ARCH_SRC)$(DELIM)libarch$(LIBEXT): context $(Q) $(MAKE) -C $(ARCH_SRC) TOPDIR="$(TOPDIR)" libarch$(LIBEXT) KERNEL=y EXTRADEFINES=$(KDEFINE) diff --git a/ProtectedLibs.mk b/ProtectedLibs.mk index 3abd3908485..70185eacf47 100644 --- a/ProtectedLibs.mk +++ b/ProtectedLibs.mk @@ -1,7 +1,7 @@ ############################################################################ # ProtectedLibs.mk # -# Copyright (C) 2007-2012, 2014 Gregory Nutt. All rights reserved. +# Copyright (C) 2007-2012, 2014, 2016 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -114,6 +114,12 @@ ifeq ($(CONFIG_AUDIO),y) NUTTXLIBS += lib$(DELIM)libaudio$(LIBEXT) endif +# Add libraries for the Wireless sub-system + +ifeq ($(CONFIG_WIRELESS),y) +NUTTXLIBS += lib$(DELIM)libwireless$(LIBEXT) +endif + # Export only the user libraries EXPORTLIBS = $(USERLIBS) diff --git a/audio/.gitignore b/audio/.gitignore new file mode 100644 index 00000000000..4b32ec6a3da --- /dev/null +++ b/audio/.gitignore @@ -0,0 +1,10 @@ +/Make.dep +/.depend +/*.asm +/*.obj +/*.rel +/*.lst +/*.sym +/*.adb +/*.lib +/*.src diff --git a/wireless/.gitignore b/wireless/.gitignore new file mode 100644 index 00000000000..4b32ec6a3da --- /dev/null +++ b/wireless/.gitignore @@ -0,0 +1,10 @@ +/Make.dep +/.depend +/*.asm +/*.obj +/*.rel +/*.lst +/*.sym +/*.adb +/*.lib +/*.src diff --git a/wireless/Kconfig b/wireless/Kconfig new file mode 100644 index 00000000000..ed6a31377b5 --- /dev/null +++ b/wireless/Kconfig @@ -0,0 +1,15 @@ +# +# For a description of the syntax of this configuration file, +# see the file kconfig-language.txt in the NuttX tools repository. +# + +config WIRELESS + bool "Wireless Support" + default n + depends on EXPERIMENTAL + ---help--- + Enables overall support for Wireless library. + +if WIRELESS + +endif # WIRELESS diff --git a/wireless/Makefile b/wireless/Makefile new file mode 100644 index 00000000000..dd8dde282af --- /dev/null +++ b/wireless/Makefile @@ -0,0 +1,89 @@ +############################################################################ +# wireless/Makefile +# +# Copyright (C) 2016 Gregory Nutt. All rights reserved. +# Author: Gregory Nutt +# +# 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)/Make.defs +DELIM ?= $(strip /) + +ifeq ($(WINTOOL),y) +INCDIROPT = -w +endif + +DEPPATH = --dep-path . +ASRCS = +CSRCS = +VPATH = . + +# Include support for various drivers. Each Make.defs file will add its +# files to the source file list, add its DEPPATH info, and will add +# the appropriate paths to the VPATH variable + +ifeq ($(CONFIG_WIRELESS_FORMAT_PCM),y) + CSRCS += pcm_decode.c +endif + +AOBJS = $(ASRCS:.S=$(OBJEXT)) +COBJS = $(CSRCS:.c=$(OBJEXT)) + +SRCS = $(ASRCS) $(CSRCS) +OBJS = $(AOBJS) $(COBJS) + +BIN = libwireless$(LIBEXT) + +all: $(BIN) + +$(AOBJS): %$(OBJEXT): %.S + $(call ASSEMBLE, $<, $@) + +$(COBJS): %$(OBJEXT): %.c + $(call COMPILE, $<, $@) + +$(BIN): $(OBJS) + $(call ARCHIVE, $@, $(OBJS)) + +.depend: Makefile $(SRCS) + $(Q) $(MKDEP) $(DEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep + $(Q) touch $@ + +depend: .depend + +clean: + $(call DELFILE, $(BIN)) + $(call CLEAN) + +distclean: clean + $(call DELFILE, Make.dep) + $(call DELFILE, .depend) + +-include Make.dep