From ecf7ea897edc5eddf63df5c7dce1d76a8062236e Mon Sep 17 00:00:00 2001 From: lly Date: Wed, 13 May 2020 14:46:24 +0800 Subject: [PATCH 1/8] ble_mesh: Rename common_vendor_models to components Since the scripts of CI will bypass components when trying to get EXAMPLE_PATHS, and these BLE Mesh components will only be used by other mesh examples, i.e. no need to be compiled as a single example, so we rename the folder to componnets. --- .../fast_prov_vendor_model/CMakeLists.txt | 6 ------ .../fast_prov_vendor_model/Makefile | 10 --------- .../main/CMakeLists.txt | 3 --- .../fast_prov_vendor_model/main/component.mk | 5 ----- .../fast_prov_vendor_model/main/main.c | 21 ------------------- .../fast_prov_vendor_model/sdkconfig.defaults | 7 ------- .../fast_prov_vendor_model}/CMakeLists.txt | 0 .../fast_prov_vendor_model}/component.mk | 0 .../esp_fast_prov_client_model.c | 0 .../esp_fast_prov_client_model.h | 0 .../esp_fast_prov_common.h | 0 .../esp_fast_prov_operation.c | 0 .../esp_fast_prov_operation.h | 0 .../esp_fast_prov_server_model.c | 0 .../esp_fast_prov_server_model.h | 0 15 files changed, 52 deletions(-) delete mode 100644 examples/bluetooth/esp_ble_mesh/common_vendor_models/fast_prov_vendor_model/CMakeLists.txt delete mode 100644 examples/bluetooth/esp_ble_mesh/common_vendor_models/fast_prov_vendor_model/Makefile delete mode 100644 examples/bluetooth/esp_ble_mesh/common_vendor_models/fast_prov_vendor_model/main/CMakeLists.txt delete mode 100644 examples/bluetooth/esp_ble_mesh/common_vendor_models/fast_prov_vendor_model/main/component.mk delete mode 100644 examples/bluetooth/esp_ble_mesh/common_vendor_models/fast_prov_vendor_model/main/main.c delete mode 100644 examples/bluetooth/esp_ble_mesh/common_vendor_models/fast_prov_vendor_model/sdkconfig.defaults rename examples/bluetooth/esp_ble_mesh/{common_vendor_models/fast_prov_vendor_model/components => components/fast_prov_vendor_model}/CMakeLists.txt (100%) rename examples/bluetooth/esp_ble_mesh/{common_vendor_models/fast_prov_vendor_model/components => components/fast_prov_vendor_model}/component.mk (100%) rename examples/bluetooth/esp_ble_mesh/{common_vendor_models/fast_prov_vendor_model/components => components/fast_prov_vendor_model}/esp_fast_prov_client_model.c (100%) rename examples/bluetooth/esp_ble_mesh/{common_vendor_models/fast_prov_vendor_model/components => components/fast_prov_vendor_model}/esp_fast_prov_client_model.h (100%) rename examples/bluetooth/esp_ble_mesh/{common_vendor_models/fast_prov_vendor_model/components => components/fast_prov_vendor_model}/esp_fast_prov_common.h (100%) rename examples/bluetooth/esp_ble_mesh/{common_vendor_models/fast_prov_vendor_model/components => components/fast_prov_vendor_model}/esp_fast_prov_operation.c (100%) rename examples/bluetooth/esp_ble_mesh/{common_vendor_models/fast_prov_vendor_model/components => components/fast_prov_vendor_model}/esp_fast_prov_operation.h (100%) rename examples/bluetooth/esp_ble_mesh/{common_vendor_models/fast_prov_vendor_model/components => components/fast_prov_vendor_model}/esp_fast_prov_server_model.c (100%) rename examples/bluetooth/esp_ble_mesh/{common_vendor_models/fast_prov_vendor_model/components => components/fast_prov_vendor_model}/esp_fast_prov_server_model.h (100%) diff --git a/examples/bluetooth/esp_ble_mesh/common_vendor_models/fast_prov_vendor_model/CMakeLists.txt b/examples/bluetooth/esp_ble_mesh/common_vendor_models/fast_prov_vendor_model/CMakeLists.txt deleted file mode 100644 index cb92f4b37..000000000 --- a/examples/bluetooth/esp_ble_mesh/common_vendor_models/fast_prov_vendor_model/CMakeLists.txt +++ /dev/null @@ -1,6 +0,0 @@ -# The following lines of boilerplate have to be in your project's CMakeLists -# in this exact order for cmake to work correctly -cmake_minimum_required(VERSION 3.5) - -include($ENV{IDF_PATH}/tools/cmake/project.cmake) -project(fast_prov_vendor_model) diff --git a/examples/bluetooth/esp_ble_mesh/common_vendor_models/fast_prov_vendor_model/Makefile b/examples/bluetooth/esp_ble_mesh/common_vendor_models/fast_prov_vendor_model/Makefile deleted file mode 100644 index 274dd3349..000000000 --- a/examples/bluetooth/esp_ble_mesh/common_vendor_models/fast_prov_vendor_model/Makefile +++ /dev/null @@ -1,10 +0,0 @@ -# -# This is a project Makefile. It is assumed the directory this Makefile resides in is a -# project subdirectory. -# - -PROJECT_NAME := fast_prov_vendor_model - -COMPONENT_ADD_INCLUDEDIRS := components/include - -include $(IDF_PATH)/make/project.mk diff --git a/examples/bluetooth/esp_ble_mesh/common_vendor_models/fast_prov_vendor_model/main/CMakeLists.txt b/examples/bluetooth/esp_ble_mesh/common_vendor_models/fast_prov_vendor_model/main/CMakeLists.txt deleted file mode 100644 index f475ba461..000000000 --- a/examples/bluetooth/esp_ble_mesh/common_vendor_models/fast_prov_vendor_model/main/CMakeLists.txt +++ /dev/null @@ -1,3 +0,0 @@ -set(COMPONENT_SRCS "main.c") - -register_component() diff --git a/examples/bluetooth/esp_ble_mesh/common_vendor_models/fast_prov_vendor_model/main/component.mk b/examples/bluetooth/esp_ble_mesh/common_vendor_models/fast_prov_vendor_model/main/component.mk deleted file mode 100644 index d68c5375e..000000000 --- a/examples/bluetooth/esp_ble_mesh/common_vendor_models/fast_prov_vendor_model/main/component.mk +++ /dev/null @@ -1,5 +0,0 @@ -# -# "main" pseudo-component makefile. -# -# (Uses default behaviour of compiling all source files in directory, adding 'include' to include path.) -# \ No newline at end of file diff --git a/examples/bluetooth/esp_ble_mesh/common_vendor_models/fast_prov_vendor_model/main/main.c b/examples/bluetooth/esp_ble_mesh/common_vendor_models/fast_prov_vendor_model/main/main.c deleted file mode 100644 index 3c9f9632f..000000000 --- a/examples/bluetooth/esp_ble_mesh/common_vendor_models/fast_prov_vendor_model/main/main.c +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright 2017-2019 Espressif Systems (Shanghai) PTE LTD -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at - -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -void app_main(void) -{ - /* This main.c is for CI. The fast_prov_vendor_model shall be - * included by other ble mesh examples which need vendor fast - * provisioning client/server models. - */ -} diff --git a/examples/bluetooth/esp_ble_mesh/common_vendor_models/fast_prov_vendor_model/sdkconfig.defaults b/examples/bluetooth/esp_ble_mesh/common_vendor_models/fast_prov_vendor_model/sdkconfig.defaults deleted file mode 100644 index afce3cf46..000000000 --- a/examples/bluetooth/esp_ble_mesh/common_vendor_models/fast_prov_vendor_model/sdkconfig.defaults +++ /dev/null @@ -1,7 +0,0 @@ -# Override some defaults so BT stack is enabled -# by default in this example -CONFIG_BT_ENABLED=y - -# Override some defaults of ESP BLE Mesh -CONFIG_BLE_MESH=y -CONFIG_BLE_MESH_FAST_PROV=y diff --git a/examples/bluetooth/esp_ble_mesh/common_vendor_models/fast_prov_vendor_model/components/CMakeLists.txt b/examples/bluetooth/esp_ble_mesh/components/fast_prov_vendor_model/CMakeLists.txt similarity index 100% rename from examples/bluetooth/esp_ble_mesh/common_vendor_models/fast_prov_vendor_model/components/CMakeLists.txt rename to examples/bluetooth/esp_ble_mesh/components/fast_prov_vendor_model/CMakeLists.txt diff --git a/examples/bluetooth/esp_ble_mesh/common_vendor_models/fast_prov_vendor_model/components/component.mk b/examples/bluetooth/esp_ble_mesh/components/fast_prov_vendor_model/component.mk similarity index 100% rename from examples/bluetooth/esp_ble_mesh/common_vendor_models/fast_prov_vendor_model/components/component.mk rename to examples/bluetooth/esp_ble_mesh/components/fast_prov_vendor_model/component.mk diff --git a/examples/bluetooth/esp_ble_mesh/common_vendor_models/fast_prov_vendor_model/components/esp_fast_prov_client_model.c b/examples/bluetooth/esp_ble_mesh/components/fast_prov_vendor_model/esp_fast_prov_client_model.c similarity index 100% rename from examples/bluetooth/esp_ble_mesh/common_vendor_models/fast_prov_vendor_model/components/esp_fast_prov_client_model.c rename to examples/bluetooth/esp_ble_mesh/components/fast_prov_vendor_model/esp_fast_prov_client_model.c diff --git a/examples/bluetooth/esp_ble_mesh/common_vendor_models/fast_prov_vendor_model/components/esp_fast_prov_client_model.h b/examples/bluetooth/esp_ble_mesh/components/fast_prov_vendor_model/esp_fast_prov_client_model.h similarity index 100% rename from examples/bluetooth/esp_ble_mesh/common_vendor_models/fast_prov_vendor_model/components/esp_fast_prov_client_model.h rename to examples/bluetooth/esp_ble_mesh/components/fast_prov_vendor_model/esp_fast_prov_client_model.h diff --git a/examples/bluetooth/esp_ble_mesh/common_vendor_models/fast_prov_vendor_model/components/esp_fast_prov_common.h b/examples/bluetooth/esp_ble_mesh/components/fast_prov_vendor_model/esp_fast_prov_common.h similarity index 100% rename from examples/bluetooth/esp_ble_mesh/common_vendor_models/fast_prov_vendor_model/components/esp_fast_prov_common.h rename to examples/bluetooth/esp_ble_mesh/components/fast_prov_vendor_model/esp_fast_prov_common.h diff --git a/examples/bluetooth/esp_ble_mesh/common_vendor_models/fast_prov_vendor_model/components/esp_fast_prov_operation.c b/examples/bluetooth/esp_ble_mesh/components/fast_prov_vendor_model/esp_fast_prov_operation.c similarity index 100% rename from examples/bluetooth/esp_ble_mesh/common_vendor_models/fast_prov_vendor_model/components/esp_fast_prov_operation.c rename to examples/bluetooth/esp_ble_mesh/components/fast_prov_vendor_model/esp_fast_prov_operation.c diff --git a/examples/bluetooth/esp_ble_mesh/common_vendor_models/fast_prov_vendor_model/components/esp_fast_prov_operation.h b/examples/bluetooth/esp_ble_mesh/components/fast_prov_vendor_model/esp_fast_prov_operation.h similarity index 100% rename from examples/bluetooth/esp_ble_mesh/common_vendor_models/fast_prov_vendor_model/components/esp_fast_prov_operation.h rename to examples/bluetooth/esp_ble_mesh/components/fast_prov_vendor_model/esp_fast_prov_operation.h diff --git a/examples/bluetooth/esp_ble_mesh/common_vendor_models/fast_prov_vendor_model/components/esp_fast_prov_server_model.c b/examples/bluetooth/esp_ble_mesh/components/fast_prov_vendor_model/esp_fast_prov_server_model.c similarity index 100% rename from examples/bluetooth/esp_ble_mesh/common_vendor_models/fast_prov_vendor_model/components/esp_fast_prov_server_model.c rename to examples/bluetooth/esp_ble_mesh/components/fast_prov_vendor_model/esp_fast_prov_server_model.c diff --git a/examples/bluetooth/esp_ble_mesh/common_vendor_models/fast_prov_vendor_model/components/esp_fast_prov_server_model.h b/examples/bluetooth/esp_ble_mesh/components/fast_prov_vendor_model/esp_fast_prov_server_model.h similarity index 100% rename from examples/bluetooth/esp_ble_mesh/common_vendor_models/fast_prov_vendor_model/components/esp_fast_prov_server_model.h rename to examples/bluetooth/esp_ble_mesh/components/fast_prov_vendor_model/esp_fast_prov_server_model.h From b6ed032e1deffa7e5054e587e9329bfa70cbca42 Mon Sep 17 00:00:00 2001 From: lly Date: Wed, 13 May 2020 14:51:44 +0800 Subject: [PATCH 2/8] ble_mesh: Change the EXTRA_COMPONENT_DIRS used by examples --- .../ble_mesh_fast_prov_client/CMakeLists.txt | 2 +- .../ble_mesh_fast_provision/ble_mesh_fast_prov_client/Makefile | 2 +- .../ble_mesh_fast_prov_server/CMakeLists.txt | 2 +- .../ble_mesh_fast_provision/ble_mesh_fast_prov_server/Makefile | 2 +- .../bluetooth/esp_ble_mesh/ble_mesh_wifi_coexist/CMakeLists.txt | 2 +- examples/bluetooth/esp_ble_mesh/ble_mesh_wifi_coexist/Makefile | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/ble_mesh_fast_prov_client/CMakeLists.txt b/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/ble_mesh_fast_prov_client/CMakeLists.txt index 1dcfafdf9..f0871b207 100644 --- a/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/ble_mesh_fast_prov_client/CMakeLists.txt +++ b/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/ble_mesh_fast_prov_client/CMakeLists.txt @@ -2,7 +2,7 @@ # in this exact order for cmake to work correctly cmake_minimum_required(VERSION 3.5) -set(EXTRA_COMPONENT_DIRS $ENV{IDF_PATH}/examples/bluetooth/esp_ble_mesh/common_vendor_models/fast_prov_vendor_model/components) +set(EXTRA_COMPONENT_DIRS $ENV{IDF_PATH}/examples/bluetooth/esp_ble_mesh/components/fast_prov_vendor_model) include($ENV{IDF_PATH}/tools/cmake/project.cmake) project(ble_mesh_fast_prov_client) diff --git a/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/ble_mesh_fast_prov_client/Makefile b/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/ble_mesh_fast_prov_client/Makefile index d6537805f..bd231aced 100644 --- a/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/ble_mesh_fast_prov_client/Makefile +++ b/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/ble_mesh_fast_prov_client/Makefile @@ -7,6 +7,6 @@ PROJECT_NAME := ble_mesh_fast_prov_client COMPONENT_ADD_INCLUDEDIRS := components/include -EXTRA_COMPONENT_DIRS := $(IDF_PATH)/examples/bluetooth/esp_ble_mesh/common_vendor_models/fast_prov_vendor_model/components +EXTRA_COMPONENT_DIRS := $(IDF_PATH)/examples/bluetooth/esp_ble_mesh/components/fast_prov_vendor_model include $(IDF_PATH)/make/project.mk diff --git a/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/ble_mesh_fast_prov_server/CMakeLists.txt b/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/ble_mesh_fast_prov_server/CMakeLists.txt index c09547f94..4fd825ad5 100644 --- a/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/ble_mesh_fast_prov_server/CMakeLists.txt +++ b/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/ble_mesh_fast_prov_server/CMakeLists.txt @@ -2,7 +2,7 @@ # in this exact order for cmake to work correctly cmake_minimum_required(VERSION 3.5) -set(EXTRA_COMPONENT_DIRS $ENV{IDF_PATH}/examples/bluetooth/esp_ble_mesh/common_vendor_models/fast_prov_vendor_model/components) +set(EXTRA_COMPONENT_DIRS $ENV{IDF_PATH}/examples/bluetooth/esp_ble_mesh/components/fast_prov_vendor_model) include($ENV{IDF_PATH}/tools/cmake/project.cmake) project(ble_mesh_fast_prov_server) diff --git a/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/ble_mesh_fast_prov_server/Makefile b/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/ble_mesh_fast_prov_server/Makefile index 07484a570..952aa94d2 100644 --- a/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/ble_mesh_fast_prov_server/Makefile +++ b/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/ble_mesh_fast_prov_server/Makefile @@ -7,6 +7,6 @@ PROJECT_NAME := ble_mesh_fast_prov_server COMPONENT_ADD_INCLUDEDIRS := components/include -EXTRA_COMPONENT_DIRS := $(IDF_PATH)/examples/bluetooth/esp_ble_mesh/common_vendor_models/fast_prov_vendor_model/components +EXTRA_COMPONENT_DIRS := $(IDF_PATH)/examples/bluetooth/esp_ble_mesh/components/fast_prov_vendor_model include $(IDF_PATH)/make/project.mk diff --git a/examples/bluetooth/esp_ble_mesh/ble_mesh_wifi_coexist/CMakeLists.txt b/examples/bluetooth/esp_ble_mesh/ble_mesh_wifi_coexist/CMakeLists.txt index 537339edb..18ca69217 100644 --- a/examples/bluetooth/esp_ble_mesh/ble_mesh_wifi_coexist/CMakeLists.txt +++ b/examples/bluetooth/esp_ble_mesh/ble_mesh_wifi_coexist/CMakeLists.txt @@ -2,7 +2,7 @@ # in this exact order for cmake to work correctly cmake_minimum_required(VERSION 3.5) -set(EXTRA_COMPONENT_DIRS $ENV{IDF_PATH}/examples/bluetooth/esp_ble_mesh/common_vendor_models/fast_prov_vendor_model/components) +set(EXTRA_COMPONENT_DIRS $ENV{IDF_PATH}/examples/bluetooth/esp_ble_mesh/components/fast_prov_vendor_model) include($ENV{IDF_PATH}/tools/cmake/project.cmake) project(ble_mesh_wifi_coexist) diff --git a/examples/bluetooth/esp_ble_mesh/ble_mesh_wifi_coexist/Makefile b/examples/bluetooth/esp_ble_mesh/ble_mesh_wifi_coexist/Makefile index 933cd0143..e1e48b0b7 100644 --- a/examples/bluetooth/esp_ble_mesh/ble_mesh_wifi_coexist/Makefile +++ b/examples/bluetooth/esp_ble_mesh/ble_mesh_wifi_coexist/Makefile @@ -7,6 +7,6 @@ PROJECT_NAME := ble_mesh_wifi_coexist COMPONENT_ADD_INCLUDEDIRS := components/include -EXTRA_COMPONENT_DIRS := $(IDF_PATH)/examples/bluetooth/esp_ble_mesh/common_vendor_models/fast_prov_vendor_model/components +EXTRA_COMPONENT_DIRS := $(IDF_PATH)/examples/bluetooth/esp_ble_mesh/components/fast_prov_vendor_model include $(IDF_PATH)/make/project.mk From bdaf56b17add2d424575595ffa9d2bae40d56ca6 Mon Sep 17 00:00:00 2001 From: lly Date: Wed, 13 May 2020 15:02:24 +0800 Subject: [PATCH 3/8] ble_mesh: Move the button component to components --- .../ble_mesh_node/onoff_client/CMakeLists.txt | 2 + .../ble_mesh_node/onoff_client/Makefile | 2 + .../components/button/include/iot_button.h | 230 ---------- .../sensor_client/CMakeLists.txt | 2 + .../sensor_client/Makefile | 2 + .../components/button/CMakeLists.txt | 7 - .../sensor_client/components/button/Kconfig | 21 - .../sensor_client/components/button/README.md | 46 -- .../sensor_client/components/button/button.c | 434 ------------------ .../components/button/button_obj.cpp | 48 -- .../components/button/component.mk | 4 - .../vendor_client/CMakeLists.txt | 2 + .../vendor_client/Makefile | 2 + .../components/button/CMakeLists.txt | 7 - .../vendor_client/components/button/Kconfig | 21 - .../vendor_client/components/button/README.md | 46 -- .../vendor_client/components/button/button.c | 434 ------------------ .../components/button/button_obj.cpp | 48 -- .../components/button/component.mk | 4 - .../components/button/include/iot_button.h | 231 ---------- .../components/button/CMakeLists.txt | 0 .../components/button/Kconfig | 0 .../components/button/README.md | 0 .../components/button/button.c | 0 .../components/button/button_obj.cpp | 0 .../components/button/component.mk | 0 .../components/button/include/iot_button.h | 0 27 files changed, 12 insertions(+), 1581 deletions(-) delete mode 100644 examples/bluetooth/esp_ble_mesh/ble_mesh_node/onoff_client/components/button/include/iot_button.h delete mode 100644 examples/bluetooth/esp_ble_mesh/ble_mesh_sensor_model/sensor_client/components/button/CMakeLists.txt delete mode 100644 examples/bluetooth/esp_ble_mesh/ble_mesh_sensor_model/sensor_client/components/button/Kconfig delete mode 100644 examples/bluetooth/esp_ble_mesh/ble_mesh_sensor_model/sensor_client/components/button/README.md delete mode 100644 examples/bluetooth/esp_ble_mesh/ble_mesh_sensor_model/sensor_client/components/button/button.c delete mode 100644 examples/bluetooth/esp_ble_mesh/ble_mesh_sensor_model/sensor_client/components/button/button_obj.cpp delete mode 100644 examples/bluetooth/esp_ble_mesh/ble_mesh_sensor_model/sensor_client/components/button/component.mk delete mode 100644 examples/bluetooth/esp_ble_mesh/ble_mesh_vendor_model/vendor_client/components/button/CMakeLists.txt delete mode 100644 examples/bluetooth/esp_ble_mesh/ble_mesh_vendor_model/vendor_client/components/button/Kconfig delete mode 100644 examples/bluetooth/esp_ble_mesh/ble_mesh_vendor_model/vendor_client/components/button/README.md delete mode 100644 examples/bluetooth/esp_ble_mesh/ble_mesh_vendor_model/vendor_client/components/button/button.c delete mode 100644 examples/bluetooth/esp_ble_mesh/ble_mesh_vendor_model/vendor_client/components/button/button_obj.cpp delete mode 100644 examples/bluetooth/esp_ble_mesh/ble_mesh_vendor_model/vendor_client/components/button/component.mk delete mode 100644 examples/bluetooth/esp_ble_mesh/ble_mesh_vendor_model/vendor_client/components/button/include/iot_button.h rename examples/bluetooth/esp_ble_mesh/{ble_mesh_node/onoff_client => }/components/button/CMakeLists.txt (100%) rename examples/bluetooth/esp_ble_mesh/{ble_mesh_node/onoff_client => }/components/button/Kconfig (100%) rename examples/bluetooth/esp_ble_mesh/{ble_mesh_node/onoff_client => }/components/button/README.md (100%) rename examples/bluetooth/esp_ble_mesh/{ble_mesh_node/onoff_client => }/components/button/button.c (100%) rename examples/bluetooth/esp_ble_mesh/{ble_mesh_node/onoff_client => }/components/button/button_obj.cpp (100%) rename examples/bluetooth/esp_ble_mesh/{ble_mesh_node/onoff_client => }/components/button/component.mk (100%) rename examples/bluetooth/esp_ble_mesh/{ble_mesh_sensor_model/sensor_client => }/components/button/include/iot_button.h (100%) diff --git a/examples/bluetooth/esp_ble_mesh/ble_mesh_node/onoff_client/CMakeLists.txt b/examples/bluetooth/esp_ble_mesh/ble_mesh_node/onoff_client/CMakeLists.txt index 4b36e55e6..e6c479174 100644 --- a/examples/bluetooth/esp_ble_mesh/ble_mesh_node/onoff_client/CMakeLists.txt +++ b/examples/bluetooth/esp_ble_mesh/ble_mesh_node/onoff_client/CMakeLists.txt @@ -2,5 +2,7 @@ # in this exact order for cmake to work correctly cmake_minimum_required(VERSION 3.5) +set(EXTRA_COMPONENT_DIRS $ENV{IDF_PATH}/examples/bluetooth/esp_ble_mesh/components/button) + include($ENV{IDF_PATH}/tools/cmake/project.cmake) project(onoff_client) diff --git a/examples/bluetooth/esp_ble_mesh/ble_mesh_node/onoff_client/Makefile b/examples/bluetooth/esp_ble_mesh/ble_mesh_node/onoff_client/Makefile index a47e6fd08..854491ae9 100644 --- a/examples/bluetooth/esp_ble_mesh/ble_mesh_node/onoff_client/Makefile +++ b/examples/bluetooth/esp_ble_mesh/ble_mesh_node/onoff_client/Makefile @@ -7,4 +7,6 @@ PROJECT_NAME := onoff_client COMPONENT_ADD_INCLUDEDIRS := components/include +EXTRA_COMPONENT_DIRS := $(IDF_PATH)/examples/bluetooth/esp_ble_mesh/components/button + include $(IDF_PATH)/make/project.mk diff --git a/examples/bluetooth/esp_ble_mesh/ble_mesh_node/onoff_client/components/button/include/iot_button.h b/examples/bluetooth/esp_ble_mesh/ble_mesh_node/onoff_client/components/button/include/iot_button.h deleted file mode 100644 index 6a2fa23c0..000000000 --- a/examples/bluetooth/esp_ble_mesh/ble_mesh_node/onoff_client/components/button/include/iot_button.h +++ /dev/null @@ -1,230 +0,0 @@ -// Copyright 2015-2016 Espressif Systems (Shanghai) PTE LTD -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at - -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -#ifndef _IOT_BUTTON_H_ -#define _IOT_BUTTON_H_ - -#ifdef __cplusplus -extern "C" { -#endif - -#include "driver/gpio.h" -#include "freertos/portmacro.h" -typedef void (* button_cb)(void*); -typedef void* button_handle_t; - -typedef enum { - BUTTON_ACTIVE_HIGH = 1, /*!