diff --git a/configure.ac b/configure.ac index 1cdc58935..c9be9bf12 100644 --- a/configure.ac +++ b/configure.ac @@ -1080,7 +1080,6 @@ AC_CONFIG_FILES([ Makefile include/Makefile include/cli/Makefile -include/ncp/Makefile include/openthread/Makefile include/platform/Makefile src/Makefile diff --git a/examples/apps/ncp/main.c b/examples/apps/ncp/main.c index 0ca56eff5..f466d82df 100644 --- a/examples/apps/ncp/main.c +++ b/examples/apps/ncp/main.c @@ -34,10 +34,11 @@ #include #include +#include "openthread/ncp.h" + #include #include #include -#include #include #ifdef OPENTHREAD_MULTIPLE_INSTANCE diff --git a/include/Makefile.am b/include/Makefile.am index db02a3db0..cddf13aa0 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -32,7 +32,6 @@ include $(abs_top_nlbuild_autotools_dir)/automake/pre.am DIST_SUBDIRS = \ cli \ - ncp \ openthread \ platform \ $(NULL) @@ -41,7 +40,6 @@ DIST_SUBDIRS = \ SUBDIRS = \ cli \ - ncp \ openthread \ platform \ $(NULL) @@ -50,7 +48,6 @@ SUBDIRS = \ PRETTY_SUBDIRS = \ cli \ - ncp \ openthread \ platform \ $(NULL) diff --git a/include/ncp/Makefile.am b/include/ncp/Makefile.am deleted file mode 100644 index a8ec09214..000000000 --- a/include/ncp/Makefile.am +++ /dev/null @@ -1,40 +0,0 @@ -# -# Copyright (c) 2016, The OpenThread Authors. -# All rights reserved. -# -# 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 of the copyright holder 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 HOLDER 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 $(abs_top_nlbuild_autotools_dir)/automake/pre.am - -ot_ncp_headers = \ - ncp.h \ - $(NULL) - -ot_ncpdir = $(includedir)/ncp -dist_ot_ncp_HEADERS = $(ot_ncp_headers) - -install-headers: install-includeHEADERS - -include $(abs_top_nlbuild_autotools_dir)/automake/post.am diff --git a/include/openthread/Makefile.am b/include/openthread/Makefile.am index 80583fdd3..e1222020e 100644 --- a/include/openthread/Makefile.am +++ b/include/openthread/Makefile.am @@ -41,6 +41,7 @@ openthread_headers = \ joiner.h \ link.h \ message.h \ + ncp.h \ netdata.h \ tasklet.h \ thread.h \ diff --git a/include/ncp/ncp.h b/include/openthread/ncp.h similarity index 100% rename from include/ncp/ncp.h rename to include/openthread/ncp.h diff --git a/src/ncp/ncp_base.cpp b/src/ncp/ncp_base.cpp index 53a48d2ce..7644a8f72 100644 --- a/src/ncp/ncp_base.cpp +++ b/src/ncp/ncp_base.cpp @@ -39,14 +39,14 @@ #include #include "openthread/message.h" +#include "openthread/ncp.h" #if OPENTHREAD_ENABLE_JAM_DETECTION #include "openthread/jam_detection.h" #endif #include - #include -#include +#include #include #include #include diff --git a/src/ncp/ncp_base.hpp b/src/ncp/ncp_base.hpp index 47dcdccc1..1f2949d82 100644 --- a/src/ncp/ncp_base.hpp +++ b/src/ncp/ncp_base.hpp @@ -39,11 +39,13 @@ #include #endif +#include "openthread/ncp.h" + #include #include "openthread/ip6.h" #include "openthread/message.h" +#include "openthread/ncp.h" #include -#include #include #include "spinel.h" diff --git a/src/ncp/ncp_spi.cpp b/src/ncp/ncp_spi.cpp index ec2b8f379..ad286a011 100644 --- a/src/ncp/ncp_spi.cpp +++ b/src/ncp/ncp_spi.cpp @@ -30,10 +30,11 @@ * This file implements a SPI interface to the OpenThread stack. */ +#include "openthread/ncp.h" + #include #include #include -#include #include #include #include diff --git a/src/ncp/ncp_uart.cpp b/src/ncp/ncp_uart.cpp index 3a35bc487..46091c11e 100644 --- a/src/ncp/ncp_uart.cpp +++ b/src/ncp/ncp_uart.cpp @@ -36,12 +36,12 @@ #include #endif +#include "openthread/ncp.h" + #include -#include #include #include #include -#include #include #include #include