mirror of
https://github.com/h2zero/esp-nimble-cpp.git
synced 2025-09-25 13:31:15 +02:00
Improve macros for code enablement
This commit is contained in:
2
.github/workflows/build.yml
vendored
2
.github/workflows/build.yml
vendored
@@ -17,7 +17,7 @@ jobs:
|
|||||||
# See https://hub.docker.com/r/espressif/idf/tags and
|
# See https://hub.docker.com/r/espressif/idf/tags and
|
||||||
# https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/tools/idf-docker-image.html
|
# https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/tools/idf-docker-image.html
|
||||||
# for details.
|
# for details.
|
||||||
idf_ver: ["release-v4.4", "release-v5.4"]
|
idf_ver: ["release-v4.4", "release-v5.4", "release-v5.5"]
|
||||||
idf_target: ["esp32", "esp32s3", "esp32c2", "esp32c3", "esp32c5", "esp32c6", "esp32h2", "esp32p4"]
|
idf_target: ["esp32", "esp32s3", "esp32c2", "esp32c3", "esp32c5", "esp32c6", "esp32h2", "esp32p4"]
|
||||||
example:
|
example:
|
||||||
- NimBLE_Client
|
- NimBLE_Client
|
||||||
|
@@ -18,8 +18,8 @@
|
|||||||
# include "NimBLECharacteristic.h"
|
# include "NimBLECharacteristic.h"
|
||||||
#if CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_ROLE_PERIPHERAL)
|
#if CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_ROLE_PERIPHERAL)
|
||||||
|
|
||||||
#if defined(ESP_IDF_VERSION_MAJOR)
|
#if defined(CONFIG_NIMBLE_CPP_IDF)
|
||||||
# if defined(CONFIG_NIMBLE_CPP_IDF) && ESP_IDF_VERSION_MAJOR < 5
|
# if !defined(ESP_IDF_VERSION_MAJOR) || ESP_IDF_VERSION_MAJOR < 5
|
||||||
# define ble_gatts_notify_custom ble_gattc_notify_custom
|
# define ble_gatts_notify_custom ble_gattc_notify_custom
|
||||||
# define ble_gatts_indicate_custom ble_gattc_indicate_custom
|
# define ble_gatts_indicate_custom ble_gattc_indicate_custom
|
||||||
# endif
|
# endif
|
||||||
|
@@ -1290,7 +1290,7 @@ bool NimBLEDevice::injectConfirmPasskey(const NimBLEConnInfo& peerInfo, bool acc
|
|||||||
* @param [in] deviceName The name to set.
|
* @param [in] deviceName The name to set.
|
||||||
*/
|
*/
|
||||||
bool NimBLEDevice::setDeviceName(const std::string& deviceName) {
|
bool NimBLEDevice::setDeviceName(const std::string& deviceName) {
|
||||||
#if !defined(ESP_IDF_VERSION) || ESP_IDF_VERSION < ESP_IDF_VERSION_VAL(5, 5, 0) || CONFIG_BT_NIMBLE_GAP_SERVICE
|
#if !defined(MYNEWT_VAL_BLE_GATTS) || MYNEWT_VAL(BLE_GATTS) > 0
|
||||||
int rc = ble_svc_gap_device_name_set(deviceName.c_str());
|
int rc = ble_svc_gap_device_name_set(deviceName.c_str());
|
||||||
if (rc != 0) {
|
if (rc != 0) {
|
||||||
NIMBLE_LOGE(LOG_TAG, "Device name not set - too long");
|
NIMBLE_LOGE(LOG_TAG, "Device name not set - too long");
|
||||||
|
Reference in New Issue
Block a user