From 406d9d20a36edc19d9146b67c86e296033db01b2 Mon Sep 17 00:00:00 2001 From: me-no-dev Date: Wed, 29 Apr 2020 14:56:13 +0300 Subject: [PATCH] Update HID examples to comply with the new requirements --- examples/bluetooth/esp_hid_device/CMakeLists.txt | 1 - examples/bluetooth/esp_hid_device/README.md | 5 +++++ examples/bluetooth/esp_hid_device/main/CMakeLists.txt | 11 +++++++---- examples/bluetooth/esp_hid_host/CMakeLists.txt | 1 - examples/bluetooth/esp_hid_host/README.md | 4 ++++ examples/bluetooth/esp_hid_host/main/CMakeLists.txt | 11 +++++++---- 6 files changed, 23 insertions(+), 10 deletions(-) create mode 100644 examples/bluetooth/esp_hid_device/README.md create mode 100644 examples/bluetooth/esp_hid_host/README.md diff --git a/examples/bluetooth/esp_hid_device/CMakeLists.txt b/examples/bluetooth/esp_hid_device/CMakeLists.txt index f3f8b3e23..a9c896a51 100644 --- a/examples/bluetooth/esp_hid_device/CMakeLists.txt +++ b/examples/bluetooth/esp_hid_device/CMakeLists.txt @@ -3,5 +3,4 @@ cmake_minimum_required(VERSION 3.5) include($ENV{IDF_PATH}/tools/cmake/project.cmake) -set(SUPPORTED_TARGETS esp32) project(esp_hid_device) diff --git a/examples/bluetooth/esp_hid_device/README.md b/examples/bluetooth/esp_hid_device/README.md new file mode 100644 index 000000000..8b5492a22 --- /dev/null +++ b/examples/bluetooth/esp_hid_device/README.md @@ -0,0 +1,5 @@ +| Supported Targets | ESP32 | +| ----------------- | ----- | + +# ESP-IDF BLE HID Device Demo + diff --git a/examples/bluetooth/esp_hid_device/main/CMakeLists.txt b/examples/bluetooth/esp_hid_device/main/CMakeLists.txt index 8e350336c..f0081bdaf 100644 --- a/examples/bluetooth/esp_hid_device/main/CMakeLists.txt +++ b/examples/bluetooth/esp_hid_device/main/CMakeLists.txt @@ -1,5 +1,8 @@ -set(COMPONENT_SRCS "esp_hid_device_main.c" - "esp_hid_gap.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") +set(srcs "esp_hid_device_main.c" + "esp_hid_gap.c") + +set(include_dirs ".") -register_component() +idf_component_register(SRCS "${srcs}" + INCLUDE_DIRS "${include_dirs}" + REQUIRES esp_hid) diff --git a/examples/bluetooth/esp_hid_host/CMakeLists.txt b/examples/bluetooth/esp_hid_host/CMakeLists.txt index e95c3aaf6..be1f3ca83 100644 --- a/examples/bluetooth/esp_hid_host/CMakeLists.txt +++ b/examples/bluetooth/esp_hid_host/CMakeLists.txt @@ -3,5 +3,4 @@ cmake_minimum_required(VERSION 3.5) include($ENV{IDF_PATH}/tools/cmake/project.cmake) -set(SUPPORTED_TARGETS esp32) project(esp_hid_host) diff --git a/examples/bluetooth/esp_hid_host/README.md b/examples/bluetooth/esp_hid_host/README.md new file mode 100644 index 000000000..36207932a --- /dev/null +++ b/examples/bluetooth/esp_hid_host/README.md @@ -0,0 +1,4 @@ +| Supported Targets | ESP32 | +| ----------------- | ----- | + +# ESP-IDF BT/BLE HID Host Demo diff --git a/examples/bluetooth/esp_hid_host/main/CMakeLists.txt b/examples/bluetooth/esp_hid_host/main/CMakeLists.txt index 2ea7183d6..ff0d11324 100644 --- a/examples/bluetooth/esp_hid_host/main/CMakeLists.txt +++ b/examples/bluetooth/esp_hid_host/main/CMakeLists.txt @@ -1,5 +1,8 @@ -set(COMPONENT_SRCS "esp_hid_host_main.c" - "esp_hid_gap.c") -set(COMPONENT_ADD_INCLUDEDIRS ".") +set(srcs "esp_hid_host_main.c" + "esp_hid_gap.c") + +set(include_dirs ".") -register_component() +idf_component_register(SRCS "${srcs}" + INCLUDE_DIRS "${include_dirs}" + REQUIRES esp_hid)