2020-04-01 04:16:27 +02:00
|
|
|
# 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)
|
|
|
|
|
2024-11-03 00:58:51 +01:00
|
|
|
if(__COMPONENT_TARGETS MATCHES "___idf_esp-nimble-component")
|
2021-03-05 05:00:21 +01:00
|
|
|
list(APPEND ESP_NIMBLE_PRIV_REQUIRES
|
|
|
|
esp-nimble-component
|
|
|
|
)
|
2024-11-03 00:58:51 +01:00
|
|
|
elseif(__COMPONENT_TARGETS MATCHES "__idf_nimble")
|
2021-03-05 05:00:21 +01:00
|
|
|
list(APPEND ESP_NIMBLE_PRIV_REQUIRES
|
|
|
|
nimble
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
2024-10-07 02:16:48 +02:00
|
|
|
# Arduino install using IDF component manager
|
2024-11-03 00:58:51 +01:00
|
|
|
if(__COMPONENT_TARGETS MATCHES "___idf_espressif__arduino-esp32")
|
2024-10-07 02:16:48 +02:00
|
|
|
list(APPEND ESP_NIMBLE_PRIV_REQUIRES
|
|
|
|
arduino-esp32
|
|
|
|
)
|
|
|
|
# Manual installation of Arduino framework
|
2024-11-03 00:58:51 +01:00
|
|
|
elseif(__COMPONENT_TARGETS MATCHES "__idf_arduino")
|
2021-03-05 05:00:21 +01:00
|
|
|
list(APPEND ESP_NIMBLE_PRIV_REQUIRES
|
|
|
|
arduino
|
|
|
|
)
|
2024-10-07 02:16:48 +02:00
|
|
|
# PlatformIO
|
2024-11-03 00:58:51 +01:00
|
|
|
elseif(__COMPONENT_TARGETS MATCHES "___idf_framework-arduinoespressif32")
|
2023-05-28 18:44:17 +02:00
|
|
|
list(APPEND ESP_NIMBLE_PRIV_REQUIRES
|
|
|
|
framework-arduinoespressif32
|
|
|
|
)
|
2021-03-05 05:00:21 +01:00
|
|
|
endif()
|
|
|
|
|
|
|
|
idf_component_register(
|
|
|
|
REQUIRED_IDF_TARGETS
|
|
|
|
"esp32"
|
|
|
|
"esp32s3"
|
2023-09-01 19:56:52 +02:00
|
|
|
"esp32c2"
|
2021-03-05 05:00:21 +01:00
|
|
|
"esp32c3"
|
2023-08-13 18:08:11 +02:00
|
|
|
"esp32c6"
|
2024-06-18 12:50:54 +02:00
|
|
|
"esp32h2"
|
2024-11-01 02:06:57 +01:00
|
|
|
"esp32p4"
|
2021-03-05 05:00:21 +01:00
|
|
|
INCLUDE_DIRS
|
|
|
|
"src"
|
|
|
|
SRCS
|
2021-01-16 03:56:06 +01:00
|
|
|
"src/NimBLE2904.cpp"
|
|
|
|
"src/NimBLEAddress.cpp"
|
|
|
|
"src/NimBLEAdvertisedDevice.cpp"
|
[BREAKING] - Refactor NimBLEAdvertising
* General code cleanup.
* `NimBLEAdvertisementData` moved to it's own .h and .cpp files.
* Added new method, `NimBLEAdvertising::setPreferredParams` that takes the min and max preferred connection parameters as an alternative for `setMinPreferred` and `setMaxPreferred`.
* Added new method, `NimBLEAdvertising::setAdvertisingInterval` Sets the advertisement interval for min and max to the same value instead of calling `setMinInterval` and `setMaxInterval` separately if there is not value difference.
* `NimBLEAdvertisementData` payload is now stored in `std::vector<uint8_t>` instead of `std::string`.
* `NimBLEAdvertisementData::getPayload` now returns `std::vector<uint8_t>` instead of `std::string`.
* `NimBLEAdvertisementData::addData` now takes either a `std::vector<uint8_t>` or `uint8_t* + length` instead of `std::string` or `char + length`.
* `NimBLEAdvertisementData::setName` now takes an optional `bool` parameter to indicate if the name is complete or incomplete, default = complete.
* `NimBLEAdvertising::start` No longer takes a callback pointer parameter, instead the new method `NimBLEAdvertising::setAdvertisingCompleteCallback` should be used.
* `NimBLEAdvertising::setAdvertisementType` has been renamed to `NimBLEAdvertising::setConnectableMode` to better reflect it's function.
* `NimBLEAdvertising::setScanResponse` has been renamed to `NimBLEAdvertising::enableScanResponse` to better reflect it's function.
* Scan response is no longer enabled by default.
* Added new method, `NimBLEAdvertising::setDiscoverableMode` to allow applications to control the discoverability of the advertiser.
* Advertising the name and TX power of the device will no longer happen by default and should be set manually by the application.
* Added overload for `NimBLEAdvertising::setManufacturerData` that takes a `const uint8_t*` and , size_t` paramter.
* Added overload for `NimBLEAdvertising::setServiceData` that takes `const NimBLEUUID& uuid`, ` const uint8_t* data`, ` size_t length` as parameters.
* Added overload for `NimBLEAdvertising::setServiceData` that takes `const NimBLEUUID& uuid`, `const std::vector<uint8_t>&` as parameters.
* All `NimBLEAdvertisementData` functions that change data values now return `bool`, true = success.
* All `NimBLEAdvertising` functions that change data values now return `bool`, true = success.
* `NimBLEAdvertising::setMinPreferred` and `NimBLEAdvertising::setMaxPreferred` have been removed, use `NimBLEAdvertising::setPreferredParams` instead.
* All advertising data is now stored in instances of `NimBLEAdvertisingData` and vectors removed from `NimBLEAdvertising`.
* `NimBLEAdvertising::setAdvertisementData` and `NimBLEAdvertising::setScanResponseData` now return `bool`, true = success.
* Added new method, `NimBLEAdvertisementData::removeData`, which takes a parameter `uint8_t type`, the data type to remove.
* Added new method, `NimBLEAdvertisementData::toString`, which will print the data in hex.
* Added new method, `NimBLEAdvertising::getAdvertisementData`, which returns a reference to the currently set advertisement data.
* Added new method, `NimBLEAdvertising::getScanData`, which returns a reference to the currently set scan response data.
* Added overloads for `NimBLEAdvertising::removeServiceUUID` and `NimBLEAdvertisementData::removeServiceUUID` to accept a `const char*`
* Added new method, `NimBLEAdvertising::clearData`, which will clear the advertisement and scan response data.
2024-07-12 21:04:43 +02:00
|
|
|
"src/NimBLEAdvertisementData.cpp"
|
2021-01-16 03:56:06 +01:00
|
|
|
"src/NimBLEAdvertising.cpp"
|
2024-07-17 23:35:13 +02:00
|
|
|
"src/NimBLEAttValue.cpp"
|
2021-01-16 03:56:06 +01:00
|
|
|
"src/NimBLEBeacon.cpp"
|
|
|
|
"src/NimBLECharacteristic.cpp"
|
|
|
|
"src/NimBLEClient.cpp"
|
|
|
|
"src/NimBLEDescriptor.cpp"
|
|
|
|
"src/NimBLEDevice.cpp"
|
|
|
|
"src/NimBLEEddystoneTLM.cpp"
|
2022-04-10 18:21:45 +02:00
|
|
|
"src/NimBLEExtAdvertising.cpp"
|
2021-02-08 19:46:11 +01:00
|
|
|
"src/NimBLEHIDDevice.cpp"
|
2021-01-16 03:56:06 +01:00
|
|
|
"src/NimBLERemoteCharacteristic.cpp"
|
|
|
|
"src/NimBLERemoteDescriptor.cpp"
|
|
|
|
"src/NimBLERemoteService.cpp"
|
2024-07-26 22:47:36 +02:00
|
|
|
"src/NimBLERemoteValueAttribute.cpp"
|
2021-01-16 03:56:06 +01:00
|
|
|
"src/NimBLEScan.cpp"
|
|
|
|
"src/NimBLEServer.cpp"
|
|
|
|
"src/NimBLEService.cpp"
|
|
|
|
"src/NimBLEUtils.cpp"
|
|
|
|
"src/NimBLEUUID.cpp"
|
2021-03-05 05:00:21 +01:00
|
|
|
REQUIRES
|
2021-01-16 03:56:06 +01:00
|
|
|
bt
|
2021-03-05 05:00:21 +01:00
|
|
|
nvs_flash
|
2023-08-21 16:36:27 +02:00
|
|
|
driver
|
2021-03-05 05:00:21 +01:00
|
|
|
PRIV_REQUIRES
|
|
|
|
${ESP_NIMBLE_PRIV_REQUIRES}
|
2021-01-16 03:56:06 +01:00
|
|
|
)
|
|
|
|
|