diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7ba890f2..efe09577 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -78,11 +78,11 @@ jobs: [env:esp32c3] board = esp32-c3-devkitm-1 - build_flags = '-DCONFIG_BT_NIMBLE_EXT_ADV=1' + build_flags = '-DMYNEWT_VAL_BLE_EXT_ADV=1' [env:esp32s3] board = esp32-s3-devkitc-1 - build_flags = '-DCONFIG_BT_NIMBLE_EXT_ADV=1' + build_flags = '-DMYNEWT_VAL_BLE_EXT_ADV=1' EOF cp ${{ matrix.example }}/* example/src/ platformio run -d example @@ -163,19 +163,19 @@ jobs: [env:esp32c3] board = esp32-c3-devkitm-1 - build_flags = '-DCONFIG_BT_NIMBLE_EXT_ADV=1' + build_flags = '-DMYNEWT_VAL_BLE_EXT_ADV=1' [env:esp32s3] board = esp32-s3-devkitc-1 - build_flags = '-DCONFIG_BT_NIMBLE_EXT_ADV=1' + build_flags = '-DMYNEWT_VAL_BLE_EXT_ADV=1' [env:esp32c6] board = esp32-c6-devkitc-1 - build_flags = '-DCONFIG_BT_NIMBLE_EXT_ADV=1' + build_flags = '-DMYNEWT_VAL_BLE_EXT_ADV=1' [env:esp32h2] board = esp32-h2-devkitm-1 - build_flags = '-DCONFIG_BT_NIMBLE_EXT_ADV=1' + build_flags = '-DMYNEWT_VAL_BLE_EXT_ADV=1' EOF cp ${{ matrix.example }}/* example/src/ platformio run -d example @@ -224,7 +224,7 @@ jobs: - uses: actions/checkout@v4 - name: Set config for BT5 run: | - sed -i '0,/#include \"nimconfig_rename.h\"/a #define CONFIG_BT_NIMBLE_EXT_ADV 1' ./src/nimconfig.h + sed -i '0,/#include \"nimconfig_rename.h\"/a #define MYNEWT_VAL_BLE_EXT_ADV 1' ./src/nimconfig.h - name: Build BT5 arduino-esp32 uses: arduino/compile-sketches@v1.1.0 with: @@ -276,7 +276,7 @@ jobs: - uses: actions/checkout@v4 - name: Set config for BT5 run: | - echo "-DCONFIG_BT_NIMBLE_EXT_ADV=1" > ${{ matrix.example }}/build_opt.h + echo "-DMYNEWT_VAL_BLE_EXT_ADV=1" > ${{ matrix.example }}/build_opt.h - name: Build BT5 n-able Arduino uses: arduino/compile-sketches@v1.1.0 with: diff --git a/docs/Doxyfile b/docs/Doxyfile index 50151612..6cd85e4c 100644 --- a/docs/Doxyfile +++ b/docs/Doxyfile @@ -2416,7 +2416,7 @@ INCLUDE_FILE_PATTERNS = # This tag requires that the tag ENABLE_PREPROCESSING is set to YES. PREDEFINED = _DOXYGEN_ \ - CONFIG_BT_ENABLED \ + CONFIG_BT_NIMBLE_ENABLED \ CONFIG_BT_NIMBLE_ROLE_CENTRAL \ CONFIG_BT_NIMBLE_ROLE_OBSERVER \ CONFIG_BT_NIMBLE_ROLE_PERIPHERAL \ diff --git a/examples/Bluetooth_5/NimBLE_extended_client/NimBLE_extended_client.ino b/examples/Bluetooth_5/NimBLE_extended_client/NimBLE_extended_client.ino index 5062d403..93c9ce53 100644 --- a/examples/Bluetooth_5/NimBLE_extended_client/NimBLE_extended_client.ino +++ b/examples/Bluetooth_5/NimBLE_extended_client/NimBLE_extended_client.ino @@ -10,7 +10,7 @@ #include #include -#if !CONFIG_BT_NIMBLE_EXT_ADV +#if !MYNEWT_VAL(BLE_EXT_ADV) # error Must enable extended advertising, see nimconfig.h file. #endif diff --git a/examples/Bluetooth_5/NimBLE_extended_scan/NimBLE_extended_scan.ino b/examples/Bluetooth_5/NimBLE_extended_scan/NimBLE_extended_scan.ino index 31a2688c..a9947b99 100644 --- a/examples/Bluetooth_5/NimBLE_extended_scan/NimBLE_extended_scan.ino +++ b/examples/Bluetooth_5/NimBLE_extended_scan/NimBLE_extended_scan.ino @@ -9,7 +9,7 @@ #include #include -#if !CONFIG_BT_NIMBLE_EXT_ADV +#if !MYNEWT_VAL(BLE_EXT_ADV) # error Must enable extended advertising, see nimconfig.h file. #endif diff --git a/examples/Bluetooth_5/NimBLE_extended_server/NimBLE_extended_server.ino b/examples/Bluetooth_5/NimBLE_extended_server/NimBLE_extended_server.ino index 3c7e4fc4..732b0d8e 100644 --- a/examples/Bluetooth_5/NimBLE_extended_server/NimBLE_extended_server.ino +++ b/examples/Bluetooth_5/NimBLE_extended_server/NimBLE_extended_server.ino @@ -14,7 +14,7 @@ #include #include -#if !CONFIG_BT_NIMBLE_EXT_ADV +#if !MYNEWT_VAL(BLE_EXT_ADV) # error Must enable extended advertising, see nimconfig.h file. #endif diff --git a/examples/Bluetooth_5/NimBLE_multi_advertiser/NimBLE_multi_advertiser.ino b/examples/Bluetooth_5/NimBLE_multi_advertiser/NimBLE_multi_advertiser.ino index 6938dc92..0affdb9f 100644 --- a/examples/Bluetooth_5/NimBLE_multi_advertiser/NimBLE_multi_advertiser.ino +++ b/examples/Bluetooth_5/NimBLE_multi_advertiser/NimBLE_multi_advertiser.ino @@ -14,7 +14,7 @@ #include #include -#if !CONFIG_BT_NIMBLE_EXT_ADV +#if !MYNEWT_VAL(BLE_EXT_ADV) # error Must enable extended advertising, see nimconfig.h file. #endif diff --git a/examples/L2CAP/L2CAP_Client/L2CAP_Client.ino b/examples/L2CAP/L2CAP_Client/L2CAP_Client.ino index 6d923c27..46444cdc 100644 --- a/examples/L2CAP/L2CAP_Client/L2CAP_Client.ino +++ b/examples/L2CAP/L2CAP_Client/L2CAP_Client.ino @@ -5,8 +5,8 @@ #include #include -#if CONFIG_BT_NIMBLE_L2CAP_COC_MAX_NUM <= 0 -# error "CONFIG_BT_NIMBLE_L2CAP_COC_MAX_NUM must be set to 1 or greater" +#if MYNEWT_VAL(BLE_L2CAP_COC_MAX_NUM) < 1 +# error "MYNEWT_VAL_BLE_L2CAP_COC_MAX_NUM must be set to 1 or greater" #endif // See the following for generating UUIDs: diff --git a/examples/NimBLE_Client/NimBLE_Client.ino b/examples/NimBLE_Client/NimBLE_Client.ino index 1209310b..aa6f8a4c 100644 --- a/examples/NimBLE_Client/NimBLE_Client.ino +++ b/examples/NimBLE_Client/NimBLE_Client.ino @@ -113,7 +113,7 @@ bool connectToServer() { /** No client to reuse? Create a new one. */ if (!pClient) { - if (NimBLEDevice::getCreatedClientCount() >= NIMBLE_MAX_CONNECTIONS) { + if (NimBLEDevice::getCreatedClientCount() >= MYNEWT_VAL(BLE_MAX_CONNECTIONS)) { Serial.printf("Max clients reached - no more connections available\n"); return false; } diff --git a/src/NimBLE2904.cpp b/src/NimBLE2904.cpp index 24075139..323faad8 100644 --- a/src/NimBLE2904.cpp +++ b/src/NimBLE2904.cpp @@ -16,7 +16,7 @@ */ #include "NimBLE2904.h" -#if CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_PERIPHERAL +#if CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_ROLE_PERIPHERAL) NimBLE2904::NimBLE2904(NimBLECharacteristic* pChr) : NimBLEDescriptor(NimBLEUUID((uint16_t)0x2904), BLE_GATT_CHR_F_READ, sizeof(NimBLE2904Data), pChr) { @@ -69,4 +69,4 @@ void NimBLE2904::setUnit(uint16_t unit) { setValue(m_data); } // setUnit -#endif // CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_PERIPHERAL +#endif // CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_ROLE_PERIPHERAL) diff --git a/src/NimBLE2904.h b/src/NimBLE2904.h index 1c10e3b5..ad97ea66 100644 --- a/src/NimBLE2904.h +++ b/src/NimBLE2904.h @@ -18,8 +18,8 @@ #ifndef NIMBLE_CPP_2904_H_ #define NIMBLE_CPP_2904_H_ -#include "nimconfig.h" -#if CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_PERIPHERAL +#include "syscfg/syscfg.h" +#if CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_ROLE_PERIPHERAL) # include "NimBLEDescriptor.h" @@ -79,5 +79,5 @@ class NimBLE2904 : public NimBLEDescriptor { NimBLE2904Data m_data{}; }; // NimBLE2904 -#endif // CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_PERIPHERAL +#endif // CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_ROLE_PERIPHERAL) #endif // NIMBLE_CPP_2904_H_ diff --git a/src/NimBLEAddress.cpp b/src/NimBLEAddress.cpp index 0ff46e19..b0094913 100644 --- a/src/NimBLEAddress.cpp +++ b/src/NimBLEAddress.cpp @@ -16,7 +16,7 @@ */ #include "NimBLEAddress.h" -#if CONFIG_BT_ENABLED +#if CONFIG_BT_NIMBLE_ENABLED # include "NimBLELog.h" diff --git a/src/NimBLEAddress.h b/src/NimBLEAddress.h index 58f00132..89d19ab8 100644 --- a/src/NimBLEAddress.h +++ b/src/NimBLEAddress.h @@ -18,8 +18,8 @@ #ifndef NIMBLE_CPP_ADDRESS_H_ #define NIMBLE_CPP_ADDRESS_H_ -#include "nimconfig.h" -#if CONFIG_BT_ENABLED +#include "syscfg/syscfg.h" +#if CONFIG_BT_NIMBLE_ENABLED # if defined(CONFIG_NIMBLE_CPP_IDF) # include "nimble/ble.h" @@ -67,5 +67,5 @@ class NimBLEAddress : private ble_addr_t { operator uint64_t() const; }; -#endif // CONFIG_BT_ENABLED +#endif // CONFIG_BT_NIMBLE_ENABLED #endif // NIMBLE_CPP_ADDRESS_H_ diff --git a/src/NimBLEAdvertisedDevice.cpp b/src/NimBLEAdvertisedDevice.cpp index 191b5c00..3b89768e 100644 --- a/src/NimBLEAdvertisedDevice.cpp +++ b/src/NimBLEAdvertisedDevice.cpp @@ -16,7 +16,7 @@ */ #include "NimBLEAdvertisedDevice.h" -#if CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_OBSERVER +#if CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_ROLE_OBSERVER) # include "NimBLEDevice.h" # include "NimBLEUtils.h" @@ -31,7 +31,7 @@ static const char* LOG_TAG = "NimBLEAdvertisedDevice"; * @param [in] event The advertisement event data. */ NimBLEAdvertisedDevice::NimBLEAdvertisedDevice(const ble_gap_event* event, uint8_t eventType) -# if CONFIG_BT_NIMBLE_EXT_ADV +# if MYNEWT_VAL(BLE_EXT_ADV) : m_address{event->ext_disc.addr}, m_advType{eventType}, m_rssi{event->ext_disc.rssi}, @@ -58,7 +58,7 @@ NimBLEAdvertisedDevice::NimBLEAdvertisedDevice(const ble_gap_event* event, uint8 * @param [in] event The advertisement event data. */ void NimBLEAdvertisedDevice::update(const ble_gap_event* event, uint8_t eventType) { -# if CONFIG_BT_NIMBLE_EXT_ADV +# if MYNEWT_VAL(BLE_EXT_ADV) const auto& disc = event->ext_disc; m_isLegacyAdv = disc.props & BLE_HCI_ADV_LEGACY_MASK; # else @@ -580,7 +580,7 @@ bool NimBLEAdvertisedDevice::haveTXPower() const { return findAdvField(BLE_HS_ADV_TYPE_TX_PWR_LVL) > 0; } // haveTXPower -# if CONFIG_BT_NIMBLE_EXT_ADV +# if MYNEWT_VAL(BLE_EXT_ADV) /** * @brief Get the set ID of the extended advertisement. * @return The set ID. @@ -751,7 +751,7 @@ uint8_t NimBLEAdvertisedDevice::getAddressType() const { * @return True if the device is connectable. */ bool NimBLEAdvertisedDevice::isConnectable() const { -# if CONFIG_BT_NIMBLE_EXT_ADV +# if MYNEWT_VAL(BLE_EXT_ADV) if (m_isLegacyAdv) { return m_advType == BLE_HCI_ADV_RPT_EVTYPE_ADV_IND || m_advType == BLE_HCI_ADV_RPT_EVTYPE_DIR_IND; } @@ -772,7 +772,7 @@ bool NimBLEAdvertisedDevice::isScannable() const { * @return True if legacy (Bluetooth 4.x), false if extended (bluetooth 5.x). */ bool NimBLEAdvertisedDevice::isLegacyAdvertisement() const { -# if CONFIG_BT_NIMBLE_EXT_ADV +# if MYNEWT_VAL(BLE_EXT_ADV) return m_isLegacyAdv; # else return true; @@ -813,4 +813,4 @@ const std::vector::const_iterator NimBLEAdvertisedDevice::end() const { return m_payload.cend(); } -#endif // CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_OBSERVER +#endif // CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_ROLE_OBSERVER) diff --git a/src/NimBLEAdvertisedDevice.h b/src/NimBLEAdvertisedDevice.h index 2348e8ae..1384b112 100644 --- a/src/NimBLEAdvertisedDevice.h +++ b/src/NimBLEAdvertisedDevice.h @@ -18,8 +18,8 @@ #ifndef NIMBLE_CPP_ADVERTISED_DEVICE_H_ #define NIMBLE_CPP_ADVERTISED_DEVICE_H_ -#include "nimconfig.h" -#if CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_OBSERVER +#include "syscfg/syscfg.h" +#if CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_ROLE_OBSERVER) # include "NimBLEAddress.h" # include "NimBLEScan.h" @@ -87,7 +87,7 @@ class NimBLEAdvertisedDevice { bool isConnectable() const; bool isScannable() const; bool isLegacyAdvertisement() const; -# if CONFIG_BT_NIMBLE_EXT_ADV +# if MYNEWT_VAL(BLE_EXT_ADV) uint8_t getSetId() const; uint8_t getPrimaryPhy() const; uint8_t getSecondaryPhy() const; @@ -163,7 +163,7 @@ class NimBLEAdvertisedDevice { uint8_t m_callbackSent{}; uint8_t m_advLength{}; -# if CONFIG_BT_NIMBLE_EXT_ADV +# if MYNEWT_VAL(BLE_EXT_ADV) bool m_isLegacyAdv{}; uint8_t m_sid{}; uint8_t m_primPhy{}; @@ -174,5 +174,5 @@ class NimBLEAdvertisedDevice { std::vector m_payload; }; -#endif /* CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_OBSERVER */ +#endif /* CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_ROLE_OBSERVER) */ #endif /* NIMBLE_CPP_ADVERTISED_DEVICE_H_ */ diff --git a/src/NimBLEAdvertisementData.cpp b/src/NimBLEAdvertisementData.cpp index 7d4c391a..f45ba3e7 100644 --- a/src/NimBLEAdvertisementData.cpp +++ b/src/NimBLEAdvertisementData.cpp @@ -16,7 +16,7 @@ */ #include "NimBLEAdvertisementData.h" -#if (CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_BROADCASTER && !CONFIG_BT_NIMBLE_EXT_ADV) || defined(_DOXYGEN_) +#if (CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_ROLE_BROADCASTER) && !MYNEWT_VAL(BLE_EXT_ADV)) || defined(_DOXYGEN_) # include "NimBLEDevice.h" # include "NimBLEUtils.h" @@ -583,4 +583,4 @@ std::string NimBLEAdvertisementData::toString() const { return str; } // toString -#endif // (CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_BROADCASTER && !CONFIG_BT_NIMBLE_EXT_ADV) || defined(_DOXYGEN_) +#endif // (CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_ROLE_BROADCASTER) && !MYNEWT_VAL(BLE_EXT_ADV)) || defined(_DOXYGEN_) diff --git a/src/NimBLEAdvertisementData.h b/src/NimBLEAdvertisementData.h index d1004744..9c1ae3f7 100644 --- a/src/NimBLEAdvertisementData.h +++ b/src/NimBLEAdvertisementData.h @@ -18,8 +18,8 @@ #ifndef NIMBLE_CPP_ADVERTISEMENT_DATA_H_ #define NIMBLE_CPP_ADVERTISEMENT_DATA_H_ -#include "nimconfig.h" -#if (CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_BROADCASTER && !CONFIG_BT_NIMBLE_EXT_ADV) || defined(_DOXYGEN_) +#include "syscfg/syscfg.h" +#if (CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_ROLE_BROADCASTER) && !MYNEWT_VAL(BLE_EXT_ADV)) || defined(_DOXYGEN_) # include # include @@ -74,5 +74,5 @@ class NimBLEAdvertisementData { std::vector m_payload{}; }; // NimBLEAdvertisementData -#endif // (CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_BROADCASTER && !CONFIG_BT_NIMBLE_EXT_ADV) || defined(_DOXYGEN_) +#endif // (CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_ROLE_BROADCASTER) && !MYNEWT_VAL(BLE_EXT_ADV)) || defined(_DOXYGEN_) #endif // NIMBLE_CPP_ADVERTISEMENT_DATA_H_ diff --git a/src/NimBLEAdvertising.cpp b/src/NimBLEAdvertising.cpp index f17d930d..a93e9eef 100644 --- a/src/NimBLEAdvertising.cpp +++ b/src/NimBLEAdvertising.cpp @@ -16,7 +16,7 @@ */ #include "NimBLEAdvertising.h" -#if (CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_BROADCASTER && !CONFIG_BT_NIMBLE_EXT_ADV) || defined(_DOXYGEN_) +#if (CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_ROLE_BROADCASTER) && !MYNEWT_VAL(BLE_EXT_ADV)) || defined(_DOXYGEN_) # if defined(CONFIG_NIMBLE_CPP_IDF) # include "services/gap/ble_svc_gap.h" @@ -42,7 +42,7 @@ NimBLEAdvertising::NimBLEAdvertising() m_duration{BLE_HS_FOREVER}, m_scanResp{false}, m_advDataSet{false} { -# if !CONFIG_BT_NIMBLE_ROLE_PERIPHERAL +# if !MYNEWT_VAL(BLE_ROLE_PERIPHERAL) m_advParams.conn_mode = BLE_GAP_CONN_MODE_NON; # else m_advParams.conn_mode = BLE_GAP_CONN_MODE_UND; @@ -195,7 +195,7 @@ bool NimBLEAdvertising::start(uint32_t duration, const NimBLEAddress* dirAddr) { return true; } -# if CONFIG_BT_NIMBLE_ROLE_PERIPHERAL +# if MYNEWT_VAL(BLE_ROLE_PERIPHERAL) NimBLEServer* pServer = NimBLEDevice::getServer(); if (pServer != nullptr) { pServer->start(); // make sure the GATT server is ready before advertising @@ -220,7 +220,7 @@ bool NimBLEAdvertising::start(uint32_t duration, const NimBLEAddress* dirAddr) { duration = BLE_HS_FOREVER; } -# if CONFIG_BT_NIMBLE_ROLE_PERIPHERAL +# if MYNEWT_VAL(BLE_ROLE_PERIPHERAL) int rc = ble_gap_adv_start(NimBLEDevice::m_ownAddrType, (dirAddr != nullptr) ? dirAddr->getBase() : NULL, duration, @@ -620,4 +620,4 @@ bool NimBLEAdvertising::setServiceData(const NimBLEUUID& uuid, const std::string return setServiceData(uuid, reinterpret_cast(data.data()), data.length()); } // setServiceData -#endif // (CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_BROADCASTER && !CONFIG_BT_NIMBLE_EXT_ADV) || defined(_DOXYGEN_) +#endif // (CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_ROLE_BROADCASTER) && !MYNEWT_VAL(BLE_EXT_ADV)) || defined(_DOXYGEN_) diff --git a/src/NimBLEAdvertising.h b/src/NimBLEAdvertising.h index b5a243cf..c2811454 100644 --- a/src/NimBLEAdvertising.h +++ b/src/NimBLEAdvertising.h @@ -18,8 +18,8 @@ #ifndef NIMBLE_CPP_ADVERTISING_H_ #define NIMBLE_CPP_ADVERTISING_H_ -#include "nimconfig.h" -#if (CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_BROADCASTER && !CONFIG_BT_NIMBLE_EXT_ADV) || defined(_DOXYGEN_) +#include "syscfg/syscfg.h" +#if (CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_ROLE_BROADCASTER) && !MYNEWT_VAL(BLE_EXT_ADV)) || defined(_DOXYGEN_) # if defined(CONFIG_NIMBLE_CPP_IDF) # include "host/ble_gap.h" @@ -105,5 +105,5 @@ class NimBLEAdvertising { bool m_advDataSet : 1; }; -#endif // (CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_BROADCASTER && !CONFIG_BT_NIMBLE_EXT_ADV) || defined(_DOXYGEN_) +#endif // (CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_ROLE_BROADCASTER) && !MYNEWT_VAL(BLE_EXT_ADV)) || defined(_DOXYGEN_) #endif // NIMBLE_CPP_ADVERTISING_H_ diff --git a/src/NimBLEAttValue.cpp b/src/NimBLEAttValue.cpp index fbc164c9..e4e4993e 100644 --- a/src/NimBLEAttValue.cpp +++ b/src/NimBLEAttValue.cpp @@ -16,7 +16,7 @@ */ #include "NimBLEAttValue.h" -#if CONFIG_BT_ENABLED +#if CONFIG_BT_NIMBLE_ENABLED # if defined(CONFIG_NIMBLE_CPP_IDF) # include "nimble/nimble_npl.h" @@ -24,6 +24,7 @@ # include "nimble/nimble/include/nimble/nimble_npl.h" # endif +# include "NimBLEUtils.h" # include "NimBLELog.h" static const char* LOG_TAG = "NimBLEAttValue"; @@ -159,4 +160,4 @@ uint8_t NimBLEAttValue::operator[](int pos) const { return m_attr_value[pos]; } -#endif // CONFIG_BT_ENABLED +#endif // CONFIG_BT_NIMBLE_ENABLED diff --git a/src/NimBLEAttValue.h b/src/NimBLEAttValue.h index 24b64c83..0a3807d2 100644 --- a/src/NimBLEAttValue.h +++ b/src/NimBLEAttValue.h @@ -18,8 +18,8 @@ #ifndef NIMBLE_CPP_ATTVALUE_H #define NIMBLE_CPP_ATTVALUE_H -#include "nimconfig.h" -#if CONFIG_BT_ENABLED +#include "syscfg/syscfg.h" +#if CONFIG_BT_NIMBLE_ENABLED # ifdef NIMBLE_CPP_ARDUINO_STRING_AVAILABLE # include @@ -363,5 +363,5 @@ class NimBLEAttValue { # endif }; -#endif // CONFIG_BT_ENABLED +#endif // CONFIG_BT_NIMBLE_ENABLED #endif // NIMBLE_CPP_ATTVALUE_H_ diff --git a/src/NimBLEAttribute.h b/src/NimBLEAttribute.h index 7ba95c7d..81221d7a 100644 --- a/src/NimBLEAttribute.h +++ b/src/NimBLEAttribute.h @@ -18,8 +18,8 @@ #ifndef NIMBLE_CPP_ATTRIBUTE_H_ #define NIMBLE_CPP_ATTRIBUTE_H_ -#include "nimconfig.h" -#if CONFIG_BT_ENABLED && (CONFIG_BT_NIMBLE_ROLE_PERIPHERAL || CONFIG_BT_NIMBLE_ROLE_CENTRAL) +#include "syscfg/syscfg.h" +#if CONFIG_BT_NIMBLE_ENABLED && (MYNEWT_VAL(BLE_ROLE_PERIPHERAL) || MYNEWT_VAL(BLE_ROLE_CENTRAL)) # include "NimBLEUUID.h" @@ -56,5 +56,5 @@ class NimBLEAttribute { uint16_t m_handle{0}; }; -#endif // CONFIG_BT_ENABLED && (CONFIG_BT_NIMBLE_ROLE_PERIPHERAL || CONFIG_BT_NIMBLE_ROLE_CENTRAL) +#endif // CONFIG_BT_NIMBLE_ENABLED && (MYNEWT_VAL(BLE_ROLE_PERIPHERAL) || MYNEWT_VAL(BLE_ROLE_CENTRAL)) #endif // NIMBLE_CPP_ATTRIBUTE_H_ diff --git a/src/NimBLEBeacon.cpp b/src/NimBLEBeacon.cpp index e9b93617..997b4116 100644 --- a/src/NimBLEBeacon.cpp +++ b/src/NimBLEBeacon.cpp @@ -16,7 +16,7 @@ */ #include "NimBLEBeacon.h" -#if CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_BROADCASTER +#if CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_ROLE_BROADCASTER) # include "NimBLEUUID.h" # include "NimBLELog.h" @@ -137,4 +137,4 @@ void NimBLEBeacon::setSignalPower(int8_t signalPower) { m_beaconData.signalPower = signalPower; } // setSignalPower -#endif // CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_BROADCASTER +#endif // CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_ROLE_BROADCASTER) diff --git a/src/NimBLEBeacon.h b/src/NimBLEBeacon.h index 061e1f60..1607ef66 100644 --- a/src/NimBLEBeacon.h +++ b/src/NimBLEBeacon.h @@ -18,8 +18,8 @@ #ifndef NIMBLE_CPP_BEACON_H_ #define NIMBLE_CPP_BEACON_H_ -#include "nimconfig.h" -#if CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_BROADCASTER +#include "syscfg/syscfg.h" +#if CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_ROLE_BROADCASTER) class NimBLEUUID; @@ -65,5 +65,5 @@ class NimBLEBeacon { BeaconData m_beaconData; }; // NimBLEBeacon -#endif // CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_PERIPHERAL +#endif // CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_ROLE_PERIPHERAL) #endif // NIMBLE_CPP_BEACON_H_ diff --git a/src/NimBLECharacteristic.cpp b/src/NimBLECharacteristic.cpp index 26ce838e..0e2736d0 100644 --- a/src/NimBLECharacteristic.cpp +++ b/src/NimBLECharacteristic.cpp @@ -16,7 +16,7 @@ */ # include "NimBLECharacteristic.h" -#if CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_PERIPHERAL +#if CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_ROLE_PERIPHERAL) # include "NimBLE2904.h" # include "NimBLEDevice.h" @@ -414,4 +414,4 @@ void NimBLECharacteristicCallbacks::onSubscribe(NimBLECharacteristic* pCharacter NIMBLE_LOGD("NimBLECharacteristicCallbacks", "onSubscribe: default"); } -#endif // CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_PERIPHERAL +#endif // CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_ROLE_PERIPHERAL) diff --git a/src/NimBLECharacteristic.h b/src/NimBLECharacteristic.h index 02ae89a7..789d21d7 100644 --- a/src/NimBLECharacteristic.h +++ b/src/NimBLECharacteristic.h @@ -18,8 +18,8 @@ #ifndef NIMBLE_CPP_CHARACTERISTIC_H_ #define NIMBLE_CPP_CHARACTERISTIC_H_ -#include "nimconfig.h" -#if CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_PERIPHERAL +#include "syscfg/syscfg.h" +#if CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_ROLE_PERIPHERAL) class NimBLECharacteristicCallbacks; class NimBLEService; @@ -254,5 +254,5 @@ class NimBLECharacteristicCallbacks { virtual void onSubscribe(NimBLECharacteristic* pCharacteristic, NimBLEConnInfo& connInfo, uint16_t subValue); }; -#endif // CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_PERIPHERAL +#endif // CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_ROLE_PERIPHERAL) #endif // NIMBLE_CPP_CHARACTERISTIC_H_ diff --git a/src/NimBLEClient.cpp b/src/NimBLEClient.cpp index 909b3511..f2120232 100644 --- a/src/NimBLEClient.cpp +++ b/src/NimBLEClient.cpp @@ -16,7 +16,7 @@ */ #include "NimBLEClient.h" -#if CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_CENTRAL +#if CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_ROLE_CENTRAL) # include "NimBLERemoteService.h" # include "NimBLERemoteCharacteristic.h" @@ -68,7 +68,7 @@ NimBLEClient::NimBLEClient(const NimBLEAddress& peerAddress) m_terminateFailCount{0}, m_asyncSecureAttempt{0}, m_config{}, -# if CONFIG_BT_NIMBLE_EXT_ADV +# if MYNEWT_VAL(BLE_EXT_ADV) m_phyMask{BLE_GAP_LE_PHY_1M_MASK | BLE_GAP_LE_PHY_2M_MASK | BLE_GAP_LE_PHY_CODED_MASK}, # endif m_connParams{16, @@ -125,7 +125,7 @@ size_t NimBLEClient::deleteService(const NimBLEUUID& uuid) { return m_svcVec.size(); } // deleteService -# if CONFIG_BT_NIMBLE_ROLE_OBSERVER +# if MYNEWT_VAL(BLE_ROLE_OBSERVER) /** * @brief Connect to an advertising device. * @param [in] pDevice A pointer to the advertised device instance to connect to. @@ -204,7 +204,7 @@ bool NimBLEClient::connect(const NimBLEAddress& address, bool deleteAttributes, m_config.exchangeMTU = exchangeMTU; do { -# if CONFIG_BT_NIMBLE_EXT_ADV +# if MYNEWT_VAL(BLE_EXT_ADV) rc = ble_gap_ext_connect(NimBLEDevice::m_ownAddrType, peerAddr, m_connectTimeout, @@ -228,7 +228,7 @@ bool NimBLEClient::connect(const NimBLEAddress& address, bool deleteAttributes, break; case BLE_HS_EBUSY: -# if CONFIG_BT_NIMBLE_ROLE_OBSERVER +# if MYNEWT_VAL(BLE_ROLE_OBSERVER) // Scan was active, stop it through the NimBLEScan API to release any tasks and call the callback. if (!NimBLEDevice::getScan()->stop()) { @@ -402,7 +402,7 @@ void NimBLEClient::setConfig(NimBLEClient::Config config) { m_config = config; } // setConfig -# if CONFIG_BT_NIMBLE_EXT_ADV +# if MYNEWT_VAL(BLE_EXT_ADV) /** * @brief Set the PHY types to use when connecting to a server. * @param [in] mask A bitmask indicating what PHYS to connect with.\n @@ -1311,4 +1311,4 @@ void NimBLEClientCallbacks::onPhyUpdate(NimBLEClient* pClient, uint8_t txPhy, ui } // onPhyUpdate # -#endif // CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_CENTRAL +#endif // CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_ROLE_CENTRAL) diff --git a/src/NimBLEClient.h b/src/NimBLEClient.h index eb205e2e..2dac6563 100644 --- a/src/NimBLEClient.h +++ b/src/NimBLEClient.h @@ -18,8 +18,8 @@ #ifndef NIMBLE_CPP_CLIENT_H_ #define NIMBLE_CPP_CLIENT_H_ -#include "nimconfig.h" -#if CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_CENTRAL +#include "syscfg/syscfg.h" +#if CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_ROLE_CENTRAL) # if defined(CONFIG_NIMBLE_CPP_IDF) # include "host/ble_gap.h" @@ -48,7 +48,7 @@ struct NimBLETaskData; */ class NimBLEClient { public: -# if CONFIG_BT_NIMBLE_ROLE_OBSERVER +# if MYNEWT_VAL(BLE_ROLE_OBSERVER) bool connect(const NimBLEAdvertisedDevice* device, bool deleteAttributes = true, bool asyncConnect = false, @@ -95,7 +95,7 @@ class NimBLEClient { const NimBLEAttValue& value, bool response = false); -# if CONFIG_BT_NIMBLE_EXT_ADV +# if MYNEWT_VAL(BLE_EXT_ADV) void setConnectPhy(uint8_t phyMask); # endif bool updatePhy(uint8_t txPhysMask, uint8_t rxPhysMask, uint16_t phyOptions = 0); @@ -137,7 +137,7 @@ class NimBLEClient { mutable uint8_t m_asyncSecureAttempt; Config m_config; -# if CONFIG_BT_NIMBLE_EXT_ADV +# if MYNEWT_VAL(BLE_EXT_ADV) uint8_t m_phyMask; # endif ble_gap_conn_params m_connParams; @@ -229,5 +229,5 @@ class NimBLEClientCallbacks { virtual void onPhyUpdate(NimBLEClient* pClient, uint8_t txPhy, uint8_t rxPhy); }; -#endif // CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_CENTRAL +#endif // CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_ROLE_CENTRAL) #endif // NIMBLE_CPP_CLIENT_H_ diff --git a/src/NimBLEDescriptor.cpp b/src/NimBLEDescriptor.cpp index d85d1d1a..8f1bb41e 100644 --- a/src/NimBLEDescriptor.cpp +++ b/src/NimBLEDescriptor.cpp @@ -16,7 +16,7 @@ */ #include "NimBLEDescriptor.h" -#if CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_PERIPHERAL +#if CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_ROLE_PERIPHERAL) # include "NimBLEService.h" # include "NimBLELog.h" @@ -147,4 +147,4 @@ void NimBLEDescriptorCallbacks::onWrite(NimBLEDescriptor* pDescriptor, NimBLECon NIMBLE_LOGD("NimBLEDescriptorCallbacks", "onWrite: default"); } // onWrite -#endif // CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_PERIPHERAL +#endif // CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_ROLE_PERIPHERAL) diff --git a/src/NimBLEDescriptor.h b/src/NimBLEDescriptor.h index 907ad09c..b6e9b8f2 100644 --- a/src/NimBLEDescriptor.h +++ b/src/NimBLEDescriptor.h @@ -18,8 +18,8 @@ #ifndef NIMBLE_CPP_DESCRIPTOR_H_ #define NIMBLE_CPP_DESCRIPTOR_H_ -#include "nimconfig.h" -#if CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_PERIPHERAL +#include "syscfg/syscfg.h" +#if CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_ROLE_PERIPHERAL) # include "NimBLELocalValueAttribute.h" # include @@ -72,5 +72,5 @@ class NimBLEDescriptorCallbacks { # include "NimBLE2904.h" -#endif // CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_PERIPHERAL +#endif // CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_ROLE_PERIPHERAL) #endif // NIMBLE_CPP_DESCRIPTOR_H_ diff --git a/src/NimBLEDevice.cpp b/src/NimBLEDevice.cpp index 4b20674d..087ccf5d 100644 --- a/src/NimBLEDevice.cpp +++ b/src/NimBLEDevice.cpp @@ -16,7 +16,7 @@ */ #include "NimBLEDevice.h" -#if CONFIG_BT_ENABLED +#if CONFIG_BT_NIMBLE_ENABLED # ifdef ESP_PLATFORM # include "esp_err.h" @@ -68,27 +68,27 @@ extern "C" void ble_store_config_init(void); NimBLEDeviceCallbacks NimBLEDevice::defaultDeviceCallbacks{}; NimBLEDeviceCallbacks* NimBLEDevice::m_pDeviceCallbacks = &defaultDeviceCallbacks; -# if CONFIG_BT_NIMBLE_ROLE_OBSERVER +# if MYNEWT_VAL(BLE_ROLE_OBSERVER) NimBLEScan* NimBLEDevice::m_pScan = nullptr; # endif -# if CONFIG_BT_NIMBLE_ROLE_PERIPHERAL +# if MYNEWT_VAL(BLE_ROLE_PERIPHERAL) NimBLEServer* NimBLEDevice::m_pServer = nullptr; -# if CONFIG_BT_NIMBLE_L2CAP_COC_MAX_NUM > 0 +# if MYNEWT_VAL(BLE_L2CAP_COC_MAX_NUM) NimBLEL2CAPServer* NimBLEDevice::m_pL2CAPServer = nullptr; # endif # endif -# if CONFIG_BT_NIMBLE_ROLE_BROADCASTER -# if CONFIG_BT_NIMBLE_EXT_ADV +# if MYNEWT_VAL(BLE_ROLE_BROADCASTER) +# if MYNEWT_VAL(BLE_EXT_ADV) NimBLEExtAdvertising* NimBLEDevice::m_bleAdvertising = nullptr; # else NimBLEAdvertising* NimBLEDevice::m_bleAdvertising = nullptr; # endif # endif -# if CONFIG_BT_NIMBLE_ROLE_CENTRAL -std::array NimBLEDevice::m_pClients{}; +# if MYNEWT_VAL(BLE_ROLE_CENTRAL) +std::array NimBLEDevice::m_pClients{}; # endif bool NimBLEDevice::m_initialized{false}; @@ -118,7 +118,7 @@ extern "C" int ble_vhci_disc_duplicate_mode_enable(int mode); /* SERVER FUNCTIONS */ /* -------------------------------------------------------------------------- */ -# if CONFIG_BT_NIMBLE_ROLE_PERIPHERAL +# if MYNEWT_VAL(BLE_ROLE_PERIPHERAL) /** * @brief Create an instance of a server. * @return A pointer to the instance of the server. @@ -142,7 +142,7 @@ NimBLEServer* NimBLEDevice::getServer() { return m_pServer; } // getServer -# if CONFIG_BT_NIMBLE_L2CAP_COC_MAX_NUM +# if MYNEWT_VAL(BLE_L2CAP_COC_MAX_NUM) /** * @brief Create an instance of a L2CAP server. * @return A pointer to the instance of the L2CAP server. @@ -161,15 +161,15 @@ NimBLEL2CAPServer* NimBLEDevice::createL2CAPServer() { NimBLEL2CAPServer* NimBLEDevice::getL2CAPServer() { return m_pL2CAPServer; } // getL2CAPServer -# endif // #if CONFIG_BT_NIMBLE_L2CAP_COC_MAX_NUM -# endif // #if CONFIG_BT_NIMBLE_ROLE_PERIPHERAL +# endif // #if MYNEWT_VAL(BLE_L2CAP_COC_MAX_NUM) +# endif // #if MYNEWT_VAL(BLE_ROLE_PERIPHERAL) /* -------------------------------------------------------------------------- */ /* ADVERTISING FUNCTIONS */ /* -------------------------------------------------------------------------- */ -# if CONFIG_BT_NIMBLE_ROLE_BROADCASTER -# if CONFIG_BT_NIMBLE_EXT_ADV +# if MYNEWT_VAL(BLE_ROLE_BROADCASTER) +# if MYNEWT_VAL(BLE_EXT_ADV) /** * @brief Get the instance of the extended advertising object. * @return A pointer to the extended advertising object. @@ -203,7 +203,7 @@ bool NimBLEDevice::stopAdvertising(uint8_t instId) { } // stopAdvertising # endif -# if !CONFIG_BT_NIMBLE_EXT_ADV || defined(_DOXYGEN_) +# if !MYNEWT_VAL(BLE_EXT_ADV) || defined(_DOXYGEN_) /** * @brief Get the instance of the advertising object. * @return A pointer to the advertising object. @@ -232,7 +232,7 @@ bool NimBLEDevice::startAdvertising(uint32_t duration) { bool NimBLEDevice::stopAdvertising() { return getAdvertising()->stop(); } // stopAdvertising -# endif // #if CONFIG_BT_NIMBLE_ROLE_BROADCASTER +# endif // #if MYNEWT_VAL(BLE_ROLE_BROADCASTER) /* -------------------------------------------------------------------------- */ /* SCAN FUNCTIONS */ @@ -243,7 +243,7 @@ bool NimBLEDevice::stopAdvertising() { * @return The scanning object reference. This is a singleton object. The caller should not * try and release/delete it. */ -# if CONFIG_BT_NIMBLE_ROLE_OBSERVER +# if MYNEWT_VAL(BLE_ROLE_OBSERVER) NimBLEScan* NimBLEDevice::getScan() { if (m_pScan == nullptr) { m_pScan = new NimBLEScan(); @@ -321,13 +321,13 @@ void NimBLEDevice::setScanDuplicateCacheResetTime(uint16_t time) { } # endif // CONFIG_BTDM_BLE_SCAN_DUPL || CONFIG_BT_LE_SCAN_DUPL # endif // ESP_PLATFORM -# endif // CONFIG_BT_NIMBLE_ROLE_OBSERVER +# endif // MYNEWT_VAL(BLE_ROLE_OBSERVER) /* -------------------------------------------------------------------------- */ /* CLIENT FUNCTIONS */ /* -------------------------------------------------------------------------- */ -# if CONFIG_BT_NIMBLE_ROLE_CENTRAL +# if MYNEWT_VAL(BLE_ROLE_CENTRAL) /** * @brief Creates a new client object, each client can connect to 1 peripheral device. * @return A pointer to the new client object, or nullptr on error. @@ -350,7 +350,7 @@ NimBLEClient* NimBLEDevice::createClient(const NimBLEAddress& peerAddress) { } } - NIMBLE_LOGE(LOG_TAG, "Unable to create client; already at max: %d", NIMBLE_MAX_CONNECTIONS); + NIMBLE_LOGE(LOG_TAG, "Unable to create client; already at max: %d", MYNEWT_VAL(BLE_MAX_CONNECTIONS)); return nullptr; } // createClient @@ -462,7 +462,7 @@ std::vector NimBLEDevice::getConnectedClients() { return clients; } // getConnectedClients -# endif // CONFIG_BT_NIMBLE_ROLE_CENTRAL +# endif // MYNEWT_VAL(BLE_ROLE_CENTRAL) /* -------------------------------------------------------------------------- */ /* TRANSMIT POWER */ @@ -613,7 +613,7 @@ uint16_t NimBLEDevice::getMTU() { /* BOND MANAGEMENT */ /* -------------------------------------------------------------------------- */ -# if CONFIG_BT_NIMBLE_ROLE_CENTRAL || CONFIG_BT_NIMBLE_ROLE_PERIPHERAL +# if MYNEWT_VAL(BLE_ROLE_CENTRAL) || MYNEWT_VAL(BLE_ROLE_PERIPHERAL) /** * @brief Gets the number of bonded peers stored */ @@ -850,13 +850,13 @@ void NimBLEDevice::onSync(void) { m_synced = true; if (m_initialized) { -# if CONFIG_BT_NIMBLE_ROLE_OBSERVER +# if MYNEWT_VAL(BLE_ROLE_OBSERVER) if (m_pScan != nullptr) { m_pScan->onHostSync(); } # endif -# if CONFIG_BT_NIMBLE_ROLE_BROADCASTER +# if MYNEWT_VAL(BLE_ROLE_BROADCASTER) if (m_bleAdvertising != nullptr) { m_bleAdvertising->onHostSync(); } @@ -907,11 +907,11 @@ bool NimBLEDevice::init(const std::string& deviceName) { esp_bt_controller_config_t bt_cfg = BT_CONTROLLER_INIT_CONFIG_DEFAULT(); # if defined(CONFIG_IDF_TARGET_ESP32) bt_cfg.mode = ESP_BT_MODE_BLE; - bt_cfg.ble_max_conn = CONFIG_BT_NIMBLE_MAX_CONNECTIONS; + bt_cfg.ble_max_conn = MYNEWT_VAL(BLE_MAX_CONNECTIONS); # elif defined(CONFIG_IDF_TARGET_ESP32C3) || defined(CONFIG_IDF_TARGET_ESP32S3) - bt_cfg.ble_max_act = CONFIG_BT_NIMBLE_MAX_CONNECTIONS; + bt_cfg.ble_max_act = MYNEWT_VAL(BLE_MAX_CONNECTIONS); # else - bt_cfg.nimble_max_connections = CONFIG_BT_NIMBLE_MAX_CONNECTIONS; + bt_cfg.nimble_max_connections = MYNEWT_VAL(BLE_MAX_CONNECTIONS); # endif # if CONFIG_BTDM_BLE_SCAN_DUPL @@ -1026,12 +1026,12 @@ bool NimBLEDevice::deinit(bool clearAll) { } if (clearAll) { -# if CONFIG_BT_NIMBLE_ROLE_PERIPHERAL +# if MYNEWT_VAL(BLE_ROLE_PERIPHERAL) if (NimBLEDevice::m_pServer != nullptr) { delete NimBLEDevice::m_pServer; NimBLEDevice::m_pServer = nullptr; } -# if CONFIG_BT_NIMBLE_L2CAP_COC_MAX_NUM +# if MYNEWT_VAL(BLE_L2CAP_COC_MAX_NUM) if (NimBLEDevice::m_pL2CAPServer != nullptr) { delete NimBLEDevice::m_pL2CAPServer; NimBLEDevice::m_pL2CAPServer = nullptr; @@ -1039,21 +1039,21 @@ bool NimBLEDevice::deinit(bool clearAll) { # endif # endif -# if CONFIG_BT_NIMBLE_ROLE_BROADCASTER +# if MYNEWT_VAL(BLE_ROLE_BROADCASTER) if (NimBLEDevice::m_bleAdvertising != nullptr) { delete NimBLEDevice::m_bleAdvertising; NimBLEDevice::m_bleAdvertising = nullptr; } # endif -# if CONFIG_BT_NIMBLE_ROLE_OBSERVER +# if MYNEWT_VAL(BLE_ROLE_OBSERVER) if (NimBLEDevice::m_pScan != nullptr) { delete NimBLEDevice::m_pScan; NimBLEDevice::m_pScan = nullptr; } # endif -# if CONFIG_BT_NIMBLE_ROLE_CENTRAL +# if MYNEWT_VAL(BLE_ROLE_CENTRAL) for (auto clt : m_pClients) { deleteClient(clt); } @@ -1254,7 +1254,7 @@ bool NimBLEDevice::startSecurity(uint16_t connHandle, int* rcPtr) { return rc == 0 || rc == BLE_HS_EALREADY; } // startSecurity -# if CONFIG_BT_NIMBLE_ROLE_CENTRAL || CONFIG_BT_NIMBLE_ROLE_PERIPHERAL +# if MYNEWT_VAL(BLE_ROLE_CENTRAL) || MYNEWT_VAL(BLE_ROLE_PERIPHERAL) /** * @brief Inject the provided passkey into the Security Manager. * @param [in] peerInfo Connection information for the peer. @@ -1279,7 +1279,7 @@ bool NimBLEDevice::injectConfirmPasskey(const NimBLEConnInfo& peerInfo, bool acc NIMBLE_LOGD(LOG_TAG, "BLE_SM_IOACT_NUMCMP; ble_sm_inject_io result: %d", rc); return rc == 0; } -# endif // CONFIG_BT_NIMBLE_ROLE_CENTRAL || CONFIG_BT_NIMBLE_ROLE_PERIPHERAL +# endif // MYNEWT_VAL(BLE_ROLE_CENTRAL) || MYNEWT_VAL(BLE_ROLE_PERIPHERAL) /* -------------------------------------------------------------------------- */ /* UTILITIES */ @@ -1346,4 +1346,4 @@ int NimBLEDeviceCallbacks::onStoreStatus(struct ble_store_status_event* event, v return ble_store_util_status_rr(event, arg); } -#endif // CONFIG_BT_ENABLED +#endif // CONFIG_BT_NIMBLE_ENABLED diff --git a/src/NimBLEDevice.h b/src/NimBLEDevice.h index df89852c..37075009 100644 --- a/src/NimBLEDevice.h +++ b/src/NimBLEDevice.h @@ -18,8 +18,8 @@ #ifndef NIMBLE_CPP_DEVICE_H_ #define NIMBLE_CPP_DEVICE_H_ -#include "nimconfig.h" -#if CONFIG_BT_ENABLED +#include "syscfg/syscfg.h" +#if CONFIG_BT_NIMBLE_ENABLED # ifdef ESP_PLATFORM # ifndef CONFIG_IDF_TARGET_ESP32P4 # include @@ -40,31 +40,31 @@ # include # include -# if CONFIG_BT_NIMBLE_ROLE_CENTRAL +# if MYNEWT_VAL(BLE_ROLE_CENTRAL) # include class NimBLEClient; # endif -# if CONFIG_BT_NIMBLE_ROLE_OBSERVER +# if MYNEWT_VAL(BLE_ROLE_OBSERVER) class NimBLEScan; # endif -# if CONFIG_BT_NIMBLE_ROLE_BROADCASTER -# if CONFIG_BT_NIMBLE_EXT_ADV +# if MYNEWT_VAL(BLE_ROLE_BROADCASTER) +# if MYNEWT_VAL(BLE_EXT_ADV) class NimBLEExtAdvertising; # else class NimBLEAdvertising; # endif # endif -# if CONFIG_BT_NIMBLE_ROLE_PERIPHERAL +# if MYNEWT_VAL(BLE_ROLE_PERIPHERAL) class NimBLEServer; -# if CONFIG_BT_NIMBLE_L2CAP_COC_MAX_NUM > 0 +# if MYNEWT_VAL(BLE_L2CAP_COC_MAX_NUM) class NimBLEL2CAPServer; # endif # endif -# if CONFIG_BT_NIMBLE_ROLE_PERIPHERAL || CONFIG_BT_NIMBLE_ROLE_CENTRAL +# if MYNEWT_VAL(BLE_ROLE_PERIPHERAL) || MYNEWT_VAL(BLE_ROLE_CENTRAL) class NimBLEConnInfo; # endif @@ -106,12 +106,6 @@ class NimBLEDeviceCallbacks; # define BLEL2CAPChannel NimBLEL2CAPChannel # define BLEL2CAPChannelCallbacks NimBLEL2CAPChannelCallbacks -# ifdef CONFIG_BT_NIMBLE_MAX_CONNECTIONS -# define NIMBLE_MAX_CONNECTIONS CONFIG_BT_NIMBLE_MAX_CONNECTIONS -# else -# define NIMBLE_MAX_CONNECTIONS CONFIG_NIMBLE_MAX_CONNECTIONS -# endif - enum class NimBLETxPowerType { All = 0, Advertise = 1, Scan = 2, Connection = 3 }; typedef int (*gap_event_handler)(ble_gap_event* event, void* arg); @@ -164,39 +158,39 @@ class NimBLEDevice { # endif # endif -# if CONFIG_BT_NIMBLE_ROLE_OBSERVER +# if MYNEWT_VAL(BLE_ROLE_OBSERVER) static NimBLEScan* getScan(); # endif -# if CONFIG_BT_NIMBLE_ROLE_PERIPHERAL +# if MYNEWT_VAL(BLE_ROLE_PERIPHERAL) static NimBLEServer* createServer(); static NimBLEServer* getServer(); -# if CONFIG_BT_NIMBLE_L2CAP_COC_MAX_NUM > 0 +# if MYNEWT_VAL(BLE_L2CAP_COC_MAX_NUM) static NimBLEL2CAPServer* createL2CAPServer(); static NimBLEL2CAPServer* getL2CAPServer(); # endif # endif -# if CONFIG_BT_NIMBLE_ROLE_PERIPHERAL || CONFIG_BT_NIMBLE_ROLE_CENTRAL +# if MYNEWT_VAL(BLE_ROLE_PERIPHERAL) || MYNEWT_VAL(BLE_ROLE_CENTRAL) static bool injectConfirmPasskey(const NimBLEConnInfo& peerInfo, bool accept); static bool injectPassKey(const NimBLEConnInfo& peerInfo, uint32_t pin); # endif -# if CONFIG_BT_NIMBLE_ROLE_BROADCASTER -# if CONFIG_BT_NIMBLE_EXT_ADV +# if MYNEWT_VAL(BLE_ROLE_BROADCASTER) +# if MYNEWT_VAL(BLE_EXT_ADV) static NimBLEExtAdvertising* getAdvertising(); static bool startAdvertising(uint8_t instId, int duration = 0, int maxEvents = 0); static bool stopAdvertising(uint8_t instId); static bool stopAdvertising(); # endif -# if !CONFIG_BT_NIMBLE_EXT_ADV || defined(_DOXYGEN_) +# if !MYNEWT_VAL(BLE_EXT_ADV) || defined(_DOXYGEN_) static NimBLEAdvertising* getAdvertising(); static bool startAdvertising(uint32_t duration = 0); static bool stopAdvertising(); # endif # endif -# if CONFIG_BT_NIMBLE_ROLE_CENTRAL +# if MYNEWT_VAL(BLE_ROLE_CENTRAL) static NimBLEClient* createClient(); static NimBLEClient* createClient(const NimBLEAddress& peerAddress); static bool deleteClient(NimBLEClient* pClient); @@ -207,7 +201,7 @@ class NimBLEDevice { static std::vector getConnectedClients(); # endif -# if CONFIG_BT_NIMBLE_ROLE_CENTRAL || CONFIG_BT_NIMBLE_ROLE_PERIPHERAL +# if MYNEWT_VAL(BLE_ROLE_CENTRAL) || MYNEWT_VAL(BLE_ROLE_PERIPHERAL) static bool deleteBond(const NimBLEAddress& address); static int getNumBonds(); static bool isBonded(const NimBLEAddress& address); @@ -225,27 +219,27 @@ class NimBLEDevice { static NimBLEDeviceCallbacks* m_pDeviceCallbacks; static NimBLEDeviceCallbacks defaultDeviceCallbacks; -# if CONFIG_BT_NIMBLE_ROLE_OBSERVER +# if MYNEWT_VAL(BLE_ROLE_OBSERVER) static NimBLEScan* m_pScan; # endif -# if CONFIG_BT_NIMBLE_ROLE_PERIPHERAL +# if MYNEWT_VAL(BLE_ROLE_PERIPHERAL) static NimBLEServer* m_pServer; -# if CONFIG_BT_NIMBLE_L2CAP_COC_MAX_NUM > 0 +# if MYNEWT_VAL(BLE_L2CAP_COC_MAX_NUM) static NimBLEL2CAPServer* m_pL2CAPServer; # endif # endif -# if CONFIG_BT_NIMBLE_ROLE_BROADCASTER -# if CONFIG_BT_NIMBLE_EXT_ADV +# if MYNEWT_VAL(BLE_ROLE_BROADCASTER) +# if MYNEWT_VAL(BLE_EXT_ADV) static NimBLEExtAdvertising* m_bleAdvertising; # else static NimBLEAdvertising* m_bleAdvertising; # endif # endif -# if CONFIG_BT_NIMBLE_ROLE_CENTRAL - static std::array m_pClients; +# if MYNEWT_VAL(BLE_ROLE_CENTRAL) + static std::array m_pClients; # endif # ifdef ESP_PLATFORM @@ -256,59 +250,59 @@ class NimBLEDevice { # endif # endif -# if CONFIG_BT_NIMBLE_ROLE_CENTRAL +# if MYNEWT_VAL(BLE_ROLE_CENTRAL) friend class NimBLEClient; # endif -# if CONFIG_BT_NIMBLE_ROLE_OBSERVER +# if MYNEWT_VAL(BLE_ROLE_OBSERVER) friend class NimBLEScan; # endif -# if CONFIG_BT_NIMBLE_ROLE_PERIPHERAL +# if MYNEWT_VAL(BLE_ROLE_PERIPHERAL) friend class NimBLEServer; friend class NimBLECharacteristic; # endif -# if CONFIG_BT_NIMBLE_ROLE_BROADCASTER +# if MYNEWT_VAL(BLE_ROLE_BROADCASTER) friend class NimBLEAdvertising; -# if CONFIG_BT_NIMBLE_EXT_ADV +# if MYNEWT_VAL(BLE_EXT_ADV) friend class NimBLEExtAdvertising; friend class NimBLEExtAdvertisement; # endif # endif }; -# if CONFIG_BT_NIMBLE_ROLE_CENTRAL +# if MYNEWT_VAL(BLE_ROLE_CENTRAL) # include "NimBLEClient.h" # include "NimBLERemoteService.h" # include "NimBLERemoteCharacteristic.h" # include "NimBLERemoteDescriptor.h" # endif -# if CONFIG_BT_NIMBLE_ROLE_OBSERVER +# if MYNEWT_VAL(BLE_ROLE_OBSERVER) # include "NimBLEScan.h" # endif -# if CONFIG_BT_NIMBLE_ROLE_PERIPHERAL +# if MYNEWT_VAL(BLE_ROLE_PERIPHERAL) # include "NimBLEServer.h" # include "NimBLEService.h" # include "NimBLECharacteristic.h" # include "NimBLEDescriptor.h" -# if CONFIG_BT_NIMBLE_L2CAP_COC_MAX_NUM +# if MYNEWT_VAL(BLE_L2CAP_COC_MAX_NUM) # include "NimBLEL2CAPServer.h" # include "NimBLEL2CAPChannel.h" # endif # endif -# if CONFIG_BT_NIMBLE_ROLE_BROADCASTER -# if CONFIG_BT_NIMBLE_EXT_ADV +# if MYNEWT_VAL(BLE_ROLE_BROADCASTER) +# if MYNEWT_VAL(BLE_EXT_ADV) # include "NimBLEExtAdvertising.h" # else # include "NimBLEAdvertising.h" # endif # endif -# if CONFIG_BT_NIMBLE_ROLE_CENTRAL || CONFIG_BT_NIMBLE_ROLE_PERIPHERAL +# if MYNEWT_VAL(BLE_ROLE_CENTRAL) || MYNEWT_VAL(BLE_ROLE_PERIPHERAL) # include "NimBLEConnInfo.h" # endif @@ -337,5 +331,5 @@ class NimBLEDeviceCallbacks { virtual int onStoreStatus(struct ble_store_status_event* event, void* arg); }; -#endif // CONFIG_BT_ENABLED +#endif // CONFIG_BT_NIMBLE_ENABLED #endif // NIMBLE_CPP_DEVICE_H_ diff --git a/src/NimBLEEddystoneTLM.cpp b/src/NimBLEEddystoneTLM.cpp index b374d3ac..8ee405b5 100644 --- a/src/NimBLEEddystoneTLM.cpp +++ b/src/NimBLEEddystoneTLM.cpp @@ -16,7 +16,7 @@ */ #include "NimBLEEddystoneTLM.h" -#if CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_BROADCASTER +#if CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_ROLE_BROADCASTER) # include "NimBLEUUID.h" # include "NimBLELog.h" @@ -215,4 +215,4 @@ void NimBLEEddystoneTLM::setTime(uint32_t tmil) { m_eddystoneData.tmil = tmil; } // setTime -#endif // CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_BROADCASTER +#endif // CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_ROLE_BROADCASTER) diff --git a/src/NimBLEEddystoneTLM.h b/src/NimBLEEddystoneTLM.h index 2c1e52e3..f48cf94c 100644 --- a/src/NimBLEEddystoneTLM.h +++ b/src/NimBLEEddystoneTLM.h @@ -18,8 +18,8 @@ #ifndef NIMBLE_CPP_EDDYSTONETLM_H_ #define NIMBLE_CPP_EDDYSTONETLM_H_ -#include "nimconfig.h" -#if CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_BROADCASTER +#include "syscfg/syscfg.h" +#if CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_ROLE_BROADCASTER) class NimBLEUUID; @@ -66,5 +66,5 @@ class NimBLEEddystoneTLM { }; // NimBLEEddystoneTLM -#endif // CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_BROADCASTER +#endif // CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_ROLE_BROADCASTER) #endif // NIMBLE_CPP_EDDYSTONETLM_H_ diff --git a/src/NimBLEExtAdvertising.cpp b/src/NimBLEExtAdvertising.cpp index d3a02061..3e0062a7 100644 --- a/src/NimBLEExtAdvertising.cpp +++ b/src/NimBLEExtAdvertising.cpp @@ -16,7 +16,7 @@ */ #include "NimBLEExtAdvertising.h" -#if CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_BROADCASTER && CONFIG_BT_NIMBLE_EXT_ADV +#if CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_ROLE_BROADCASTER) && MYNEWT_VAL(BLE_EXT_ADV) # if defined(CONFIG_NIMBLE_CPP_IDF) # include "services/gap/ble_svc_gap.h" @@ -38,7 +38,7 @@ static const char* LOG_TAG = "NimBLEExtAdvertising"; NimBLEExtAdvertising::NimBLEExtAdvertising() : m_deleteCallbacks{false}, m_pCallbacks{&defaultCallbacks}, - m_advStatus(CONFIG_BT_NIMBLE_MAX_EXT_ADV_INSTANCES + 1, false) {} + m_advStatus(MYNEWT_VAL(BLE_MULTI_ADV_INSTANCES) + 1, false) {} /** * @brief Destructor: deletes callback instances if requested. @@ -68,7 +68,7 @@ bool NimBLEExtAdvertising::setInstanceData(uint8_t instId, NimBLEExtAdvertisemen adv.m_params.scan_req_notif = false; } -# if CONFIG_BT_NIMBLE_ROLE_PERIPHERAL +# if MYNEWT_VAL(BLE_ROLE_PERIPHERAL) NimBLEServer* pServer = NimBLEDevice::getServer(); if (pServer != nullptr) { pServer->start(); // make sure the GATT server is ready before advertising @@ -391,7 +391,7 @@ void NimBLEExtAdvertisement::setTxPower(int8_t dbm) { * @param [in] enable True = connectable. */ void NimBLEExtAdvertisement::setConnectable(bool enable) { -# if CONFIG_BT_NIMBLE_ROLE_PERIPHERAL +# if MYNEWT_VAL(BLE_ROLE_PERIPHERAL) m_params.connectable = enable; # endif } // setConnectable @@ -531,7 +531,7 @@ void NimBLEExtAdvertisement::clearData() { * @details This will completely replace any data that was previously set. */ bool NimBLEExtAdvertisement::setData(const uint8_t* data, size_t length) { - if (length > CONFIG_BT_NIMBLE_MAX_EXT_ADV_DATA_LEN) { + if (length > MYNEWT_VAL(BLE_EXT_ADV_MAX_SIZE)) { return false; } @@ -546,7 +546,7 @@ bool NimBLEExtAdvertisement::setData(const uint8_t* data, size_t length) { * @return True if successful, false if the data is too large. */ bool NimBLEExtAdvertisement::addData(const uint8_t* data, size_t length) { - if (m_payload.size() + length > CONFIG_BT_NIMBLE_MAX_EXT_ADV_DATA_LEN) { + if (m_payload.size() + length > MYNEWT_VAL(BLE_EXT_ADV_MAX_SIZE)) { return false; } @@ -560,7 +560,7 @@ bool NimBLEExtAdvertisement::addData(const uint8_t* data, size_t length) { * @return True if successful, false if the data is too large. */ bool NimBLEExtAdvertisement::addData(const std::string& data) { - if (m_payload.size() + data.length() > CONFIG_BT_NIMBLE_MAX_EXT_ADV_DATA_LEN) { + if (m_payload.size() + data.length() > MYNEWT_VAL(BLE_EXT_ADV_MAX_SIZE)) { return false; } @@ -710,7 +710,7 @@ bool NimBLEExtAdvertisement::addServiceUUID(const NimBLEUUID& serviceUUID) { length += 2; } - if (length + getDataSize() > CONFIG_BT_NIMBLE_MAX_EXT_ADV_DATA_LEN) { + if (length + getDataSize() > MYNEWT_VAL(BLE_EXT_ADV_MAX_SIZE)) { NIMBLE_LOGE(LOG_TAG, "Cannot add UUID, data length exceeded!"); return false; } @@ -919,7 +919,7 @@ bool NimBLEExtAdvertisement::setServiceData(const NimBLEUUID& uuid, const uint8_ uint8_t uuidBytes = uuid.bitSize() / 8; uint8_t sDataLen = 2 + uuidBytes + length; - if (m_payload.size() + sDataLen > CONFIG_BT_NIMBLE_MAX_EXT_ADV_DATA_LEN) { + if (m_payload.size() + sDataLen > MYNEWT_VAL(BLE_EXT_ADV_MAX_SIZE)) { return false; } @@ -1090,4 +1090,4 @@ std::string NimBLEExtAdvertisement::toString() const { return str; } // toString -#endif // CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_BROADCASTER && CONFIG_BT_NIMBLE_EXT_ADV +#endif // CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_ROLE_BROADCASTER) && MYNEWT_VAL(BLE_EXT_ADV) diff --git a/src/NimBLEExtAdvertising.h b/src/NimBLEExtAdvertising.h index 9824ad19..4591ce46 100644 --- a/src/NimBLEExtAdvertising.h +++ b/src/NimBLEExtAdvertising.h @@ -18,8 +18,8 @@ #ifndef NIMBLE_CPP_EXTADVERTISING_H_ #define NIMBLE_CPP_EXTADVERTISING_H_ -#include "nimconfig.h" -#if CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_BROADCASTER && CONFIG_BT_NIMBLE_EXT_ADV +#include "syscfg/syscfg.h" +#if CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_ROLE_BROADCASTER) && MYNEWT_VAL(BLE_EXT_ADV) # if defined(CONFIG_NIMBLE_CPP_IDF) # include "host/ble_gap.h" @@ -159,5 +159,5 @@ class NimBLEExtAdvertisingCallbacks { virtual void onScanRequest(NimBLEExtAdvertising* pAdv, uint8_t instId, NimBLEAddress addr); }; // NimBLEExtAdvertisingCallbacks -#endif // CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_BROADCASTER && CONFIG_BT_NIMBLE_EXT_ADV +#endif // CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_ROLE_BROADCASTER) && MYNEWT_VAL(BLE_EXT_ADV) #endif // NIMBLE_CPP_EXTADVERTISING_H_ diff --git a/src/NimBLEHIDDevice.cpp b/src/NimBLEHIDDevice.cpp index 73393930..105ef11b 100644 --- a/src/NimBLEHIDDevice.cpp +++ b/src/NimBLEHIDDevice.cpp @@ -16,7 +16,7 @@ */ #include "NimBLEHIDDevice.h" -#if CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_BROADCASTER && CONFIG_BT_NIMBLE_ROLE_PERIPHERAL +#if CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_ROLE_BROADCASTER) && MYNEWT_VAL(BLE_ROLE_PERIPHERAL) # include "NimBLEServer.h" # include "NimBLEService.h" @@ -340,4 +340,4 @@ NimBLEService* NimBLEHIDDevice::getBatteryService() { return m_batterySvc; } // getBatteryService -#endif // CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_PERIPHERAL +#endif // CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_ROLE_PERIPHERAL) diff --git a/src/NimBLEHIDDevice.h b/src/NimBLEHIDDevice.h index cbc9839d..1d82fd12 100644 --- a/src/NimBLEHIDDevice.h +++ b/src/NimBLEHIDDevice.h @@ -18,8 +18,8 @@ #ifndef NIMBLE_CPP_HIDDEVICE_H_ #define NIMBLE_CPP_HIDDEVICE_H_ -#include "nimconfig.h" -#if CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_BROADCASTER && CONFIG_BT_NIMBLE_ROLE_PERIPHERAL +#include "syscfg/syscfg.h" +#if CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_ROLE_BROADCASTER) && MYNEWT_VAL(BLE_ROLE_PERIPHERAL) # include # include @@ -85,5 +85,5 @@ class NimBLEHIDDevice { NimBLECharacteristic* locateReportCharacteristicByIdAndType(uint8_t reportId, uint8_t reportType); }; -#endif // CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_BROADCASTER && CONFIG_BT_NIMBLE_ROLE_PERIPHERAL +#endif // CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_ROLE_BROADCASTER) && MYNEWT_VAL(BLE_ROLE_PERIPHERAL) #endif // NIMBLE_CPP_HIDDEVICE_H_ diff --git a/src/NimBLEL2CAPChannel.cpp b/src/NimBLEL2CAPChannel.cpp index ef290d1a..4a155860 100644 --- a/src/NimBLEL2CAPChannel.cpp +++ b/src/NimBLEL2CAPChannel.cpp @@ -3,7 +3,7 @@ // #include "NimBLEL2CAPChannel.h" -#if CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_L2CAP_COC_MAX_NUM +#if CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_L2CAP_COC_MAX_NUM) # include "NimBLEClient.h" # include "NimBLELog.h" @@ -149,7 +149,7 @@ int NimBLEL2CAPChannel::writeFragment(std::vector::const_iterator begin return -BLE_HS_EREJECT; } -# if CONFIG_BT_NIMBLE_ROLE_CENTRAL +# if MYNEWT_VAL(BLE_ROLE_CENTRAL) NimBLEL2CAPChannel* NimBLEL2CAPChannel::connect(NimBLEClient* client, uint16_t psm, uint16_t mtu, @@ -174,7 +174,7 @@ NimBLEL2CAPChannel* NimBLEL2CAPChannel::connect(NimBLEClient* cli } return channel; } -# endif // CONFIG_BT_NIMBLE_ROLE_CENTRAL +# endif // MYNEWT_VAL(BLE_ROLE_CENTRAL) bool NimBLEL2CAPChannel::write(const std::vector& bytes) { if (!this->channel) { @@ -311,4 +311,4 @@ int NimBLEL2CAPChannel::handleL2capEvent(struct ble_l2cap_event* event, void* ar return returnValue; } -#endif // #if CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_L2CAP_COC_MAX_NUM +#endif // #if CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_L2CAP_COC_MAX_NUM) diff --git a/src/NimBLEL2CAPChannel.h b/src/NimBLEL2CAPChannel.h index 41cd5a96..b7fafa4a 100644 --- a/src/NimBLEL2CAPChannel.h +++ b/src/NimBLEL2CAPChannel.h @@ -5,8 +5,8 @@ #ifndef NIMBLE_CPP_L2CAPCHANNEL_H_ #define NIMBLE_CPP_L2CAPCHANNEL_H_ -#include "nimconfig.h" -#if CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_L2CAP_COC_MAX_NUM +#include "syscfg/syscfg.h" +#if CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_L2CAP_COC_MAX_NUM) # include "inttypes.h" # if defined(CONFIG_NIMBLE_CPP_IDF) @@ -122,5 +122,5 @@ class NimBLEL2CAPChannelCallbacks { virtual void onDisconnect(NimBLEL2CAPChannel* channel) {}; }; -#endif // CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_L2CAP_COC_MAX_NUM +#endif // CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_L2CAP_COC_MAX_NUM) #endif // NIMBLE_CPP_L2CAPCHANNEL_H_ diff --git a/src/NimBLEL2CAPServer.cpp b/src/NimBLEL2CAPServer.cpp index c719694b..207a72f5 100644 --- a/src/NimBLEL2CAPServer.cpp +++ b/src/NimBLEL2CAPServer.cpp @@ -3,7 +3,7 @@ // #include "NimBLEL2CAPServer.h" -#if CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_L2CAP_COC_MAX_NUM +#if CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_L2CAP_COC_MAX_NUM) # include "NimBLEL2CAPChannel.h" # include "NimBLEDevice.h" @@ -37,4 +37,4 @@ NimBLEL2CAPChannel* NimBLEL2CAPServer::createService(const uint16_t return service; } -#endif // CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_L2CAP_COC_MAX_NUM +#endif // CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_L2CAP_COC_MAX_NUM) diff --git a/src/NimBLEL2CAPServer.h b/src/NimBLEL2CAPServer.h index 405009a2..c1a84b3c 100644 --- a/src/NimBLEL2CAPServer.h +++ b/src/NimBLEL2CAPServer.h @@ -4,8 +4,8 @@ #ifndef NIMBLE_CPP_L2CAPSERVER_H_ #define NIMBLE_CPP_L2CAPSERVER_H_ -#include "nimconfig.h" -#if CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_L2CAP_COC_MAX_NUM +#include "syscfg/syscfg.h" +#if CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_L2CAP_COC_MAX_NUM) # include "inttypes.h" # include @@ -37,5 +37,5 @@ class NimBLEL2CAPServer { friend class NimBLEDevice; }; -#endif // CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_L2CAP_COC_MAX_NUM +#endif // CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_L2CAP_COC_MAX_NUM) #endif // NIMBLE_CPP_L2CAPSERVER_H_ diff --git a/src/NimBLELocalAttribute.h b/src/NimBLELocalAttribute.h index 5427a9ea..4e00305c 100644 --- a/src/NimBLELocalAttribute.h +++ b/src/NimBLELocalAttribute.h @@ -18,8 +18,8 @@ #ifndef NIMBLE_CPP_LOCAL_ATTRIBUTE_H_ #define NIMBLE_CPP_LOCAL_ATTRIBUTE_H_ -#include "nimconfig.h" -#if CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_PERIPHERAL +#include "syscfg/syscfg.h" +#if CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_ROLE_PERIPHERAL) # include "NimBLEAttribute.h" @@ -54,5 +54,5 @@ class NimBLELocalAttribute : public NimBLEAttribute { uint8_t m_removed{0}; }; -#endif // CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_PERIPHERAL +#endif // CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_ROLE_PERIPHERAL) #endif // NIMBLE_CPP_LOCAL_ATTRIBUTE_H_ diff --git a/src/NimBLELocalValueAttribute.h b/src/NimBLELocalValueAttribute.h index c9f9d8de..ebed3399 100644 --- a/src/NimBLELocalValueAttribute.h +++ b/src/NimBLELocalValueAttribute.h @@ -18,8 +18,8 @@ #ifndef NIMBLE_LOCAL_VALUE_ATTRIBUTE_H_ #define NIMBLE_LOCAL_VALUE_ATTRIBUTE_H_ -#include "nimconfig.h" -#if CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_PERIPHERAL +#include "syscfg/syscfg.h" +#if CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_ROLE_PERIPHERAL) # if defined(CONFIG_NIMBLE_CPP_IDF) # include "host/ble_hs.h" @@ -140,5 +140,5 @@ class NimBLELocalValueAttribute : public NimBLELocalAttribute, public NimBLEValu uint16_t m_properties{0}; }; -#endif // CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_PERIPHERAL +#endif // CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_ROLE_PERIPHERAL) #endif // NIMBLE_LOCAL_VALUE_ATTRIBUTE_H_ diff --git a/src/NimBLELog.h b/src/NimBLELog.h index 32d863a1..e338f5cb 100644 --- a/src/NimBLELog.h +++ b/src/NimBLELog.h @@ -18,8 +18,8 @@ #ifndef NIMBLE_CPP_LOG_H_ #define NIMBLE_CPP_LOG_H_ -#include "nimconfig.h" -#if CONFIG_BT_ENABLED +#include "syscfg/syscfg.h" +#if CONFIG_BT_NIMBLE_ENABLED # if defined(CONFIG_NIMBLE_CPP_IDF) # include "esp_log.h" @@ -137,7 +137,7 @@ # define NIMBLE_LOGE(tag, format, ...) NIMBLE_CPP_LOG_PRINT(ESP_LOG_ERROR, tag, format, ##__VA_ARGS__) # else -# include "nimble/porting/nimble/include/syscfg/syscfg.h" +# include "syscfg/syscfg.h" # include "nimble/console/console.h" # ifndef CONFIG_NIMBLE_CPP_LOG_LEVEL # if defined(ARDUINO_ARCH_ESP32) && defined(CORE_DEBUG_LEVEL) @@ -179,5 +179,5 @@ # define NIMBLE_LOGE_IF(cond, tag, format, ...) { if (cond) { NIMBLE_LOGE(tag, format, ##__VA_ARGS__); }} # define NIMBLE_LOGE_RC(rc, tag, format, ...) { if (rc) { NIMBLE_LOGE(tag, format "; rc=%d %s", ##__VA_ARGS__, rc, NimBLEUtils::returnCodeToString(rc)); }} -#endif /* CONFIG_BT_ENABLED */ +#endif /* CONFIG_BT_NIMBLE_ENABLED */ #endif /* NIMBLE_CPP_LOG_H_ */ \ No newline at end of file diff --git a/src/NimBLERemoteCharacteristic.cpp b/src/NimBLERemoteCharacteristic.cpp index 41029cbf..2c23ccbf 100644 --- a/src/NimBLERemoteCharacteristic.cpp +++ b/src/NimBLERemoteCharacteristic.cpp @@ -16,7 +16,7 @@ */ #include "NimBLERemoteCharacteristic.h" -#if CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_CENTRAL +#if CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_ROLE_CENTRAL) # include "NimBLERemoteDescriptor.h" # include "NimBLERemoteService.h" @@ -387,4 +387,4 @@ NimBLEClient* NimBLERemoteCharacteristic::getClient() const { return getRemoteService()->getClient(); } // getClient -#endif // CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_CENTRAL +#endif // CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_ROLE_CENTRAL) diff --git a/src/NimBLERemoteCharacteristic.h b/src/NimBLERemoteCharacteristic.h index f2d3d6b2..c1a6ecac 100644 --- a/src/NimBLERemoteCharacteristic.h +++ b/src/NimBLERemoteCharacteristic.h @@ -18,8 +18,8 @@ #ifndef NIMBLE_CPP_REMOTE_CHARACTERISTIC_H_ #define NIMBLE_CPP_REMOTE_CHARACTERISTIC_H_ -#include "nimconfig.h" -#if CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_CENTRAL +#include "syscfg/syscfg.h" +#if CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_ROLE_CENTRAL) # include "NimBLERemoteValueAttribute.h" # include @@ -79,5 +79,5 @@ class NimBLERemoteCharacteristic : public NimBLERemoteValueAttribute { }; // NimBLERemoteCharacteristic -#endif /* CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_CENTRAL */ +#endif /* CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_ROLE_CENTRAL) */ #endif /* NIMBLE_CPP_REMOTE_CHARACTERISTIC_H_ */ diff --git a/src/NimBLERemoteDescriptor.cpp b/src/NimBLERemoteDescriptor.cpp index cdb54dc0..c3de20fd 100644 --- a/src/NimBLERemoteDescriptor.cpp +++ b/src/NimBLERemoteDescriptor.cpp @@ -16,7 +16,7 @@ */ #include "NimBLERemoteDescriptor.h" -#if CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_CENTRAL +#if CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_ROLE_CENTRAL) # include "NimBLERemoteCharacteristic.h" @@ -56,4 +56,4 @@ NimBLEClient* NimBLERemoteDescriptor::getClient() const { return m_pRemoteCharacteristic->getClient(); } -#endif // CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_CENTRAL +#endif // CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_ROLE_CENTRAL) diff --git a/src/NimBLERemoteDescriptor.h b/src/NimBLERemoteDescriptor.h index 349988c2..b16f3de7 100644 --- a/src/NimBLERemoteDescriptor.h +++ b/src/NimBLERemoteDescriptor.h @@ -18,8 +18,8 @@ #ifndef NIMBLE_CPP_REMOTE_DESCRIPTOR_H_ #define NIMBLE_CPP_REMOTE_DESCRIPTOR_H_ -#include "nimconfig.h" -#if CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_CENTRAL +#include "syscfg/syscfg.h" +#if CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_ROLE_CENTRAL) # include "NimBLERemoteValueAttribute.h" @@ -44,5 +44,5 @@ class NimBLERemoteDescriptor : public NimBLERemoteValueAttribute { const NimBLERemoteCharacteristic* m_pRemoteCharacteristic; }; -#endif // CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_CENTRAL +#endif // CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_ROLE_CENTRAL) #endif // NIMBLE_CPP_REMOTE_DESCRIPTOR_H_ diff --git a/src/NimBLERemoteService.cpp b/src/NimBLERemoteService.cpp index fd9aeec2..f07e64b4 100644 --- a/src/NimBLERemoteService.cpp +++ b/src/NimBLERemoteService.cpp @@ -16,7 +16,7 @@ */ #include "NimBLERemoteService.h" -#if CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_CENTRAL +#if CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_ROLE_CENTRAL) # include "NimBLERemoteCharacteristic.h" # include "NimBLEClient.h" @@ -302,4 +302,4 @@ std::string NimBLERemoteService::toString() const { return res; } // toString -#endif // CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_CENTRAL +#endif // CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_ROLE_CENTRAL) diff --git a/src/NimBLERemoteService.h b/src/NimBLERemoteService.h index 6aebbaba..c2aa445d 100644 --- a/src/NimBLERemoteService.h +++ b/src/NimBLERemoteService.h @@ -18,8 +18,8 @@ #ifndef NIMBLE_CPP_REMOTE_SERVICE_H_ #define NIMBLE_CPP_REMOTE_SERVICE_H_ -#include "nimconfig.h" -#if CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_CENTRAL +#include "syscfg/syscfg.h" +#if CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_ROLE_CENTRAL) # include "NimBLEAttribute.h" # include @@ -64,5 +64,5 @@ class NimBLERemoteService : public NimBLEAttribute { uint16_t m_endHandle{0}; }; // NimBLERemoteService -#endif // CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_CENTRAL +#endif // CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_ROLE_CENTRAL) #endif // NIMBLE_CPP_REMOTE_SERVICE_H_ diff --git a/src/NimBLERemoteValueAttribute.cpp b/src/NimBLERemoteValueAttribute.cpp index e5e5611f..c2ef17dd 100644 --- a/src/NimBLERemoteValueAttribute.cpp +++ b/src/NimBLERemoteValueAttribute.cpp @@ -16,7 +16,7 @@ */ #include "NimBLERemoteValueAttribute.h" -#if CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_CENTRAL +#if CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_ROLE_CENTRAL) # include "NimBLEClient.h" # include "NimBLEUtils.h" @@ -217,4 +217,4 @@ int NimBLERemoteValueAttribute::onReadCB(uint16_t conn_handle, const ble_gatt_er return rc; } // onReadCB -#endif // CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_CENTRAL +#endif // CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_ROLE_CENTRAL) diff --git a/src/NimBLERemoteValueAttribute.h b/src/NimBLERemoteValueAttribute.h index 89df172e..7a92479a 100644 --- a/src/NimBLERemoteValueAttribute.h +++ b/src/NimBLERemoteValueAttribute.h @@ -18,8 +18,8 @@ #ifndef NIMBLE_CPP_REMOTE_VALUE_ATTRIBUTE_H_ #define NIMBLE_CPP_REMOTE_VALUE_ATTRIBUTE_H_ -#include "nimconfig.h" -#if CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_CENTRAL +#include "syscfg/syscfg.h" +#if CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_ROLE_CENTRAL) # if defined(CONFIG_NIMBLE_CPP_IDF) # include @@ -170,5 +170,5 @@ class NimBLERemoteValueAttribute : public NimBLEValueAttribute, public NimBLEAtt static int onWriteCB(uint16_t conn_handle, const ble_gatt_error* error, ble_gatt_attr* attr, void* arg); }; -#endif // CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_CENTRAL +#endif // CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_ROLE_CENTRAL) #endif // NIMBLE_CPP_REMOTE_VALUE_ATTRIBUTE_H_ diff --git a/src/NimBLEScan.cpp b/src/NimBLEScan.cpp index 713c84a1..72fb3c59 100644 --- a/src/NimBLEScan.cpp +++ b/src/NimBLEScan.cpp @@ -16,7 +16,7 @@ */ #include "NimBLEScan.h" -#if CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_OBSERVER +#if CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_ROLE_OBSERVER) # include "NimBLEDevice.h" # include "NimBLELog.h" @@ -63,7 +63,7 @@ int NimBLEScan::handleGapEvent(ble_gap_event* event, void* arg) { return 0; } -# if CONFIG_BT_NIMBLE_EXT_ADV +# if MYNEWT_VAL(BLE_EXT_ADV) const auto& disc = event->ext_disc; const bool isLegacyAdv = disc.props & BLE_HCI_ADV_LEGACY_MASK; const auto event_type = isLegacyAdv ? disc.legacy_event_type : disc.props; @@ -74,7 +74,7 @@ int NimBLEScan::handleGapEvent(ble_gap_event* event, void* arg) { # endif NimBLEAddress advertisedAddress(disc.addr); -# if CONFIG_BT_NIMBLE_ROLE_CENTRAL +# if MYNEWT_VAL(BLE_ROLE_CENTRAL) // stop processing if already connected NimBLEClient* pClient = NimBLEDevice::getClientByPeerAddress(advertisedAddress); if (pClient != nullptr && pClient->isConnected()) { @@ -86,7 +86,7 @@ int NimBLEScan::handleGapEvent(ble_gap_event* event, void* arg) { // If we've seen this device before get a pointer to it from the vector for (const auto& dev : pScan->m_scanResults.m_deviceVec) { -# if CONFIG_BT_NIMBLE_EXT_ADV +# if MYNEWT_VAL(BLE_EXT_ADV) // Same address but different set ID should create a new advertised device. if (dev->getAddress() == advertisedAddress && dev->getSetId() == disc.sid) # else @@ -272,7 +272,7 @@ bool NimBLEScan::isScanning() { return ble_gap_disc_active(); } -# if CONFIG_BT_NIMBLE_EXT_ADV +# if MYNEWT_VAL(BLE_EXT_ADV) /** * @brief Set the PHYs to scan. * @param [in] phyMask The PHYs to scan, a bit mask of: @@ -324,7 +324,7 @@ bool NimBLEScan::start(uint32_t duration, bool isContinue, bool restart) { // If scanning is already active, call the functions anyway as the parameters can be changed. -# if CONFIG_BT_NIMBLE_EXT_ADV +# if MYNEWT_VAL(BLE_EXT_ADV) ble_gap_ext_disc_params scan_params; scan_params.passive = m_scanParams.passive; scan_params.itvl = m_scanParams.itvl; @@ -560,4 +560,4 @@ void NimBLEScanCallbacks::onScanEnd(const NimBLEScanResults& results, int reason NIMBLE_LOGD(CB_TAG, "Scan ended; reason %d, num results: %d", reason, results.getCount()); } -#endif // CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_OBSERVER +#endif // CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_ROLE_OBSERVER) diff --git a/src/NimBLEScan.h b/src/NimBLEScan.h index 7884d190..68f8def8 100644 --- a/src/NimBLEScan.h +++ b/src/NimBLEScan.h @@ -18,8 +18,8 @@ #ifndef NIMBLE_CPP_SCAN_H_ #define NIMBLE_CPP_SCAN_H_ -#include "nimconfig.h" -#if CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_OBSERVER +#include "syscfg/syscfg.h" +#if CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_ROLE_OBSERVER) # include "NimBLEAdvertisedDevice.h" # include "NimBLEUtils.h" @@ -83,7 +83,7 @@ class NimBLEScan { void erase(const NimBLEAddress& address); void erase(const NimBLEAdvertisedDevice* device); -# if CONFIG_BT_NIMBLE_EXT_ADV +# if MYNEWT_VAL(BLE_EXT_ADV) enum Phy { SCAN_1M = 0x01, SCAN_CODED = 0x02, SCAN_ALL = 0x03 }; void setPhy(Phy phyMask); void setPeriod(uint32_t periodMs); @@ -103,7 +103,7 @@ class NimBLEScan { NimBLETaskData* m_pTaskData; uint8_t m_maxResults; -# if CONFIG_BT_NIMBLE_EXT_ADV +# if MYNEWT_VAL(BLE_EXT_ADV) uint8_t m_phy{SCAN_ALL}; uint16_t m_period{0}; # endif @@ -136,5 +136,5 @@ class NimBLEScanCallbacks { virtual void onScanEnd(const NimBLEScanResults& scanResults, int reason); }; -#endif // CONFIG_BT_ENABLED CONFIG_BT_NIMBLE_ROLE_OBSERVER +#endif // CONFIG_BT_NIMBLE_ENABLED MYNEWT_VAL(BLE_ROLE_OBSERVER) #endif // NIMBLE_CPP_SCAN_H_ diff --git a/src/NimBLEServer.cpp b/src/NimBLEServer.cpp index 8694d850..a15f0927 100644 --- a/src/NimBLEServer.cpp +++ b/src/NimBLEServer.cpp @@ -16,12 +16,12 @@ */ #include "NimBLEServer.h" -#if CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_PERIPHERAL +#if CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_ROLE_PERIPHERAL) # include "NimBLEDevice.h" # include "NimBLELog.h" -# if CONFIG_BT_NIMBLE_ROLE_CENTRAL +# if MYNEWT_VAL(BLE_ROLE_CENTRAL) # include "NimBLEClient.h" # endif @@ -49,7 +49,7 @@ NimBLEServer::NimBLEServer() : m_gattsStarted{false}, m_svcChanged{false}, m_deleteCallbacks{false}, -# if !CONFIG_BT_NIMBLE_EXT_ADV +# if !MYNEWT_VAL(BLE_EXT_ADV) m_advertiseOnDisconnect{false}, # endif m_pServerCallbacks{&defaultCallbacks}, @@ -69,7 +69,7 @@ NimBLEServer::~NimBLEServer() { delete m_pServerCallbacks; } -# if CONFIG_BT_NIMBLE_ROLE_CENTRAL +# if MYNEWT_VAL(BLE_ROLE_CENTRAL) if (m_pClient != nullptr) { delete m_pClient; } @@ -143,7 +143,7 @@ NimBLEService* NimBLEServer::getServiceByHandle(uint16_t handle) const { return nullptr; } -# if CONFIG_BT_NIMBLE_EXT_ADV +# if MYNEWT_VAL(BLE_EXT_ADV) /** * @brief Retrieve the advertising object that can be used to advertise the existence of the server. * @return A pinter to an advertising object. @@ -153,7 +153,7 @@ NimBLEExtAdvertising* NimBLEServer::getAdvertising() const { } // getAdvertising # endif -# if (!CONFIG_BT_NIMBLE_EXT_ADV && CONFIG_BT_NIMBLE_ROLE_BROADCASTER) || defined(_DOXYGEN_) +# if (!MYNEWT_VAL(BLE_EXT_ADV) && MYNEWT_VAL(BLE_ROLE_BROADCASTER)) || defined(_DOXYGEN_) /** * @brief Retrieve the advertising object that can be used to advertise the existence of the server. * @return A pointer to an advertising object. @@ -250,7 +250,7 @@ bool NimBLEServer::disconnect(const NimBLEConnInfo& connInfo, uint8_t reason) co return disconnect(connInfo.getConnHandle(), reason); } // disconnect -# if !CONFIG_BT_NIMBLE_EXT_ADV || defined(_DOXYGEN_) +# if !MYNEWT_VAL(BLE_EXT_ADV) || defined(_DOXYGEN_) /** * @brief Set the server to automatically start advertising when a client disconnects. * @param [in] enable true == advertise, false == don't advertise. @@ -363,7 +363,7 @@ int NimBLEServer::handleGapEvent(ble_gap_event* event, void* arg) { NIMBLE_LOGE(LOG_TAG, "Connection failed rc = %d %s", rc, NimBLEUtils::returnCodeToString(rc)); -# if !CONFIG_BT_NIMBLE_EXT_ADV && CONFIG_BT_NIMBLE_ROLE_BROADCASTER +# if !MYNEWT_VAL(BLE_EXT_ADV) && MYNEWT_VAL(BLE_ROLE_BROADCASTER) NimBLEDevice::startAdvertising(); # endif } else { @@ -407,7 +407,7 @@ int NimBLEServer::handleGapEvent(ble_gap_event* event, void* arg) { } } -# if CONFIG_BT_NIMBLE_ROLE_CENTRAL +# if MYNEWT_VAL(BLE_ROLE_CENTRAL) if (pServer->m_pClient && pServer->m_pClient->m_connHandle == event->disconnect.conn.conn_handle) { // If this was also the client make sure it's flagged as disconnected. pServer->m_pClient->m_connHandle = BLE_HS_CONN_HANDLE_NONE; @@ -420,7 +420,7 @@ int NimBLEServer::handleGapEvent(ble_gap_event* event, void* arg) { peerInfo.m_desc = event->disconnect.conn; pServer->m_pServerCallbacks->onDisconnect(pServer, peerInfo, event->disconnect.reason); -# if !CONFIG_BT_NIMBLE_EXT_ADV +# if !MYNEWT_VAL(BLE_EXT_ADV) if (pServer->m_advertiseOnDisconnect) { pServer->startAdvertising(); } @@ -494,10 +494,10 @@ int NimBLEServer::handleGapEvent(ble_gap_event* event, void* arg) { } // BLE_GAP_EVENT_NOTIFY_TX case BLE_GAP_EVENT_ADV_COMPLETE: { -# if CONFIG_BT_NIMBLE_EXT_ADV && CONFIG_BT_NIMBLE_ROLE_BROADCASTER +# if MYNEWT_VAL(BLE_EXT_ADV) && MYNEWT_VAL(BLE_ROLE_BROADCASTER) case BLE_GAP_EVENT_SCAN_REQ_RCVD: return NimBLEExtAdvertising::handleGapEvent(event, arg); -# elif CONFIG_BT_NIMBLE_ROLE_BROADCASTER +# elif MYNEWT_VAL(BLE_ROLE_BROADCASTER) return NimBLEAdvertising::handleGapEvent(event, arg); # endif } // BLE_GAP_EVENT_ADV_COMPLETE | BLE_GAP_EVENT_SCAN_REQ_RCVD @@ -537,7 +537,7 @@ int NimBLEServer::handleGapEvent(ble_gap_event* event, void* arg) { } pServer->m_pServerCallbacks->onAuthenticationComplete(peerInfo); -# if CONFIG_BT_NIMBLE_ROLE_CENTRAL +# if MYNEWT_VAL(BLE_ROLE_CENTRAL) if (pServer->m_pClient && pServer->m_pClient->m_connHandle == event->enc_change.conn_handle) { NimBLEClient::handleGapEvent(event, pServer->m_pClient); } @@ -737,7 +737,7 @@ void NimBLEServer::removeService(NimBLEService* service, bool deleteSvc) { service->setRemoved(deleteSvc ? NIMBLE_ATT_REMOVE_DELETE : NIMBLE_ATT_REMOVE_HIDE); serviceChanged(); -# if !CONFIG_BT_NIMBLE_EXT_ADV && CONFIG_BT_NIMBLE_ROLE_BROADCASTER +# if !MYNEWT_VAL(BLE_EXT_ADV) && MYNEWT_VAL(BLE_ROLE_BROADCASTER) NimBLEDevice::getAdvertising()->removeServiceUUID(service->getUUID()); # endif } // removeService @@ -774,7 +774,7 @@ void NimBLEServer::resetGATT() { return; } -# if CONFIG_BT_NIMBLE_ROLE_BROADCASTER +# if MYNEWT_VAL(BLE_ROLE_BROADCASTER) NimBLEDevice::stopAdvertising(); # endif ble_gatts_reset(); @@ -843,7 +843,7 @@ bool NimBLEServer::getPhy(uint16_t connHandle, uint8_t* txPhy, uint8_t* rxPhy) { return rc == 0; } // getPhy -# if CONFIG_BT_NIMBLE_EXT_ADV +# if MYNEWT_VAL(BLE_EXT_ADV) /** * @brief Start advertising. * @param [in] instId The extended advertisement instance ID to start. @@ -868,7 +868,7 @@ bool NimBLEServer::stopAdvertising(uint8_t instId) const { # endif -# if (!CONFIG_BT_NIMBLE_EXT_ADV && CONFIG_BT_NIMBLE_ROLE_BROADCASTER) || defined(_DOXYGEN_) +# if (!MYNEWT_VAL(BLE_EXT_ADV) && MYNEWT_VAL(BLE_ROLE_BROADCASTER)) || defined(_DOXYGEN_) /** * @brief Start advertising. * @param [in] duration The duration in milliseconds to advertise for, default = forever. @@ -945,7 +945,7 @@ void NimBLEServer::setDataLen(uint16_t connHandle, uint16_t octets) const { # endif } // setDataLen -# if CONFIG_BT_NIMBLE_ROLE_CENTRAL +# if MYNEWT_VAL(BLE_ROLE_CENTRAL) /** * @brief Create a client instance from the connection handle. * @param [in] connHandle The connection handle to create a client instance from. @@ -1032,4 +1032,4 @@ void NimBLEServerCallbacks::onPhyUpdate(NimBLEConnInfo& connInfo, uint8_t txPhy, NIMBLE_LOGD("NimBLEServerCallbacks", "onPhyUpdate: default, txPhy: %d, rxPhy: %d", txPhy, rxPhy); } // onPhyUpdate -#endif // CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_PERIPHERAL +#endif // CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_ROLE_PERIPHERAL) diff --git a/src/NimBLEServer.h b/src/NimBLEServer.h index f8b6423b..214578ab 100644 --- a/src/NimBLEServer.h +++ b/src/NimBLEServer.h @@ -18,8 +18,8 @@ #ifndef NIMBLE_CPP_SERVER_H_ #define NIMBLE_CPP_SERVER_H_ -#include "nimconfig.h" -#if CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_PERIPHERAL +#include "syscfg/syscfg.h" +#if CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_ROLE_PERIPHERAL) # if defined(CONFIG_NIMBLE_CPP_IDF) # include "host/ble_gap.h" @@ -45,14 +45,14 @@ class NimBLEConnInfo; class NimBLEAddress; class NimBLEService; class NimBLECharacteristic; -# if CONFIG_BT_NIMBLE_ROLE_BROADCASTER -# if CONFIG_BT_NIMBLE_EXT_ADV +# if MYNEWT_VAL(BLE_ROLE_BROADCASTER) +# if MYNEWT_VAL(BLE_EXT_ADV) class NimBLEExtAdvertising; # else class NimBLEAdvertising; # endif # endif -# if CONFIG_BT_NIMBLE_ROLE_CENTRAL +# if MYNEWT_VAL(BLE_ROLE_CENTRAL) class NimBLEClient; # endif @@ -84,20 +84,20 @@ class NimBLEServer { bool updatePhy(uint16_t connHandle, uint8_t txPhysMask, uint8_t rxPhysMask, uint16_t phyOptions); bool getPhy(uint16_t connHandle, uint8_t* txPhy, uint8_t* rxPhy); -# if CONFIG_BT_NIMBLE_ROLE_CENTRAL +# if MYNEWT_VAL(BLE_ROLE_CENTRAL) NimBLEClient* getClient(uint16_t connHandle); NimBLEClient* getClient(const NimBLEConnInfo& connInfo); void deleteClient(); # endif -# if CONFIG_BT_NIMBLE_ROLE_BROADCASTER -# if CONFIG_BT_NIMBLE_EXT_ADV +# if MYNEWT_VAL(BLE_ROLE_BROADCASTER) +# if MYNEWT_VAL(BLE_EXT_ADV) NimBLEExtAdvertising* getAdvertising() const; bool startAdvertising(uint8_t instanceId, int duration = 0, int maxEvents = 0) const; bool stopAdvertising(uint8_t instanceId) const; # endif -# if !CONFIG_BT_NIMBLE_EXT_ADV || defined(_DOXYGEN_) +# if !MYNEWT_VAL(BLE_EXT_ADV) || defined(_DOXYGEN_) NimBLEAdvertising* getAdvertising() const; bool startAdvertising(uint32_t duration = 0) const; bool stopAdvertising() const; @@ -108,8 +108,8 @@ class NimBLEServer { friend class NimBLEDevice; friend class NimBLEService; friend class NimBLECharacteristic; -# if CONFIG_BT_NIMBLE_ROLE_BROADCASTER -# if CONFIG_BT_NIMBLE_EXT_ADV +# if MYNEWT_VAL(BLE_ROLE_BROADCASTER) +# if MYNEWT_VAL(BLE_EXT_ADV) friend class NimBLEExtAdvertising; # else friend class NimBLEAdvertising; @@ -122,14 +122,14 @@ class NimBLEServer { bool m_gattsStarted : 1; bool m_svcChanged : 1; bool m_deleteCallbacks : 1; -# if !CONFIG_BT_NIMBLE_EXT_ADV +# if !MYNEWT_VAL(BLE_EXT_ADV) bool m_advertiseOnDisconnect : 1; # endif NimBLEServerCallbacks* m_pServerCallbacks; std::vector m_svcVec; - std::array m_connectedPeers; + std::array m_connectedPeers; -# if CONFIG_BT_NIMBLE_ROLE_CENTRAL +# if MYNEWT_VAL(BLE_ROLE_CENTRAL) NimBLEClient* m_pClient{nullptr}; # endif @@ -223,5 +223,5 @@ class NimBLEServerCallbacks { virtual void onPhyUpdate(NimBLEConnInfo& connInfo, uint8_t txPhy, uint8_t rxPhy); }; // NimBLEServerCallbacks -#endif // CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_PERIPHERAL +#endif // CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_ROLE_PERIPHERAL) #endif // NIMBLE_CPP_SERVER_H_ diff --git a/src/NimBLEService.cpp b/src/NimBLEService.cpp index db6c75fe..6a086966 100644 --- a/src/NimBLEService.cpp +++ b/src/NimBLEService.cpp @@ -16,9 +16,9 @@ */ #include "NimBLEService.h" -#if CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_PERIPHERAL +#if CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_ROLE_PERIPHERAL) -# if CONFIG_BT_NIMBLE_EXT_ADV +# if MYNEWT_VAL(BLE_EXT_ADV) # include "NimBLEExtAdvertising.h" # else # include "NimBLEAdvertising.h" @@ -375,4 +375,4 @@ bool NimBLEService::isStarted() const { return m_pSvcDef->type > 0; } // isStarted -#endif // CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_PERIPHERAL +#endif // CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_ROLE_PERIPHERAL) diff --git a/src/NimBLEService.h b/src/NimBLEService.h index 357f32cd..11d7c59c 100644 --- a/src/NimBLEService.h +++ b/src/NimBLEService.h @@ -18,8 +18,8 @@ #ifndef NIMBLE_CPP_SERVICE_H_ #define NIMBLE_CPP_SERVICE_H_ -#include "nimconfig.h" -#if CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_PERIPHERAL +#include "syscfg/syscfg.h" +#if CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_ROLE_PERIPHERAL) class NimBLEService; @@ -69,5 +69,5 @@ class NimBLEService : public NimBLELocalAttribute { ble_gatt_svc_def m_pSvcDef[2]{}; }; // NimBLEService -#endif // CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_PERIPHERAL +#endif // CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_ROLE_PERIPHERAL) #endif // NIMBLE_CPP_SERVICE_H_ diff --git a/src/NimBLEUUID.cpp b/src/NimBLEUUID.cpp index d2604633..25954895 100644 --- a/src/NimBLEUUID.cpp +++ b/src/NimBLEUUID.cpp @@ -16,7 +16,7 @@ */ #include "NimBLEUUID.h" -#if CONFIG_BT_ENABLED +#if CONFIG_BT_NIMBLE_ENABLED # include "NimBLEUtils.h" # include "NimBLELog.h" @@ -336,4 +336,4 @@ NimBLEUUID::operator std::string() const { return ble_uuid_to_str(&m_uuid.u, buf); } // operator std::string -#endif /* CONFIG_BT_ENABLED */ +#endif /* CONFIG_BT_NIMBLE_ENABLED */ diff --git a/src/NimBLEUUID.h b/src/NimBLEUUID.h index 39b58b97..cadd6fdc 100644 --- a/src/NimBLEUUID.h +++ b/src/NimBLEUUID.h @@ -18,8 +18,8 @@ #ifndef NIMBLE_CPP_UUID_H_ #define NIMBLE_CPP_UUID_H_ -#include "nimconfig.h" -#if CONFIG_BT_ENABLED +#include "syscfg/syscfg.h" +#if CONFIG_BT_NIMBLE_ENABLED # if defined(CONFIG_NIMBLE_CPP_IDF) # include "host/ble_uuid.h" @@ -70,5 +70,5 @@ class NimBLEUUID { ble_uuid_any_t m_uuid{}; }; // NimBLEUUID -#endif // CONFIG_BT_ENABLED +#endif // CONFIG_BT_NIMBLE_ENABLED #endif // NIMBLE_CPP_UUID_H_ diff --git a/src/NimBLEUtils.cpp b/src/NimBLEUtils.cpp index f51d6823..e34255d0 100644 --- a/src/NimBLEUtils.cpp +++ b/src/NimBLEUtils.cpp @@ -16,7 +16,7 @@ */ #include "NimBLEUtils.h" -#if CONFIG_BT_ENABLED +#if CONFIG_BT_NIMBLE_ENABLED # include "NimBLEAddress.h" # include "NimBLELog.h" @@ -576,4 +576,4 @@ NimBLEAddress NimBLEUtils::generateAddr(bool nrpa) { return NimBLEAddress{addr}; } // generateAddr -#endif // CONFIG_BT_ENABLED +#endif // CONFIG_BT_NIMBLE_ENABLED diff --git a/src/NimBLEUtils.h b/src/NimBLEUtils.h index e70cf8fe..ca8e7d23 100644 --- a/src/NimBLEUtils.h +++ b/src/NimBLEUtils.h @@ -18,8 +18,20 @@ #ifndef NIMBLE_CPP_UTILS_H_ #define NIMBLE_CPP_UTILS_H_ -#include "nimconfig.h" -#if CONFIG_BT_ENABLED +#include "syscfg/syscfg.h" +#if CONFIG_BT_NIMBLE_ENABLED + +#if CONFIG_NIMBLE_CPP_DEBUG_ASSERT_ENABLED && !defined NDEBUG +void nimble_cpp_assert(const char *file, unsigned line) __attribute((weak, noreturn)); +# define NIMBLE_ATT_VAL_FILE (__builtin_strrchr(__FILE__, '/') ? \ + __builtin_strrchr (__FILE__, '/') + 1 : __FILE__) +# define NIMBLE_CPP_DEBUG_ASSERT(cond) \ + if (!(cond)) { \ + nimble_cpp_assert(NIMBLE_ATT_VAL_FILE, __LINE__); \ + } +#else +# define NIMBLE_CPP_DEBUG_ASSERT(cond) (void(0)) +#endif # include @@ -56,5 +68,5 @@ class NimBLEUtils { static void taskRelease(const NimBLETaskData& taskData, int rc = 0); }; -#endif // CONFIG_BT_ENABLED +#endif // CONFIG_BT_NIMBLE_ENABLED #endif // NIMBLE_CPP_UTILS_H_ diff --git a/src/NimBLEValueAttribute.h b/src/NimBLEValueAttribute.h index a03535a3..cd08650f 100644 --- a/src/NimBLEValueAttribute.h +++ b/src/NimBLEValueAttribute.h @@ -18,8 +18,8 @@ #ifndef NIMBLE_CPP_VALUE_ATTRIBUTE_H_ #define NIMBLE_CPP_VALUE_ATTRIBUTE_H_ -#include "nimconfig.h" -#if CONFIG_BT_ENABLED && (CONFIG_BT_NIMBLE_ROLE_PERIPHERAL || CONFIG_BT_NIMBLE_ROLE_CENTRAL) +#include "syscfg/syscfg.h" +#if CONFIG_BT_NIMBLE_ENABLED && (MYNEWT_VAL(BLE_ROLE_PERIPHERAL) || MYNEWT_VAL(BLE_ROLE_CENTRAL)) # include "NimBLEAttribute.h" # include "NimBLEAttValue.h" @@ -82,5 +82,5 @@ class NimBLEValueAttribute { NimBLEAttValue m_value{}; }; -#endif // CONFIG_BT_ENABLED && (CONFIG_BT_NIMBLE_ROLE_PERIPHERAL || CONFIG_BT_NIMBLE_ROLE_CENTRAL) +#endif // CONFIG_BT_NIMBLE_ENABLED && (MYNEWT_VAL(BLE_ROLE_PERIPHERAL) || MYNEWT_VAL(BLE_ROLE_CENTRAL)) #endif // NIMBLE_CPP_ATTRIBUTE_H_ diff --git a/src/nimble/esp_port/port/include/esp_nimble_cfg.h b/src/nimble/esp_port/port/include/esp_nimble_cfg.h index 4f9d1a15..b04ed780 100644 --- a/src/nimble/esp_port/port/include/esp_nimble_cfg.h +++ b/src/nimble/esp_port/port/include/esp_nimble_cfg.h @@ -87,17 +87,17 @@ #endif #endif -#ifndef CONFIG_BT_NIMBLE_EXT_ADV -#define MYNEWT_VAL_BLE_EXT_ADV (0) -#else -#define MYNEWT_VAL_BLE_EXT_ADV (CONFIG_BT_NIMBLE_EXT_ADV) -#endif +// #ifndef CONFIG_BT_NIMBLE_EXT_ADV +// #define MYNEWT_VAL_BLE_EXT_ADV (0) +// #else +// #define MYNEWT_VAL_BLE_EXT_ADV (CONFIG_BT_NIMBLE_EXT_ADV) +// #endif -#ifndef CONFIG_BT_NIMBLE_EXT_ADV_MAX_SIZE -#define MYNEWT_VAL_BLE_EXT_ADV_MAX_SIZE (31) -#else -#define MYNEWT_VAL_BLE_EXT_ADV_MAX_SIZE (CONFIG_BT_NIMBLE_EXT_ADV_MAX_SIZE) -#endif +// #ifndef CONFIG_BT_NIMBLE_EXT_ADV_MAX_SIZE +// #define MYNEWT_VAL_BLE_EXT_ADV_MAX_SIZE (31) +// #else +// #define MYNEWT_VAL_BLE_EXT_ADV_MAX_SIZE (CONFIG_BT_NIMBLE_EXT_ADV_MAX_SIZE) +// #endif #ifndef CONFIG_BT_NIMBLE_ENC_ADV_DATA #define MYNEWT_VAL_ENC_ADV_DATA (0) @@ -177,35 +177,35 @@ #define MYNEWT_VAL_BLE_PERIODIC_ADV (CONFIG_BT_NIMBLE_ENABLE_PERIODIC_ADV) #endif -#ifndef CONFIG_NIMBLE_MAX_CONNECTIONS -#define MYNEWT_VAL_BLE_MAX_CONNECTIONS (4) -#else -#define MYNEWT_VAL_BLE_MAX_CONNECTIONS (CONFIG_NIMBLE_MAX_CONNECTIONS) -#endif +// #ifndef CONFIG_NIMBLE_MAX_CONNECTIONS +// #define MYNEWT_VAL_BLE_MAX_CONNECTIONS (4) +// #else +// #define MYNEWT_VAL_BLE_MAX_CONNECTIONS (CONFIG_NIMBLE_MAX_CONNECTIONS) +// #endif -#ifndef CONFIG_BT_NIMBLE_ROLE_BROADCASTER -#define MYNEWT_VAL_BLE_ROLE_BROADCASTER (0) -#else -#define MYNEWT_VAL_BLE_ROLE_BROADCASTER (CONFIG_BT_NIMBLE_ROLE_BROADCASTER) -#endif +// #ifndef CONFIG_BT_NIMBLE_ROLE_BROADCASTER +// #define MYNEWT_VAL_BLE_ROLE_BROADCASTER (0) +// #else +// #define MYNEWT_VAL_BLE_ROLE_BROADCASTER (CONFIG_BT_NIMBLE_ROLE_BROADCASTER) +// #endif -#ifndef CONFIG_BT_NIMBLE_ROLE_CENTRAL -#define MYNEWT_VAL_BLE_ROLE_CENTRAL (0) -#else -#define MYNEWT_VAL_BLE_ROLE_CENTRAL (CONFIG_BT_NIMBLE_ROLE_CENTRAL) -#endif +// #ifndef CONFIG_BT_NIMBLE_ROLE_CENTRAL +// #define MYNEWT_VAL_BLE_ROLE_CENTRAL (0) +// #else +// #define MYNEWT_VAL_BLE_ROLE_CENTRAL (CONFIG_BT_NIMBLE_ROLE_CENTRAL) +// #endif -#ifndef CONFIG_BT_NIMBLE_ROLE_OBSERVER -#define MYNEWT_VAL_BLE_ROLE_OBSERVER (0) -#else -#define MYNEWT_VAL_BLE_ROLE_OBSERVER (CONFIG_BT_NIMBLE_ROLE_OBSERVER) -#endif +// #ifndef CONFIG_BT_NIMBLE_ROLE_OBSERVER +// #define MYNEWT_VAL_BLE_ROLE_OBSERVER (0) +// #else +// #define MYNEWT_VAL_BLE_ROLE_OBSERVER (CONFIG_BT_NIMBLE_ROLE_OBSERVER) +// #endif -#ifndef CONFIG_BT_NIMBLE_ROLE_PERIPHERAL -#define MYNEWT_VAL_BLE_ROLE_PERIPHERAL (0) -#else -#define MYNEWT_VAL_BLE_ROLE_PERIPHERAL (CONFIG_BT_NIMBLE_ROLE_PERIPHERAL) -#endif +// #ifndef MYNEWT_VAL(BLE_ROLE_PERIPHERAL) +// #define MYNEWT_VAL_BLE_ROLE_PERIPHERAL (0) +// #else +// #define MYNEWT_VAL_BLE_ROLE_PERIPHERAL (MYNEWT_VAL(BLE_ROLE_PERIPHERAL)) +// #endif #ifndef MYNEWT_VAL_BLE_WHITELIST #define MYNEWT_VAL_BLE_WHITELIST (1) @@ -834,7 +834,7 @@ #endif #ifndef MYNEWT_VAL_BLE_L2CAP_MAX_CHANS -#define MYNEWT_VAL_BLE_L2CAP_MAX_CHANS (3*CONFIG_BT_NIMBLE_MAX_CONNECTIONS) +#define MYNEWT_VAL_BLE_L2CAP_MAX_CHANS (3*MYNEWT_VAL_BLE_MAX_CONNECTIONS) #endif #ifndef MYNEWT_VAL_BLE_L2CAP_RX_FRAG_TIMEOUT @@ -991,7 +991,7 @@ #endif #ifndef MYNEWT_VAL_BLE_STORE_MAX_CSFCS -#define MYNEWT_VAL_BLE_STORE_MAX_CSFCS (CONFIG_BT_NIMBLE_MAX_CONNECTIONS) +#define MYNEWT_VAL_BLE_STORE_MAX_CSFCS (MYNEWT_VAL_BLE_MAX_CONNECTIONS) #endif #ifdef CONFIG_BT_NIMBLE_MAX_EADS @@ -1767,11 +1767,11 @@ CONFIG_BT_NIMBLE_SVC_GAP_CENT_ADDR_RESOLUTION #endif -#ifndef CONFIG_BT_NIMBLE_SVC_GAP_DEVICE_NAME -#define MYNEWT_VAL_BLE_SVC_GAP_DEVICE_NAME "nimble" -#else -#define MYNEWT_VAL_BLE_SVC_GAP_DEVICE_NAME CONFIG_BT_NIMBLE_SVC_GAP_DEVICE_NAME -#endif +// #ifndef CONFIG_BT_NIMBLE_SVC_GAP_DEVICE_NAME +// #define MYNEWT_VAL_BLE_SVC_GAP_DEVICE_NAME "nimble" +// #else +// #define MYNEWT_VAL_BLE_SVC_GAP_DEVICE_NAME CONFIG_BT_NIMBLE_SVC_GAP_DEVICE_NAME +// #endif #ifndef MYNEWT_VAL_BLE_SVC_GAP_DEVICE_NAME_MAX_LENGTH #define MYNEWT_VAL_BLE_SVC_GAP_DEVICE_NAME_MAX_LENGTH CONFIG_BT_NIMBLE_GAP_DEVICE_NAME_MAX_LEN // According to the specification, the maximum length should be 248 diff --git a/src/nimble/esp_port/port/src/exp_nimble_mem.c b/src/nimble/esp_port/port/src/exp_nimble_mem.c index 633a4209..9bef0e1a 100644 --- a/src/nimble/esp_port/port/src/exp_nimble_mem.c +++ b/src/nimble/esp_port/port/src/exp_nimble_mem.c @@ -8,16 +8,16 @@ #include "esp_attr.h" #include "esp_heap_caps.h" - #include "nimconfig.h" + #include "syscfg/syscfg.h" #include "../include/esp_nimble_mem.h" void *nimble_platform_mem_malloc(size_t size) { - #ifdef CONFIG_BT_NIMBLE_MEM_ALLOC_MODE_INTERNAL + #if MYNEWT_VAL(NIMBLE_MEM_ALLOC_MODE_INTERNAL) return heap_caps_malloc(size, MALLOC_CAP_INTERNAL|MALLOC_CAP_8BIT); - #elif CONFIG_BT_NIMBLE_MEM_ALLOC_MODE_EXTERNAL + #elif MYNEWT_VAL(NIMBLE_MEM_ALLOC_MODE_EXTERNAL) return heap_caps_malloc(size, MALLOC_CAP_SPIRAM|MALLOC_CAP_8BIT); - #elif CONFIG_BT_NIMBLE_MEM_ALLOC_MODE_IRAM_8BIT + #elif MYNEWT_VAL(NIMBLE_MEM_ALLOC_MODE_IRAM_8BIT) return heap_caps_malloc_prefer(size, 2, MALLOC_CAP_INTERNAL|MALLOC_CAP_IRAM_8BIT, MALLOC_CAP_INTERNAL|MALLOC_CAP_8BIT); #else return malloc(size); @@ -26,11 +26,11 @@ void *nimble_platform_mem_calloc(size_t n, size_t size) { - #ifdef CONFIG_BT_NIMBLE_MEM_ALLOC_MODE_INTERNAL + #if MYNEWT_VAL(NIMBLE_MEM_ALLOC_MODE_INTERNAL) return heap_caps_calloc(n, size, MALLOC_CAP_INTERNAL|MALLOC_CAP_8BIT); - #elif CONFIG_BT_NIMBLE_MEM_ALLOC_MODE_EXTERNAL + #elif MYNEWT_VAL(NIMBLE_MEM_ALLOC_MODE_EXTERNAL) return heap_caps_calloc(n, size, MALLOC_CAP_SPIRAM|MALLOC_CAP_8BIT); - #elif CONFIG_BT_NIMBLE_MEM_ALLOC_MODE_IRAM_8BIT + #elif MYNEWT_VAL(NIMBLE_MEM_ALLOC_MODE_IRAM_8BIT) return heap_caps_calloc_prefer(n, size, 2, MALLOC_CAP_INTERNAL|MALLOC_CAP_IRAM_8BIT, MALLOC_CAP_INTERNAL|MALLOC_CAP_8BIT); #else return calloc(n, size); diff --git a/src/nimble/nimble/controller/include/controller/ble_fem.h b/src/nimble/nimble/controller/include/controller/ble_fem.h index 31466f26..bd0b93e1 100644 --- a/src/nimble/nimble/controller/include/controller/ble_fem.h +++ b/src/nimble/nimble/controller/include/controller/ble_fem.h @@ -24,7 +24,7 @@ extern "C" { #endif -#include "nimble/porting/nimble/include/syscfg/syscfg.h" +#include "syscfg/syscfg.h" #if MYNEWT_VAL(BLE_FEM_PA) void ble_fem_pa_init(void); diff --git a/src/nimble/nimble/controller/include/controller/ble_hw.h b/src/nimble/nimble/controller/include/controller/ble_hw.h index 991cb276..394c3a17 100644 --- a/src/nimble/nimble/controller/include/controller/ble_hw.h +++ b/src/nimble/nimble/controller/include/controller/ble_hw.h @@ -24,7 +24,7 @@ extern "C" { #endif -#include "nimble/porting/nimble/include/syscfg/syscfg.h" +#include "syscfg/syscfg.h" #if defined(ARCH_sim) #define BLE_USES_HW_WHITELIST (0) diff --git a/src/nimble/nimble/controller/include/controller/ble_ll_adv.h b/src/nimble/nimble/controller/include/controller/ble_ll_adv.h index 7ff6d350..ba17ed5e 100644 --- a/src/nimble/nimble/controller/include/controller/ble_ll_adv.h +++ b/src/nimble/nimble/controller/include/controller/ble_ll_adv.h @@ -20,7 +20,7 @@ #ifndef H_BLE_LL_ADV_ #define H_BLE_LL_ADV_ -#include "nimble/porting/nimble/include/syscfg/syscfg.h" +#include "syscfg/syscfg.h" #ifdef __cplusplus extern "C" { diff --git a/src/nimble/nimble/controller/include/controller/ble_ll_scan.h b/src/nimble/nimble/controller/include/controller/ble_ll_scan.h index 7a8640cb..4c71a3e7 100644 --- a/src/nimble/nimble/controller/include/controller/ble_ll_scan.h +++ b/src/nimble/nimble/controller/include/controller/ble_ll_scan.h @@ -22,7 +22,7 @@ #include "nimble/nimble/controller/include/controller/ble_ll_sched.h" #include "nimble/nimble/controller/include/controller/ble_ll_tmr.h" -#include "nimble/porting/nimble/include/syscfg/syscfg.h" +#include "syscfg/syscfg.h" #include "nimble/nimble/include/nimble/nimble_npl.h" #ifdef __cplusplus diff --git a/src/nimble/nimble/controller/src/ble_ll.c b/src/nimble/nimble/controller/src/ble_ll.c index d0bf53f6..06d0d452 100644 --- a/src/nimble/nimble/controller/src/ble_ll.c +++ b/src/nimble/nimble/controller/src/ble_ll.c @@ -23,7 +23,7 @@ #include #include #include "nimble/porting/nimble/include/sysinit/sysinit.h" -#include "nimble/porting/nimble/include/syscfg/syscfg.h" +#include "syscfg/syscfg.h" #include "nimble/porting/nimble/include/os/os.h" #include "nimble/porting/nimble/include/stats/stats.h" #include "nimble/nimble/include/nimble/ble.h" diff --git a/src/nimble/nimble/controller/src/ble_ll_adv.c b/src/nimble/nimble/controller/src/ble_ll_adv.c index d3ba63eb..7a517a6a 100644 --- a/src/nimble/nimble/controller/src/ble_ll_adv.c +++ b/src/nimble/nimble/controller/src/ble_ll_adv.c @@ -24,7 +24,7 @@ #include #include #include -#include "nimble/porting/nimble/include/syscfg/syscfg.h" +#include "syscfg/syscfg.h" #include "nimble/porting/nimble/include/os/os.h" #include "nimble/nimble/drivers/nrf51/include/ble/xcvr.h" #include "nimble/nimble/include/nimble/ble.h" diff --git a/src/nimble/nimble/controller/src/ble_ll_conn.c b/src/nimble/nimble/controller/src/ble_ll_conn.c index c5dc756c..e01c24a3 100644 --- a/src/nimble/nimble/controller/src/ble_ll_conn.c +++ b/src/nimble/nimble/controller/src/ble_ll_conn.c @@ -23,7 +23,7 @@ #include #include #include -#include "nimble/porting/nimble/include/syscfg/syscfg.h" +#include "syscfg/syscfg.h" #include "nimble/porting/nimble/include/os/os.h" #include "nimble/nimble/include/nimble/ble.h" #include "nimble/nimble/include/nimble/hci_common.h" diff --git a/src/nimble/nimble/controller/src/ble_ll_conn_hci.c b/src/nimble/nimble/controller/src/ble_ll_conn_hci.c index fc9e7217..3b1a4d16 100644 --- a/src/nimble/nimble/controller/src/ble_ll_conn_hci.c +++ b/src/nimble/nimble/controller/src/ble_ll_conn_hci.c @@ -22,7 +22,7 @@ #include #include #include -#include "nimble/porting/nimble/include/syscfg/syscfg.h" +#include "syscfg/syscfg.h" #include "nimble/porting/nimble/include/os/os.h" #include "nimble/nimble/include/nimble/ble.h" #include "nimble/nimble/include/nimble/hci_common.h" diff --git a/src/nimble/nimble/controller/src/ble_ll_ctrl.c b/src/nimble/nimble/controller/src/ble_ll_ctrl.c index 52a80c98..c29aef86 100644 --- a/src/nimble/nimble/controller/src/ble_ll_ctrl.c +++ b/src/nimble/nimble/controller/src/ble_ll_ctrl.c @@ -22,7 +22,7 @@ #include #include #include -#include "nimble/porting/nimble/include/syscfg/syscfg.h" +#include "syscfg/syscfg.h" #include "nimble/nimble/include/nimble/ble.h" #include "nimble/nimble/include/nimble/nimble_opt.h" #include "nimble/nimble/include/nimble/hci_common.h" diff --git a/src/nimble/nimble/controller/src/ble_ll_dtm.c b/src/nimble/nimble/controller/src/ble_ll_dtm.c index 76255b23..33f96876 100644 --- a/src/nimble/nimble/controller/src/ble_ll_dtm.c +++ b/src/nimble/nimble/controller/src/ble_ll_dtm.c @@ -18,7 +18,7 @@ */ #ifndef ESP_PLATFORM -#include "nimble/porting/nimble/include/syscfg/syscfg.h" +#include "syscfg/syscfg.h" #include "nimble/porting/nimble/include/sysinit/sysinit.h" #if MYNEWT_VAL(BLE_LL_DTM) diff --git a/src/nimble/nimble/controller/src/ble_ll_hci.c b/src/nimble/nimble/controller/src/ble_ll_hci.c index 021e2ada..161c0a57 100644 --- a/src/nimble/nimble/controller/src/ble_ll_hci.c +++ b/src/nimble/nimble/controller/src/ble_ll_hci.c @@ -21,7 +21,7 @@ #include #include #include -#include "nimble/porting/nimble/include/syscfg/syscfg.h" +#include "syscfg/syscfg.h" #include "nimble/porting/nimble/include/os/os.h" #include "nimble/nimble/include/nimble/ble.h" #include "nimble/nimble/include/nimble/nimble_opt.h" diff --git a/src/nimble/nimble/controller/src/ble_ll_hci_ev.c b/src/nimble/nimble/controller/src/ble_ll_hci_ev.c index 51b72e81..7a9eda91 100644 --- a/src/nimble/nimble/controller/src/ble_ll_hci_ev.c +++ b/src/nimble/nimble/controller/src/ble_ll_hci_ev.c @@ -24,7 +24,7 @@ #include #include #include -#include "nimble/porting/nimble/include/syscfg/syscfg.h" +#include "syscfg/syscfg.h" #include "nimble/nimble/include/nimble/ble.h" #include "nimble/nimble/include/nimble/hci_common.h" #include "nimble/nimble/controller/include/controller/ble_ll.h" diff --git a/src/nimble/nimble/controller/src/ble_ll_hci_supp_cmd.c b/src/nimble/nimble/controller/src/ble_ll_hci_supp_cmd.c index 71068cc3..18b1720a 100644 --- a/src/nimble/nimble/controller/src/ble_ll_hci_supp_cmd.c +++ b/src/nimble/nimble/controller/src/ble_ll_hci_supp_cmd.c @@ -21,7 +21,7 @@ #include #include -#include +#include #include #include diff --git a/src/nimble/nimble/controller/src/ble_ll_hci_vs.c b/src/nimble/nimble/controller/src/ble_ll_hci_vs.c index b405f7c1..db56e192 100644 --- a/src/nimble/nimble/controller/src/ble_ll_hci_vs.c +++ b/src/nimble/nimble/controller/src/ble_ll_hci_vs.c @@ -20,7 +20,7 @@ #ifndef ESP_PLATFORM #include -#include "nimble/porting/nimble/include/syscfg/syscfg.h" +#include "syscfg/syscfg.h" #include "nimble/nimble/controller/include/controller/ble_ll_utils.h" #include "nimble/nimble/controller/include/controller/ble_ll.h" #include "nimble/nimble/controller/include/controller/ble_ll_hci.h" diff --git a/src/nimble/nimble/controller/src/ble_ll_iso.c b/src/nimble/nimble/controller/src/ble_ll_iso.c index 08246315..b4433e82 100644 --- a/src/nimble/nimble/controller/src/ble_ll_iso.c +++ b/src/nimble/nimble/controller/src/ble_ll_iso.c @@ -18,7 +18,7 @@ */ #ifndef ESP_PLATFORM #include -#include "nimble/porting/nimble/include/syscfg/syscfg.h" +#include "syscfg/syscfg.h" #include "nimble/nimble/include/nimble/ble.h" #include "nimble/nimble/include/nimble/hci_common.h" #include "nimble/nimble/controller/include/controller/ble_ll_iso.h" diff --git a/src/nimble/nimble/controller/src/ble_ll_iso_big.c b/src/nimble/nimble/controller/src/ble_ll_iso_big.c index 938a7fc2..3fc0fab8 100644 --- a/src/nimble/nimble/controller/src/ble_ll_iso_big.c +++ b/src/nimble/nimble/controller/src/ble_ll_iso_big.c @@ -21,7 +21,7 @@ #include #include -#include +#include #include #include #include diff --git a/src/nimble/nimble/controller/src/ble_ll_isoal.c b/src/nimble/nimble/controller/src/ble_ll_isoal.c index 187b04a0..65c3ddce 100644 --- a/src/nimble/nimble/controller/src/ble_ll_isoal.c +++ b/src/nimble/nimble/controller/src/ble_ll_isoal.c @@ -20,7 +20,7 @@ #ifndef ESP_PLATFORM #include -#include +#include #include #include #include diff --git a/src/nimble/nimble/controller/src/ble_ll_priv.h b/src/nimble/nimble/controller/src/ble_ll_priv.h index 5b711c95..8152ccab 100644 --- a/src/nimble/nimble/controller/src/ble_ll_priv.h +++ b/src/nimble/nimble/controller/src/ble_ll_priv.h @@ -56,7 +56,7 @@ int ble_ll_is_busy(unsigned int flags); #ifdef MYNEWT -#include "nimble/porting/nimble/include/syscfg/syscfg.h" +#include "syscfg/syscfg.h" #include "nimble/porting/nimble/include/hal/hal_gpio.h" #define BLE_LL_DEBUG_GPIO_INIT(_name) \ diff --git a/src/nimble/nimble/controller/src/ble_ll_rand.c b/src/nimble/nimble/controller/src/ble_ll_rand.c index c8ddbb66..bc3bb42f 100644 --- a/src/nimble/nimble/controller/src/ble_ll_rand.c +++ b/src/nimble/nimble/controller/src/ble_ll_rand.c @@ -24,7 +24,7 @@ #include #include #include -#include "nimble/porting/nimble/include/syscfg/syscfg.h" +#include "syscfg/syscfg.h" #include "nimble/porting/nimble/include/os/os.h" #include "nimble/nimble/include/nimble/ble.h" #include "nimble/nimble/include/nimble/nimble_opt.h" diff --git a/src/nimble/nimble/controller/src/ble_ll_resolv.c b/src/nimble/nimble/controller/src/ble_ll_resolv.c index a3f111b9..c0e60409 100644 --- a/src/nimble/nimble/controller/src/ble_ll_resolv.c +++ b/src/nimble/nimble/controller/src/ble_ll_resolv.c @@ -21,7 +21,7 @@ #include #include #include -#include "nimble/porting/nimble/include/syscfg/syscfg.h" +#include "syscfg/syscfg.h" #include "nimble/porting/nimble/include/os/os.h" #include "nimble/nimble/include/nimble/ble.h" #include "nimble/nimble/include/nimble/nimble_opt.h" diff --git a/src/nimble/nimble/controller/src/ble_ll_rfmgmt.c b/src/nimble/nimble/controller/src/ble_ll_rfmgmt.c index 52df894c..d71f1e80 100644 --- a/src/nimble/nimble/controller/src/ble_ll_rfmgmt.c +++ b/src/nimble/nimble/controller/src/ble_ll_rfmgmt.c @@ -21,7 +21,7 @@ #include #include #include -#include "nimble/porting/nimble/include/syscfg/syscfg.h" +#include "syscfg/syscfg.h" #include "nimble/nimble/controller/include/controller/ble_phy.h" #include "nimble/nimble/controller/include/controller/ble_ll.h" #include "nimble/nimble/controller/include/controller/ble_ll_sched.h" diff --git a/src/nimble/nimble/controller/src/ble_ll_scan.c b/src/nimble/nimble/controller/src/ble_ll_scan.c index 8e5fda9b..e41cda13 100644 --- a/src/nimble/nimble/controller/src/ble_ll_scan.c +++ b/src/nimble/nimble/controller/src/ble_ll_scan.c @@ -23,7 +23,7 @@ #include #include #include -#include "nimble/porting/nimble/include/syscfg/syscfg.h" +#include "syscfg/syscfg.h" #include "nimble/porting/nimble/include/os/os.h" #include "nimble/nimble/include/nimble/ble.h" #include "nimble/nimble/include/nimble/hci_common.h" diff --git a/src/nimble/nimble/controller/src/ble_ll_scan_aux.c b/src/nimble/nimble/controller/src/ble_ll_scan_aux.c index 77eaaf76..13e7d387 100644 --- a/src/nimble/nimble/controller/src/ble_ll_scan_aux.c +++ b/src/nimble/nimble/controller/src/ble_ll_scan_aux.c @@ -17,7 +17,7 @@ * under the License. */ -#include +#include #if MYNEWT_VAL(BLE_LL_ROLE_OBSERVER) && MYNEWT_VAL(BLE_LL_CFG_FEAT_LL_EXT_ADV) diff --git a/src/nimble/nimble/controller/src/ble_ll_sync.c b/src/nimble/nimble/controller/src/ble_ll_sync.c index 76f96ec6..7c7c9caf 100644 --- a/src/nimble/nimble/controller/src/ble_ll_sync.c +++ b/src/nimble/nimble/controller/src/ble_ll_sync.c @@ -23,7 +23,7 @@ #include #include -#include "nimble/porting/nimble/include/syscfg/syscfg.h" +#include "syscfg/syscfg.h" #include "nimble/nimble/controller/include/controller/ble_ll.h" #include "nimble/nimble/controller/include/controller/ble_ll_pdu.h" diff --git a/src/nimble/nimble/controller/src/ble_ll_trace.c b/src/nimble/nimble/controller/src/ble_ll_trace.c index 7be5a0be..e51f852f 100644 --- a/src/nimble/nimble/controller/src/ble_ll_trace.c +++ b/src/nimble/nimble/controller/src/ble_ll_trace.c @@ -18,7 +18,7 @@ */ #ifndef ESP_PLATFORM #include -#include "nimble/porting/nimble/include/syscfg/syscfg.h" +#include "syscfg/syscfg.h" #include "nimble/porting/nimble/include/os/os_trace_api.h" #include "nimble/nimble/controller/include/controller/ble_ll_trace.h" diff --git a/src/nimble/nimble/controller/src/ble_ll_whitelist.c b/src/nimble/nimble/controller/src/ble_ll_whitelist.c index 1cbfda06..a7881308 100644 --- a/src/nimble/nimble/controller/src/ble_ll_whitelist.c +++ b/src/nimble/nimble/controller/src/ble_ll_whitelist.c @@ -21,7 +21,7 @@ #include #include #include -#include "nimble/porting/nimble/include/syscfg/syscfg.h" +#include "syscfg/syscfg.h" #include "nimble/porting/nimble/include/os/os.h" #include "nimble/nimble/include/nimble/ble.h" #include "nimble/nimble/include/nimble/nimble_opt.h" diff --git a/src/nimble/nimble/drivers/nrf51/src/ble_hw.c b/src/nimble/nimble/drivers/nrf51/src/ble_hw.c index 04195d2b..5f851fb4 100644 --- a/src/nimble/nimble/drivers/nrf51/src/ble_hw.c +++ b/src/nimble/nimble/drivers/nrf51/src/ble_hw.c @@ -22,7 +22,7 @@ #include #include #include -#include "nimble/porting/nimble/include/syscfg/syscfg.h" +#include "syscfg/syscfg.h" #include "nimble/porting/nimble/include/os/os.h" #include "nimble/nimble/drivers/nrf51/include/ble/xcvr.h" #include "nimble/nimble/include/nimble/ble.h" diff --git a/src/nimble/nimble/drivers/nrf51/src/ble_phy.c b/src/nimble/nimble/drivers/nrf51/src/ble_phy.c index 9b44ace0..305f9087 100644 --- a/src/nimble/nimble/drivers/nrf51/src/ble_phy.c +++ b/src/nimble/nimble/drivers/nrf51/src/ble_phy.c @@ -22,7 +22,7 @@ #include #include #include -#include "nimble/porting/nimble/include/syscfg/syscfg.h" +#include "syscfg/syscfg.h" #include "nimble/porting/nimble/include/os/os.h" /* Keep os_cputime explicitly to enable build on non-Mynewt platforms */ #include "nimble/porting/nimble/include/os/os_cputime.h" diff --git a/src/nimble/nimble/drivers/nrf5x/include/ble/xcvr.h b/src/nimble/nimble/drivers/nrf5x/include/ble/xcvr.h index 7c28fd3b..b8c7a0f8 100644 --- a/src/nimble/nimble/drivers/nrf5x/include/ble/xcvr.h +++ b/src/nimble/nimble/drivers/nrf5x/include/ble/xcvr.h @@ -26,7 +26,7 @@ extern "C" { #endif -#include +#include #define XCVR_RX_RADIO_RAMPUP_USECS (40) #define XCVR_TX_RADIO_RAMPUP_USECS (40) diff --git a/src/nimble/nimble/drivers/nrf5x/src/ble_hw.c b/src/nimble/nimble/drivers/nrf5x/src/ble_hw.c index e7cf010a..7525926d 100644 --- a/src/nimble/nimble/drivers/nrf5x/src/ble_hw.c +++ b/src/nimble/nimble/drivers/nrf5x/src/ble_hw.c @@ -22,7 +22,7 @@ #include #include #include -#include "nimble/porting/nimble/include/syscfg/syscfg.h" +#include "syscfg/syscfg.h" #include "nimble/porting/nimble/include/os/os.h" #include "nimble/nimble/drivers/nrf5x/include/ble/xcvr.h" #include "nimble/nimble/include/nimble/ble.h" diff --git a/src/nimble/nimble/drivers/nrf5x/src/ble_phy.c b/src/nimble/nimble/drivers/nrf5x/src/ble_phy.c index 960fcc4e..67b4891d 100644 --- a/src/nimble/nimble/drivers/nrf5x/src/ble_phy.c +++ b/src/nimble/nimble/drivers/nrf5x/src/ble_phy.c @@ -28,7 +28,7 @@ #include #include #include -#include "nimble/porting/nimble/include/syscfg/syscfg.h" +#include "syscfg/syscfg.h" #include "nimble/porting/nimble/include/os/os.h" /* Keep os_cputime explicitly to enable build on non-Mynewt platforms */ #include "nimble/porting/nimble/include/os/os_cputime.h" diff --git a/src/nimble/nimble/drivers/nrf5x/src/ble_phy_trace.c b/src/nimble/nimble/drivers/nrf5x/src/ble_phy_trace.c index c31efda4..ce395b11 100644 --- a/src/nimble/nimble/drivers/nrf5x/src/ble_phy_trace.c +++ b/src/nimble/nimble/drivers/nrf5x/src/ble_phy_trace.c @@ -20,7 +20,7 @@ #if defined(ARDUINO_ARCH_NRF5) && (defined(NRF52_SERIES) || defined(NRF53_SERIES)) #include -#include "nimble/porting/nimble/include/syscfg/syscfg.h" +#include "syscfg/syscfg.h" #include "nimble/porting/nimble/include/os/os_trace_api.h" #if MYNEWT_VAL(BLE_PHY_SYSVIEW) diff --git a/src/nimble/nimble/host/include/host/ble_aes_ccm.h b/src/nimble/nimble/host/include/host/ble_aes_ccm.h index a2d1eca2..1895c81d 100644 --- a/src/nimble/nimble/host/include/host/ble_aes_ccm.h +++ b/src/nimble/nimble/host/include/host/ble_aes_ccm.h @@ -7,7 +7,7 @@ #ifndef _BLE_AES_CCM_ #define _BLE_AES_CCM_ -#include "nimble/porting/nimble/include/syscfg/syscfg.h" +#include "syscfg/syscfg.h" #include "nimble/porting/nimble/include/os/queue.h" #include "nimble/nimble/host/include/host/ble_hs.h" diff --git a/src/nimble/nimble/host/include/host/ble_ead.h b/src/nimble/nimble/host/include/host/ble_ead.h index 74539f7f..96b4523c 100644 --- a/src/nimble/nimble/host/include/host/ble_ead.h +++ b/src/nimble/nimble/host/include/host/ble_ead.h @@ -9,7 +9,7 @@ #include "nimble/porting/nimble/include/os/queue.h" #include -#include "nimble/porting/nimble/include/syscfg/syscfg.h" +#include "syscfg/syscfg.h" #include "nimble/nimble/host/include/host/ble_gap.h" #ifdef __cplusplus diff --git a/src/nimble/nimble/host/include/host/ble_gap.h b/src/nimble/nimble/host/include/host/ble_gap.h index 31e43228..442abafa 100644 --- a/src/nimble/nimble/host/include/host/ble_gap.h +++ b/src/nimble/nimble/host/include/host/ble_gap.h @@ -30,7 +30,7 @@ #include #include "nimble/nimble/host/include/host/ble_hs.h" #include "nimble/nimble/host/include/host/ble_hs_adv.h" -#include "nimble/porting/nimble/include/syscfg/syscfg.h" +#include "syscfg/syscfg.h" #include "nimble/nimble/host/include/host/ble_esp_gap.h" #if MYNEWT_VAL(ENC_ADV_DATA) @@ -1059,7 +1059,7 @@ struct ble_gap_event { /** Advertiser clock accuracy */ uint8_t adv_clk_accuracy; #if MYNEWT_VAL(BLE_PERIODIC_ADV_WITH_RESPONSES) - /** Number of subevents. If zero, the periodic advertiser will be a broadcaster, + /** Number of subevents. If zero, the periodic advertiser will be a broadcaster, * without responses. */ uint8_t num_subevents; @@ -1667,29 +1667,29 @@ struct ble_gap_multi_conn_params { /** The duration of the discovery procedure. */ int32_t duration_ms; - /** - * Additional arguments specifying the particulars of the connect procedure. When extended - * adv is disabled or BLE_GAP_LE_PHY_1M_MASK is set in phy_mask this parameter can't be + /** + * Additional arguments specifying the particulars of the connect procedure. When extended + * adv is disabled or BLE_GAP_LE_PHY_1M_MASK is set in phy_mask this parameter can't be * specified to null. */ const struct ble_gap_conn_params *phy_1m_conn_params; #if MYNEWT_VAL(BLE_EXT_ADV) - /** + /** * Additional arguments specifying the particulars of the connect procedure. When * BLE_GAP_LE_PHY_2M_MASK is set in phy_mask this parameter can't be specified to null. */ const struct ble_gap_conn_params *phy_2m_conn_params; - - /** + + /** * Additional arguments specifying the particulars of the connect procedure. When * BLE_GAP_LE_PHY_CODED_MASK is set in phy_mask this parameter can't be specified to null. */ const struct ble_gap_conn_params *phy_coded_conn_params; #endif // MYNEWT_VAL(BLE_EXT_ADV) - /** - * The minimum length occupied by this connection in scheduler. 0 means disable the + /** + * The minimum length occupied by this connection in scheduler. 0 means disable the * optimization for this connection. */ uint32_t scheduling_len_us; @@ -2192,10 +2192,10 @@ struct ble_gap_periodic_sync_params { unsigned int filter_duplicates:1; #endif #if MYNEWT_VAL(BLE_AOA_AOD) - /** + /** * Specifies the type of Constant Tone Extension (CTE) to which the receiver should not synchronize. * This parameter determines which types of packets with specific CTE configurations are ignored during synchronization. - * + * * Possible values: * 0: Do not sync to packets with an AoA Constant Tone Extension. * 1: Do not sync to packets with an AoD Constant Tone Extension with 1 μs slots. @@ -2223,7 +2223,7 @@ struct ble_gap_periodic_adv_cte_params { /** * Constant Tone Extension length in 8 µs units (Range: 0x02 to 0x14) */ - uint8_t cte_length; + uint8_t cte_length; /** * Constant Tone Extension type @@ -2231,19 +2231,19 @@ struct ble_gap_periodic_adv_cte_params { * 0x01 : AoD Constant Tone Extension with 1 µs slots * 0x02 : AoD Constant Tone Extension with 2 µs slots */ - uint8_t cte_type; - + uint8_t cte_type; + /** - * The number of Constant Tone Extensions to transmit in each periodic + * The number of Constant Tone Extensions to transmit in each periodic * advertising interval (Range: 0x01 to 0x10) */ - uint8_t cte_count; - + uint8_t cte_count; + /** * The number of Antenna IDs in the pattern * (Range: 0x02 to 0x4B) */ - uint8_t switching_pattern_length; + uint8_t switching_pattern_length; /** * Antenna ID in the pattern. @@ -2259,13 +2259,13 @@ struct ble_gap_cte_sampling_params { * 0x01 : Switching and sampling slots are 1 μs each * 0x02 : Switching and sampling slots are 2 μs each */ - uint8_t slot_durations; - + uint8_t slot_durations; + /** * The number of Antenna IDs in the pattern * (Range: 0x02 to 0x4B) */ - uint8_t switching_pattern_length; + uint8_t switching_pattern_length; /** * Antenna ID in the pattern. @@ -2548,7 +2548,7 @@ int ble_gap_read_periodic_adv_list_size(uint8_t *per_adv_list_size); * * @return 0 on success; nonzero on failure. */ -int ble_gap_set_connless_cte_transmit_params(uint8_t instance, +int ble_gap_set_connless_cte_transmit_params(uint8_t instance, const struct ble_gap_periodic_adv_cte_params *params); /** @@ -2571,7 +2571,7 @@ int ble_gap_set_connless_cte_transmit_enable(uint8_t instance, uint8_t cte_enabl * * @return 0 on success; nonzero on failure. */ -int ble_gap_set_connless_iq_sampling_enable(uint16_t sync_handle, uint8_t sampling_enable, +int ble_gap_set_connless_iq_sampling_enable(uint16_t sync_handle, uint8_t sampling_enable, uint8_t max_sampled_ctes, const struct ble_gap_cte_sampling_params *cte_sampling_params); @@ -2584,7 +2584,7 @@ int ble_gap_set_connless_iq_sampling_enable(uint16_t sync_handle, uint8_t sampli * * @return 0 on success; nonzero on failure. */ -int ble_gap_set_conn_cte_recv_param(uint16_t conn_handle, uint8_t sampling_enable, +int ble_gap_set_conn_cte_recv_param(uint16_t conn_handle, uint8_t sampling_enable, const struct ble_gap_cte_sampling_params *cte_sampling_params); /** @@ -2597,7 +2597,7 @@ int ble_gap_set_conn_cte_recv_param(uint16_t conn_handle, uint8_t sampling_enabl * * @return 0 on success; nonzero on failure. */ -int ble_gap_set_conn_cte_transmit_param(uint16_t conn_handle, uint8_t cte_types, +int ble_gap_set_conn_cte_transmit_param(uint16_t conn_handle, uint8_t cte_types, uint8_t switching_pattern_len, const uint8_t *antenna_ids); /** @@ -2634,7 +2634,7 @@ int ble_gap_conn_cte_rsp_enable(uint16_t conn_handle, uint8_t enable); * * @return 0 on success; nonzero on failure. */ -int ble_gap_read_antenna_information(uint8_t *switch_sampling_rates, uint8_t *num_antennae, +int ble_gap_read_antenna_information(uint8_t *switch_sampling_rates, uint8_t *num_antennae, uint8_t *max_switch_pattern_len, uint8_t *max_cte_len); #endif // MYNEWT_VAL(BLE_AOA_AOD) @@ -2932,11 +2932,11 @@ int ble_gap_ext_connect(uint8_t own_addr_type, const ble_addr_t *peer_addr, #if MYNEWT_VAL(OPTIMIZE_MULTI_CONN) /** * @brief Enable the optimization of multiple connections. - * + * * @param enable Enable or disable the optimization. * @param common_factor The greatest common factor of all intervals in 0.625ms units. - * @return 0 on success; - * + * @return 0 on success; + * */ int ble_gap_common_factor_set(bool enable, uint32_t common_factor); @@ -2953,7 +2953,7 @@ int ble_gap_common_factor_set(bool enable, uint32_t common_factor); * callback as its event-reporting mechanism. * @param cb_arg The optional argument to pass to the callback * function. - * + * * @return 0 on success; * BLE_HS_EALREADY if a connection attempt is * already in progress; @@ -2963,7 +2963,7 @@ int ble_gap_common_factor_set(bool enable, uint32_t common_factor); * connected; * Other nonzero on error. */ -int ble_gap_multi_connect(struct ble_gap_multi_conn_params *multi_conn_params, +int ble_gap_multi_connect(struct ble_gap_multi_conn_params *multi_conn_params, ble_gap_event_fn *cb, void *cb_arg); #endif diff --git a/src/nimble/nimble/host/include/host/ble_gatt.h b/src/nimble/nimble/host/include/host/ble_gatt.h index e73d361e..133b81b8 100644 --- a/src/nimble/nimble/host/include/host/ble_gatt.h +++ b/src/nimble/nimble/host/include/host/ble_gatt.h @@ -32,7 +32,7 @@ #include "nimble/nimble/host/include/host/ble_att.h" #include "nimble/nimble/host/include/host/ble_uuid.h" #include "nimble/nimble/host/include/host/ble_esp_gatt.h" -#include "nimble/porting/nimble/include/syscfg/syscfg.h" +#include "syscfg/syscfg.h" #ifdef __cplusplus extern "C" { #endif @@ -189,7 +189,7 @@ struct ble_hs_cfg; #define BLE_GATT_SVC_TYPE_SECONDARY 2 /** @} */ -/** +/** * Client Presentation Format * GATT Format Types * Ref: Assigned Numbers Specification diff --git a/src/nimble/nimble/host/include/host/ble_hs_adv.h b/src/nimble/nimble/host/include/host/ble_hs_adv.h index 4626d860..af2a4454 100644 --- a/src/nimble/nimble/host/include/host/ble_hs_adv.h +++ b/src/nimble/nimble/host/include/host/ble_hs_adv.h @@ -22,7 +22,7 @@ #include #include "nimble/nimble/host/include/host/ble_uuid.h" -#include "nimble/porting/nimble/include/syscfg/syscfg.h" +#include "syscfg/syscfg.h" #ifdef __cplusplus extern "C" { diff --git a/src/nimble/nimble/host/include/host/ble_sm.h b/src/nimble/nimble/host/include/host/ble_sm.h index e5b2f552..ff381cf2 100644 --- a/src/nimble/nimble/host/include/host/ble_sm.h +++ b/src/nimble/nimble/host/include/host/ble_sm.h @@ -21,7 +21,7 @@ #define H_BLE_SM_ #include -#include "nimble/porting/nimble/include/syscfg/syscfg.h" +#include "syscfg/syscfg.h" #ifdef __cplusplus extern "C" { diff --git a/src/nimble/nimble/host/mesh/include/mesh/cdb.h b/src/nimble/nimble/host/mesh/include/mesh/cdb.h index 2519f9b8..fa691eb6 100644 --- a/src/nimble/nimble/host/mesh/include/mesh/cdb.h +++ b/src/nimble/nimble/host/mesh/include/mesh/cdb.h @@ -6,7 +6,7 @@ #ifndef _BLUETOOTH_MESH_CDB_H_ #define _BLUETOOTH_MESH_CDB_H_ -#include "nimble/porting/nimble/include/syscfg/syscfg.h" +#include "syscfg/syscfg.h" #if MYNEWT_VAL(BLE_MESH_CDB) #define NODE_COUNT CONFIG_BT_MESH_NODE_COUNT diff --git a/src/nimble/nimble/host/mesh/include/mesh/glue.h b/src/nimble/nimble/host/mesh/include/mesh/glue.h index 3fa52979..3badd24e 100644 --- a/src/nimble/nimble/host/mesh/include/mesh/glue.h +++ b/src/nimble/nimble/host/mesh/include/mesh/glue.h @@ -23,7 +23,7 @@ #include #include -#include "nimble/porting/nimble/include/syscfg/syscfg.h" +#include "syscfg/syscfg.h" #include "nimble/porting/nimble/include/logcfg/logcfg.h" #include "nimble/porting/nimble/include/modlog/modlog.h" #include "nimble/nimble/include/nimble/nimble_npl.h" @@ -659,7 +659,7 @@ settings_load(void) struct k_mem_slab { /** * _wait_q_t is not required now, as we don't implement zephyr timeouts - - * if slab couldn't be allocated, we simply return error + * if slab couldn't be allocated, we simply return error */ uint32_t num_blocks; /** number of memory blocks available for allocation */ size_t block_size; /** size of single block */ diff --git a/src/nimble/nimble/host/mesh/include/mesh/mesh.h b/src/nimble/nimble/host/mesh/include/mesh/mesh.h index 7d260bd2..2629b1a5 100644 --- a/src/nimble/nimble/host/mesh/include/mesh/mesh.h +++ b/src/nimble/nimble/host/mesh/include/mesh/mesh.h @@ -11,7 +11,7 @@ #define __BT_MESH_H #include -#include "nimble/porting/nimble/include/syscfg/syscfg.h" +#include "syscfg/syscfg.h" #include "nimble/porting/nimble/include/os/os_mbuf.h" #include "glue.h" diff --git a/src/nimble/nimble/host/mesh/src/access.c b/src/nimble/nimble/host/mesh/src/access.c index 03f45f7b..a7df6fc5 100644 --- a/src/nimble/nimble/host/mesh/src/access.c +++ b/src/nimble/nimble/host/mesh/src/access.c @@ -6,7 +6,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -#include "nimble/porting/nimble/include/syscfg/syscfg.h" +#include "syscfg/syscfg.h" #if MYNEWT_VAL(BLE_MESH) #define MESH_LOG_MODULE BLE_MESH_ACCESS_LOG diff --git a/src/nimble/nimble/host/mesh/src/adv.c b/src/nimble/nimble/host/mesh/src/adv.c index 48fc80d8..01caafee 100644 --- a/src/nimble/nimble/host/mesh/src/adv.c +++ b/src/nimble/nimble/host/mesh/src/adv.c @@ -7,7 +7,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -#include "nimble/porting/nimble/include/syscfg/syscfg.h" +#include "syscfg/syscfg.h" #if MYNEWT_VAL(BLE_MESH) #define MESH_LOG_MODULE BLE_MESH_ADV_LOG diff --git a/src/nimble/nimble/host/mesh/src/adv_ext.c b/src/nimble/nimble/host/mesh/src/adv_ext.c index 5839e7b1..ec3ebcea 100644 --- a/src/nimble/nimble/host/mesh/src/adv_ext.c +++ b/src/nimble/nimble/host/mesh/src/adv_ext.c @@ -14,7 +14,7 @@ #include "net.h" #include "proxy.h" #include "pb_gatt_srv.h" -#include "nimble/porting/nimble/include/syscfg/syscfg.h" +#include "syscfg/syscfg.h" #include "nimble/nimble/host/include/host/ble_gap.h" #if MYNEWT_VAL(BLE_MESH_ADV_EXT) diff --git a/src/nimble/nimble/host/mesh/src/adv_legacy.c b/src/nimble/nimble/host/mesh/src/adv_legacy.c index a0b7787a..1df8690a 100644 --- a/src/nimble/nimble/host/mesh/src/adv_legacy.c +++ b/src/nimble/nimble/host/mesh/src/adv_legacy.c @@ -7,7 +7,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -#include "nimble/porting/nimble/include/syscfg/syscfg.h" +#include "syscfg/syscfg.h" #if MYNEWT_VAL(BLE_MESH) #define MESH_LOG_MODULE BLE_MESH_ADV_LOG diff --git a/src/nimble/nimble/host/mesh/src/aes-ccm.c b/src/nimble/nimble/host/mesh/src/aes-ccm.c index 7fed085f..170b0e72 100644 --- a/src/nimble/nimble/host/mesh/src/aes-ccm.c +++ b/src/nimble/nimble/host/mesh/src/aes-ccm.c @@ -5,7 +5,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -#include "nimble/porting/nimble/include/syscfg/syscfg.h" +#include "syscfg/syscfg.h" #if MYNEWT_VAL(BLE_MESH) #include "crypto.h" diff --git a/src/nimble/nimble/host/mesh/src/app_keys.c b/src/nimble/nimble/host/mesh/src/app_keys.c index cb41e06f..2e148a87 100644 --- a/src/nimble/nimble/host/mesh/src/app_keys.c +++ b/src/nimble/nimble/host/mesh/src/app_keys.c @@ -5,7 +5,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -#include "nimble/porting/nimble/include/syscfg/syscfg.h" +#include "syscfg/syscfg.h" #if MYNEWT_VAL(BLE_MESH) #include diff --git a/src/nimble/nimble/host/mesh/src/beacon.c b/src/nimble/nimble/host/mesh/src/beacon.c index bfe90f68..6ca3e857 100644 --- a/src/nimble/nimble/host/mesh/src/beacon.c +++ b/src/nimble/nimble/host/mesh/src/beacon.c @@ -6,7 +6,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -#include "nimble/porting/nimble/include/syscfg/syscfg.h" +#include "syscfg/syscfg.h" #if MYNEWT_VAL(BLE_MESH) #define MESH_LOG_MODULE BLE_MESH_BEACON_LOG diff --git a/src/nimble/nimble/host/mesh/src/cdb.c b/src/nimble/nimble/host/mesh/src/cdb.c index c7dcaf9b..7407949e 100644 --- a/src/nimble/nimble/host/mesh/src/cdb.c +++ b/src/nimble/nimble/host/mesh/src/cdb.c @@ -4,7 +4,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -#include "nimble/porting/nimble/include/syscfg/syscfg.h" +#include "syscfg/syscfg.h" #if MYNEWT_VAL(BLE_MESH) #define MESH_LOG_MODULE BLE_MESH_LOG diff --git a/src/nimble/nimble/host/mesh/src/cfg.c b/src/nimble/nimble/host/mesh/src/cfg.c index 7214763d..231fcf83 100644 --- a/src/nimble/nimble/host/mesh/src/cfg.c +++ b/src/nimble/nimble/host/mesh/src/cfg.c @@ -4,7 +4,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -#include "nimble/porting/nimble/include/syscfg/syscfg.h" +#include "syscfg/syscfg.h" #if MYNEWT_VAL(BLE_MESH) #include "nimble/nimble/host/mesh/include/mesh/mesh.h" diff --git a/src/nimble/nimble/host/mesh/src/cfg_cli.c b/src/nimble/nimble/host/mesh/src/cfg_cli.c index f7590e20..0c83a19a 100644 --- a/src/nimble/nimble/host/mesh/src/cfg_cli.c +++ b/src/nimble/nimble/host/mesh/src/cfg_cli.c @@ -6,7 +6,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -#include "nimble/porting/nimble/include/syscfg/syscfg.h" +#include "syscfg/syscfg.h" #define MESH_LOG_MODULE BLE_MESH_MODEL_LOG #if MYNEWT_VAL(BLE_MESH_CFG_CLI) diff --git a/src/nimble/nimble/host/mesh/src/cfg_srv.c b/src/nimble/nimble/host/mesh/src/cfg_srv.c index 0b6395dc..4df78328 100644 --- a/src/nimble/nimble/host/mesh/src/cfg_srv.c +++ b/src/nimble/nimble/host/mesh/src/cfg_srv.c @@ -6,7 +6,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -#include "nimble/porting/nimble/include/syscfg/syscfg.h" +#include "syscfg/syscfg.h" #if MYNEWT_VAL(BLE_MESH) #define MESH_LOG_MODULE BLE_MESH_MODEL_LOG diff --git a/src/nimble/nimble/host/mesh/src/crypto.c b/src/nimble/nimble/host/mesh/src/crypto.c index f3c80cc3..18f9b123 100644 --- a/src/nimble/nimble/host/mesh/src/crypto.c +++ b/src/nimble/nimble/host/mesh/src/crypto.c @@ -6,7 +6,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -#include "nimble/porting/nimble/include/syscfg/syscfg.h" +#include "syscfg/syscfg.h" #if MYNEWT_VAL(BLE_MESH) #define MESH_LOG_MODULE BLE_MESH_CRYPTO_LOG @@ -14,7 +14,7 @@ #include #include #include -#include "nimble/porting/nimble/include/syscfg/syscfg.h" +#include "syscfg/syscfg.h" #if (MYNEWT_VAL(BLE_CRYPTO_STACK_MBEDTLS)) #include "nimble/ext/tinycrypt/include/tinycrypt/aes.h" diff --git a/src/nimble/nimble/host/mesh/src/friend.c b/src/nimble/nimble/host/mesh/src/friend.c index 694c3c33..a0fad5a3 100644 --- a/src/nimble/nimble/host/mesh/src/friend.c +++ b/src/nimble/nimble/host/mesh/src/friend.c @@ -6,7 +6,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -#include "nimble/porting/nimble/include/syscfg/syscfg.h" +#include "syscfg/syscfg.h" #define MESH_LOG_MODULE BLE_MESH_FRIEND_LOG #if MYNEWT_VAL(BLE_MESH_FRIEND) @@ -1686,9 +1686,9 @@ void bt_mesh_friend_enqueue_rx(struct bt_mesh_net_rx *rx, continue; } - if (friend_lpn_matches(frnd, rx->sub->net_idx, - rx->ctx.addr)) { - continue; + if (friend_lpn_matches(frnd, rx->sub->net_idx, + rx->ctx.addr)) { + continue; } if (friend_lpn_matches(frnd, rx->sub->net_idx, diff --git a/src/nimble/nimble/host/mesh/src/glue.c b/src/nimble/nimble/host/mesh/src/glue.c index 8caeafeb..97dfcf4d 100644 --- a/src/nimble/nimble/host/mesh/src/glue.c +++ b/src/nimble/nimble/host/mesh/src/glue.c @@ -17,7 +17,7 @@ * under the License. */ -#include "nimble/porting/nimble/include/syscfg/syscfg.h" +#include "syscfg/syscfg.h" #if MYNEWT_VAL(BLE_MESH) #define MESH_LOG_MODULE BLE_MESH_LOG diff --git a/src/nimble/nimble/host/mesh/src/health_cli.c b/src/nimble/nimble/host/mesh/src/health_cli.c index 52735605..839f11a3 100644 --- a/src/nimble/nimble/host/mesh/src/health_cli.c +++ b/src/nimble/nimble/host/mesh/src/health_cli.c @@ -6,7 +6,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -#include "nimble/porting/nimble/include/syscfg/syscfg.h" +#include "syscfg/syscfg.h" #if MYNEWT_VAL(BLE_MESH) #define MESH_LOG_MODULE BLE_MESH_MODEL_LOG diff --git a/src/nimble/nimble/host/mesh/src/health_srv.c b/src/nimble/nimble/host/mesh/src/health_srv.c index 6939b36a..42a862cb 100644 --- a/src/nimble/nimble/host/mesh/src/health_srv.c +++ b/src/nimble/nimble/host/mesh/src/health_srv.c @@ -6,7 +6,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -#include "nimble/porting/nimble/include/syscfg/syscfg.h" +#include "syscfg/syscfg.h" #if MYNEWT_VAL(BLE_MESH) #define MESH_LOG_MODULE BLE_MESH_MODEL_LOG diff --git a/src/nimble/nimble/host/mesh/src/heartbeat.c b/src/nimble/nimble/host/mesh/src/heartbeat.c index d617a034..21bb1433 100644 --- a/src/nimble/nimble/host/mesh/src/heartbeat.c +++ b/src/nimble/nimble/host/mesh/src/heartbeat.c @@ -4,7 +4,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -#include "nimble/porting/nimble/include/syscfg/syscfg.h" +#include "syscfg/syscfg.h" #if MYNEWT_VAL(BLE_MESH) #define MESH_LOG_MODULE BLE_MESH_HEARTBEAT_LOG diff --git a/src/nimble/nimble/host/mesh/src/light_model.c b/src/nimble/nimble/host/mesh/src/light_model.c index 7cb08300..070bbfad 100644 --- a/src/nimble/nimble/host/mesh/src/light_model.c +++ b/src/nimble/nimble/host/mesh/src/light_model.c @@ -4,7 +4,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -#include "nimble/porting/nimble/include/syscfg/syscfg.h" +#include "syscfg/syscfg.h" #if MYNEWT_VAL(BLE_MESH) #include "nimble/nimble/host/mesh/include/mesh/mesh.h" diff --git a/src/nimble/nimble/host/mesh/src/light_model.h b/src/nimble/nimble/host/mesh/src/light_model.h index 162b9b14..859ef3ba 100644 --- a/src/nimble/nimble/host/mesh/src/light_model.h +++ b/src/nimble/nimble/host/mesh/src/light_model.h @@ -6,7 +6,7 @@ #ifndef __BT_MESH_LIGHT_MODEL_H #define __BT_MESH_LIGHT_MODEL_H -#include "nimble/porting/nimble/include/syscfg/syscfg.h" +#include "syscfg/syscfg.h" #include "nimble/nimble/host/mesh/include/mesh/mesh.h" int light_model_gen_onoff_get(struct bt_mesh_model *model, uint8_t *state); diff --git a/src/nimble/nimble/host/mesh/src/lpn.c b/src/nimble/nimble/host/mesh/src/lpn.c index ea0276ff..dab9e1bf 100644 --- a/src/nimble/nimble/host/mesh/src/lpn.c +++ b/src/nimble/nimble/host/mesh/src/lpn.c @@ -6,7 +6,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -#include "nimble/porting/nimble/include/syscfg/syscfg.h" +#include "syscfg/syscfg.h" #define MESH_LOG_MODULE BLE_MESH_LOW_POWER_LOG #if MYNEWT_VAL(BLE_MESH_LOW_POWER) @@ -745,7 +745,7 @@ static bool sub_update(uint8_t op) req.xact = lpn->xact_next++; - if (bt_mesh_ctl_send(&tx, op, &req, 1 + g * 2, + if (bt_mesh_ctl_send(&tx, op, &req, 1 + g * 2, &req_sent_cb, NULL) < 0) { group_zero(lpn->pending); return false; diff --git a/src/nimble/nimble/host/mesh/src/mesh.c b/src/nimble/nimble/host/mesh/src/mesh.c index 3a25fbde..305e1fdb 100644 --- a/src/nimble/nimble/host/mesh/src/mesh.c +++ b/src/nimble/nimble/host/mesh/src/mesh.c @@ -6,7 +6,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -#include "nimble/porting/nimble/include/syscfg/syscfg.h" +#include "syscfg/syscfg.h" #if MYNEWT_VAL(BLE_MESH) #define MESH_LOG_MODULE BLE_MESH_LOG diff --git a/src/nimble/nimble/host/mesh/src/model_cli.c b/src/nimble/nimble/host/mesh/src/model_cli.c index e3fcd4f7..347e898a 100644 --- a/src/nimble/nimble/host/mesh/src/model_cli.c +++ b/src/nimble/nimble/host/mesh/src/model_cli.c @@ -4,7 +4,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -#include "nimble/porting/nimble/include/syscfg/syscfg.h" +#include "syscfg/syscfg.h" #if MYNEWT_VAL(BLE_MESH) #define MESH_LOG_MODULE BLE_MESH_MODEL_LOG diff --git a/src/nimble/nimble/host/mesh/src/model_srv.c b/src/nimble/nimble/host/mesh/src/model_srv.c index b994fd78..a299919b 100644 --- a/src/nimble/nimble/host/mesh/src/model_srv.c +++ b/src/nimble/nimble/host/mesh/src/model_srv.c @@ -4,7 +4,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -#include "nimble/porting/nimble/include/syscfg/syscfg.h" +#include "syscfg/syscfg.h" #if MYNEWT_VAL(BLE_MESH) #define MESH_LOG_MODULE BLE_MESH_MODEL_LOG diff --git a/src/nimble/nimble/host/mesh/src/msg.c b/src/nimble/nimble/host/mesh/src/msg.c index 05aad15c..80753ac8 100644 --- a/src/nimble/nimble/host/mesh/src/msg.c +++ b/src/nimble/nimble/host/mesh/src/msg.c @@ -6,7 +6,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -#include "nimble/porting/nimble/include/syscfg/syscfg.h" +#include "syscfg/syscfg.h" #if MYNEWT_VAL(BLE_MESH) #include "nimble/nimble/host/mesh/include/mesh/mesh.h" diff --git a/src/nimble/nimble/host/mesh/src/net.c b/src/nimble/nimble/host/mesh/src/net.c index bd83cf03..f9dd1fc8 100644 --- a/src/nimble/nimble/host/mesh/src/net.c +++ b/src/nimble/nimble/host/mesh/src/net.c @@ -6,7 +6,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -#include "nimble/porting/nimble/include/syscfg/syscfg.h" +#include "syscfg/syscfg.h" #if MYNEWT_VAL(BLE_MESH) #define MESH_LOG_MODULE BLE_MESH_NET_LOG diff --git a/src/nimble/nimble/host/mesh/src/pb_adv.c b/src/nimble/nimble/host/mesh/src/pb_adv.c index 12cd871d..8b7833e3 100644 --- a/src/nimble/nimble/host/mesh/src/pb_adv.c +++ b/src/nimble/nimble/host/mesh/src/pb_adv.c @@ -7,7 +7,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -#include "nimble/porting/nimble/include/syscfg/syscfg.h" +#include "syscfg/syscfg.h" #if MYNEWT_VAL(BLE_MESH) #define MESH_LOG_MODULE BLE_MESH_PROV_LOG diff --git a/src/nimble/nimble/host/mesh/src/pb_gatt.c b/src/nimble/nimble/host/mesh/src/pb_gatt.c index 0d0a5db7..78ad968c 100644 --- a/src/nimble/nimble/host/mesh/src/pb_gatt.c +++ b/src/nimble/nimble/host/mesh/src/pb_gatt.c @@ -14,7 +14,7 @@ #include "net.h" #include "proxy.h" #include "adv.h" -#include "nimble/porting/nimble/include/syscfg/syscfg.h" +#include "syscfg/syscfg.h" #include "pb_gatt_srv.h" #if MYNEWT_VAL(BLE_MESH_PB_GATT) diff --git a/src/nimble/nimble/host/mesh/src/pb_gatt_srv.c b/src/nimble/nimble/host/mesh/src/pb_gatt_srv.c index ab75442c..3d3ee940 100644 --- a/src/nimble/nimble/host/mesh/src/pb_gatt_srv.c +++ b/src/nimble/nimble/host/mesh/src/pb_gatt_srv.c @@ -19,7 +19,7 @@ #include "proxy.h" #include "proxy_msg.h" #include "pb_gatt_srv.h" -#include "nimble/porting/nimble/include/syscfg/syscfg.h" +#include "syscfg/syscfg.h" #include "nimble/nimble/host/services/gatt/include/services/gatt/ble_svc_gatt.h" #include "nimble/nimble/host/src/ble_hs_priv.h" diff --git a/src/nimble/nimble/host/mesh/src/prov.c b/src/nimble/nimble/host/mesh/src/prov.c index 1a1b927f..13abc577 100644 --- a/src/nimble/nimble/host/mesh/src/prov.c +++ b/src/nimble/nimble/host/mesh/src/prov.c @@ -6,7 +6,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -#include "nimble/porting/nimble/include/syscfg/syscfg.h" +#include "syscfg/syscfg.h" #if MYNEWT_VAL(BLE_MESH) #define MESH_LOG_MODULE BLE_MESH_PROV_LOG diff --git a/src/nimble/nimble/host/mesh/src/prov_device.c b/src/nimble/nimble/host/mesh/src/prov_device.c index af806bc9..3bd6b9b9 100644 --- a/src/nimble/nimble/host/mesh/src/prov_device.c +++ b/src/nimble/nimble/host/mesh/src/prov_device.c @@ -7,7 +7,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -#include "nimble/porting/nimble/include/syscfg/syscfg.h" +#include "syscfg/syscfg.h" #if MYNEWT_VAL(BLE_MESH) #define MESH_LOG_MODULE BLE_MESH_PROV_LOG diff --git a/src/nimble/nimble/host/mesh/src/provisioner.c b/src/nimble/nimble/host/mesh/src/provisioner.c index aeab44ec..6572017d 100644 --- a/src/nimble/nimble/host/mesh/src/provisioner.c +++ b/src/nimble/nimble/host/mesh/src/provisioner.c @@ -8,7 +8,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -#include "nimble/porting/nimble/include/syscfg/syscfg.h" +#include "syscfg/syscfg.h" #if MYNEWT_VAL(BLE_MESH) #define MESH_LOG_MODULE BLE_MESH_PROV_LOG diff --git a/src/nimble/nimble/host/mesh/src/proxy.c b/src/nimble/nimble/host/mesh/src/proxy.c index a2784a9c..863c8e5d 100644 --- a/src/nimble/nimble/host/mesh/src/proxy.c +++ b/src/nimble/nimble/host/mesh/src/proxy.c @@ -6,7 +6,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -#include "nimble/porting/nimble/include/syscfg/syscfg.h" +#include "syscfg/syscfg.h" #define MESH_LOG_MODULE BLE_MESH_PROXY_LOG #if MYNEWT_VAL(BLE_MESH_PROXY) @@ -350,9 +350,9 @@ static void proxy_cfg(struct bt_mesh_proxy_client *client) rx.local_match = 1U; - if (bt_mesh_rpl_check(&rx, NULL)) { - BT_WARN("Replay: src 0x%04x dst 0x%04x seq 0x%06x", - rx.ctx.addr, rx.ctx.recv_dst, rx.seq); + if (bt_mesh_rpl_check(&rx, NULL)) { + BT_WARN("Replay: src 0x%04x dst 0x%04x seq 0x%06x", + rx.ctx.addr, rx.ctx.recv_dst, rx.seq); goto done; } @@ -657,7 +657,7 @@ static void proxy_disconnected(uint16_t conn_handle, int reason) { int i; - BT_DBG("conn handle %u reason 0x%02x", conn_handle, reason); + BT_DBG("conn handle %u reason 0x%02x", conn_handle, reason); conn_count--; for (i = 0; i < ARRAY_SIZE(clients); i++) { diff --git a/src/nimble/nimble/host/mesh/src/proxy_msg.c b/src/nimble/nimble/host/mesh/src/proxy_msg.c index bf9a6f1e..5df9aa31 100644 --- a/src/nimble/nimble/host/mesh/src/proxy_msg.c +++ b/src/nimble/nimble/host/mesh/src/proxy_msg.c @@ -7,7 +7,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -#include "nimble/porting/nimble/include/syscfg/syscfg.h" +#include "syscfg/syscfg.h" #define MESH_LOG_MODULE BLE_MESH_PROXY_LOG #if MYNEWT_VAL(BLE_MESH_PROXY) diff --git a/src/nimble/nimble/host/mesh/src/proxy_srv.c b/src/nimble/nimble/host/mesh/src/proxy_srv.c index e18e4423..1b378896 100644 --- a/src/nimble/nimble/host/mesh/src/proxy_srv.c +++ b/src/nimble/nimble/host/mesh/src/proxy_srv.c @@ -7,7 +7,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -#include "nimble/porting/nimble/include/syscfg/syscfg.h" +#include "syscfg/syscfg.h" #if MYNEWT_VAL(BLE_MESH) #define MESH_LOG_MODULE BLE_MESH_PROXY_LOG diff --git a/src/nimble/nimble/host/mesh/src/rpl.c b/src/nimble/nimble/host/mesh/src/rpl.c index 55dca18e..86ae6bd3 100644 --- a/src/nimble/nimble/host/mesh/src/rpl.c +++ b/src/nimble/nimble/host/mesh/src/rpl.c @@ -7,7 +7,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -#include "nimble/porting/nimble/include/syscfg/syscfg.h" +#include "syscfg/syscfg.h" #if MYNEWT_VAL(BLE_MESH) #define MESH_LOG_MODULE BLE_MESH_RPL_LOG diff --git a/src/nimble/nimble/host/mesh/src/settings.c b/src/nimble/nimble/host/mesh/src/settings.c index 2cb3dec1..e0136be1 100644 --- a/src/nimble/nimble/host/mesh/src/settings.c +++ b/src/nimble/nimble/host/mesh/src/settings.c @@ -4,7 +4,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -#include "nimble/porting/nimble/include/syscfg/syscfg.h" +#include "syscfg/syscfg.h" #define MESH_LOG_MODULE BLE_MESH_SETTINGS_LOG #if MYNEWT_VAL(BLE_MESH_SETTINGS) diff --git a/src/nimble/nimble/host/mesh/src/shell.c b/src/nimble/nimble/host/mesh/src/shell.c index 789d4a45..0e35d0ac 100644 --- a/src/nimble/nimble/host/mesh/src/shell.c +++ b/src/nimble/nimble/host/mesh/src/shell.c @@ -9,7 +9,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -#include "nimble/porting/nimble/include/syscfg/syscfg.h" +#include "syscfg/syscfg.h" #if MYNEWT_VAL(BLE_MESH_SHELL) diff --git a/src/nimble/nimble/host/mesh/src/subnet.c b/src/nimble/nimble/host/mesh/src/subnet.c index 3c28dc5e..7cb3bcd4 100644 --- a/src/nimble/nimble/host/mesh/src/subnet.c +++ b/src/nimble/nimble/host/mesh/src/subnet.c @@ -5,7 +5,7 @@ * SPDX-License-Identifier: Apache-2.0 */ #include -#include "nimble/porting/nimble/include/syscfg/syscfg.h" +#include "syscfg/syscfg.h" #if MYNEWT_VAL(BLE_MESH) #define MESH_LOG_MODULE BLE_MESH_NET_KEYS_LOG diff --git a/src/nimble/nimble/host/mesh/src/testing.c b/src/nimble/nimble/host/mesh/src/testing.c index 7ae6e09c..3ea20507 100644 --- a/src/nimble/nimble/host/mesh/src/testing.c +++ b/src/nimble/nimble/host/mesh/src/testing.c @@ -4,7 +4,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -#include "nimble/porting/nimble/include/syscfg/syscfg.h" +#include "syscfg/syscfg.h" #if MYNEWT_VAL(BLE_MESH) #include diff --git a/src/nimble/nimble/host/mesh/src/transport.c b/src/nimble/nimble/host/mesh/src/transport.c index fe626fd4..26bcfbe1 100644 --- a/src/nimble/nimble/host/mesh/src/transport.c +++ b/src/nimble/nimble/host/mesh/src/transport.c @@ -6,7 +6,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -#include "nimble/porting/nimble/include/syscfg/syscfg.h" +#include "syscfg/syscfg.h" #if MYNEWT_VAL(BLE_MESH) #define MESH_LOG_MODULE BLE_MESH_TRANS_LOG diff --git a/src/nimble/nimble/host/mesh/src/transport.h b/src/nimble/nimble/host/mesh/src/transport.h index e85d0e4e..72973da8 100644 --- a/src/nimble/nimble/host/mesh/src/transport.h +++ b/src/nimble/nimble/host/mesh/src/transport.h @@ -6,7 +6,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -#include "nimble/porting/nimble/include/syscfg/syscfg.h" +#include "syscfg/syscfg.h" #include "nimble/nimble/host/mesh/include/mesh/mesh.h" #define TRANS_SEQ_AUTH_NVAL 0xffffffffffffffff diff --git a/src/nimble/nimble/host/services/gap/include/services/gap/ble_svc_gap.h b/src/nimble/nimble/host/services/gap/include/services/gap/ble_svc_gap.h index 16628ef9..91dd6589 100644 --- a/src/nimble/nimble/host/services/gap/include/services/gap/ble_svc_gap.h +++ b/src/nimble/nimble/host/services/gap/include/services/gap/ble_svc_gap.h @@ -20,7 +20,7 @@ #ifndef H_BLE_SVC_GAP_ #define H_BLE_SVC_GAP_ -#include "nimble/porting/nimble/include/syscfg/syscfg.h" +#include "syscfg/syscfg.h" #include #if MYNEWT_VAL(ENC_ADV_DATA) #include "nimble/nimble/host/include/host/ble_ead.h" diff --git a/src/nimble/nimble/host/services/gatt/include/services/gatt/ble_svc_gatt.h b/src/nimble/nimble/host/services/gatt/include/services/gatt/ble_svc_gatt.h index 7db837a3..ea78fa61 100644 --- a/src/nimble/nimble/host/services/gatt/include/services/gatt/ble_svc_gatt.h +++ b/src/nimble/nimble/host/services/gatt/include/services/gatt/ble_svc_gatt.h @@ -21,7 +21,7 @@ #define H_BLE_SVC_GATT_ #include -#include "nimble/porting/nimble/include/syscfg/syscfg.h" +#include "syscfg/syscfg.h" #ifdef __cplusplus extern "C" { diff --git a/src/nimble/nimble/host/src/ble_att_priv.h b/src/nimble/nimble/host/src/ble_att_priv.h index e2b741ec..9703f674 100644 --- a/src/nimble/nimble/host/src/ble_att_priv.h +++ b/src/nimble/nimble/host/src/ble_att_priv.h @@ -25,7 +25,7 @@ #include "nimble/nimble/host/include/host/ble_att.h" #include "nimble/nimble/host/include/host/ble_uuid.h" #include "nimble/nimble/include/nimble/nimble_npl.h" -#include "nimble/porting/nimble/include/syscfg/syscfg.h" +#include "syscfg/syscfg.h" #ifdef __cplusplus extern "C" { diff --git a/src/nimble/nimble/host/src/ble_eatt.c b/src/nimble/nimble/host/src/ble_eatt.c index f006aec5..8b188738 100644 --- a/src/nimble/nimble/host/src/ble_eatt.c +++ b/src/nimble/nimble/host/src/ble_eatt.c @@ -17,7 +17,7 @@ * under the License. */ -#include "nimble/porting/nimble/include/syscfg/syscfg.h" +#include "syscfg/syscfg.h" #if MYNEWT_VAL(BLE_EATT_CHAN_NUM) > 0 @@ -518,7 +518,7 @@ ble_eatt_tx(uint16_t conn_handle, uint16_t cid, struct os_mbuf *txom) goto error; } - ble_att_truncate_to_mtu(eatt->chan, txom); + ble_att_truncate_to_mtu(eatt->chan, txom); rc = ble_l2cap_send(eatt->chan, txom); if (rc == 0) { goto done; diff --git a/src/nimble/nimble/host/src/ble_eatt_priv.h b/src/nimble/nimble/host/src/ble_eatt_priv.h index fa7efe42..88237a82 100644 --- a/src/nimble/nimble/host/src/ble_eatt_priv.h +++ b/src/nimble/nimble/host/src/ble_eatt_priv.h @@ -17,7 +17,7 @@ * under the License. */ -#include "nimble/porting/nimble/include/syscfg/syscfg.h" +#include "syscfg/syscfg.h" #include "nimble/porting/nimble/include/os/os_mbuf.h" #include "nimble/nimble/host/include/host/ble_l2cap.h" diff --git a/src/nimble/nimble/host/src/ble_gap_priv.h b/src/nimble/nimble/host/src/ble_gap_priv.h index 7a86bfb2..0f2facbf 100644 --- a/src/nimble/nimble/host/src/ble_gap_priv.h +++ b/src/nimble/nimble/host/src/ble_gap_priv.h @@ -21,7 +21,7 @@ #define H_BLE_GAP_CONN_ #include -#include "nimble/porting/nimble/include/syscfg/syscfg.h" +#include "syscfg/syscfg.h" #include "nimble/porting/nimble/include/stats/stats.h" #include "nimble/nimble/host/include/host/ble_gap.h" #ifdef __cplusplus diff --git a/src/nimble/nimble/host/src/ble_gatt_priv.h b/src/nimble/nimble/host/src/ble_gatt_priv.h index 0488d8aa..537d9de2 100644 --- a/src/nimble/nimble/host/src/ble_gatt_priv.h +++ b/src/nimble/nimble/host/src/ble_gatt_priv.h @@ -20,7 +20,7 @@ #ifndef H_BLE_GATT_PRIV_ #define H_BLE_GATT_PRIV_ -#include "nimble/porting/nimble/include/syscfg/syscfg.h" +#include "syscfg/syscfg.h" #include "nimble/porting/nimble/include/stats/stats.h" #include "nimble/nimble/host/include/host/ble_gatt.h" #ifdef __cplusplus diff --git a/src/nimble/nimble/host/src/ble_hs.c b/src/nimble/nimble/host/src/ble_hs.c index 8327e9ac..6c7945b0 100644 --- a/src/nimble/nimble/host/src/ble_hs.c +++ b/src/nimble/nimble/host/src/ble_hs.c @@ -21,7 +21,7 @@ #include #include #include "nimble/porting/nimble/include/sysinit/sysinit.h" -#include "nimble/porting/nimble/include/syscfg/syscfg.h" +#include "syscfg/syscfg.h" #include "nimble/porting/nimble/include/stats/stats.h" #include "nimble/nimble/host/include/host/ble_hs.h" #include "ble_hs_priv.h" diff --git a/src/nimble/nimble/host/src/ble_hs_cfg.c b/src/nimble/nimble/host/src/ble_hs_cfg.c index 51a5d28b..2172db06 100644 --- a/src/nimble/nimble/host/src/ble_hs_cfg.c +++ b/src/nimble/nimble/host/src/ble_hs_cfg.c @@ -17,7 +17,7 @@ * under the License. */ -#include "nimble/porting/nimble/include/syscfg/syscfg.h" +#include "syscfg/syscfg.h" #include "nimble/nimble/host/include/host/ble_hs.h" struct ble_hs_cfg ble_hs_cfg = { diff --git a/src/nimble/nimble/host/src/ble_hs_conn.c b/src/nimble/nimble/host/src/ble_hs_conn.c index 813ce4ca..9c7197cd 100644 --- a/src/nimble/nimble/host/src/ble_hs_conn.c +++ b/src/nimble/nimble/host/src/ble_hs_conn.c @@ -19,7 +19,7 @@ #include #include -#include "nimble/porting/nimble/include/syscfg/syscfg.h" +#include "syscfg/syscfg.h" #include "nimble/porting/nimble/include/os/os.h" #include "nimble/nimble/host/include/host/ble_hs_id.h" #include "ble_hs_priv.h" diff --git a/src/nimble/nimble/host/src/ble_hs_flow.c b/src/nimble/nimble/host/src/ble_hs_flow.c index cda570ad..1ebd05dc 100644 --- a/src/nimble/nimble/host/src/ble_hs_flow.c +++ b/src/nimble/nimble/host/src/ble_hs_flow.c @@ -17,7 +17,7 @@ * under the License. */ -#include "nimble/porting/nimble/include/syscfg/syscfg.h" +#include "syscfg/syscfg.h" #include "ble_hs_priv.h" #if MYNEWT_VAL(BLE_HS_FLOW_CTRL) @@ -237,7 +237,7 @@ ble_hs_flow_startup(void) /* Remove previous event from queue, if any*/ ble_npl_eventq_remove(ble_hs_evq_get(), &ble_hs_flow_ev); - + #if MYNEWT_VAL(SELFTEST) ble_npl_callout_stop(&ble_hs_flow_timer); diff --git a/src/nimble/nimble/host/src/ble_hs_periodic_sync.c b/src/nimble/nimble/host/src/ble_hs_periodic_sync.c index 309f0d93..ee94833f 100644 --- a/src/nimble/nimble/host/src/ble_hs_periodic_sync.c +++ b/src/nimble/nimble/host/src/ble_hs_periodic_sync.c @@ -19,7 +19,7 @@ #include #include -#include "nimble/porting/nimble/include/syscfg/syscfg.h" +#include "syscfg/syscfg.h" #include "nimble/porting/nimble/include/os/os.h" #include "nimble/nimble/host/include/host/ble_hs_id.h" #include "ble_hs_priv.h" diff --git a/src/nimble/nimble/host/src/ble_hs_resolv.c b/src/nimble/nimble/host/src/ble_hs_resolv.c index 7dd09d89..c1c255e7 100644 --- a/src/nimble/nimble/host/src/ble_hs_resolv.c +++ b/src/nimble/nimble/host/src/ble_hs_resolv.c @@ -19,7 +19,7 @@ * under the License. */ -#include "nimble/porting/nimble/include/syscfg/syscfg.h" +#include "syscfg/syscfg.h" #if MYNEWT_VAL(BLE_HOST_BASED_PRIVACY) #include diff --git a/src/nimble/nimble/host/src/ble_hs_stop.c b/src/nimble/nimble/host/src/ble_hs_stop.c index 6f2c8871..d62d4f22 100644 --- a/src/nimble/nimble/host/src/ble_hs_stop.c +++ b/src/nimble/nimble/host/src/ble_hs_stop.c @@ -19,7 +19,7 @@ #include #include "nimble/porting/nimble/include/sysinit/sysinit.h" -#include "nimble/porting/nimble/include/syscfg/syscfg.h" +#include "syscfg/syscfg.h" #include "ble_hs_priv.h" #include "nimble/nimble/host/include/host/ble_hs_stop.h" #include "nimble/nimble/include/nimble/nimble_npl.h" diff --git a/src/nimble/nimble/host/src/ble_l2cap.c b/src/nimble/nimble/host/src/ble_l2cap.c index ca062d24..bf6067f3 100644 --- a/src/nimble/nimble/host/src/ble_l2cap.c +++ b/src/nimble/nimble/host/src/ble_l2cap.c @@ -19,7 +19,7 @@ #include #include -#include "nimble/porting/nimble/include/syscfg/syscfg.h" +#include "syscfg/syscfg.h" #include "nimble/porting/nimble/include/os/os.h" #include "nimble/nimble/host/include/host/ble_l2cap.h" #include "nimble/nimble/include/nimble/ble.h" diff --git a/src/nimble/nimble/host/src/ble_l2cap_coc_priv.h b/src/nimble/nimble/host/src/ble_l2cap_coc_priv.h index 719003e3..c2b53229 100644 --- a/src/nimble/nimble/host/src/ble_l2cap_coc_priv.h +++ b/src/nimble/nimble/host/src/ble_l2cap_coc_priv.h @@ -21,7 +21,7 @@ #define H_L2CAP_COC_PRIV_ #include -#include "nimble/porting/nimble/include/syscfg/syscfg.h" +#include "syscfg/syscfg.h" #include "nimble/porting/nimble/include/os/queue.h" #include "nimble/porting/nimble/include/os/os_mbuf.h" #include "nimble/nimble/host/include/host/ble_l2cap.h" diff --git a/src/nimble/nimble/host/src/ble_l2cap_sig_priv.h b/src/nimble/nimble/host/src/ble_l2cap_sig_priv.h index 6b8addfd..b997ce35 100644 --- a/src/nimble/nimble/host/src/ble_l2cap_sig_priv.h +++ b/src/nimble/nimble/host/src/ble_l2cap_sig_priv.h @@ -20,7 +20,7 @@ #ifndef H_BLE_L2CAP_SIG_ #define H_BLE_L2CAP_SIG_ -#include "nimble/porting/nimble/include/syscfg/syscfg.h" +#include "syscfg/syscfg.h" #ifdef __cplusplus extern "C" { diff --git a/src/nimble/nimble/host/src/ble_sm_alg.c b/src/nimble/nimble/host/src/ble_sm_alg.c index ef4d58a2..74eec4a9 100644 --- a/src/nimble/nimble/host/src/ble_sm_alg.c +++ b/src/nimble/nimble/host/src/ble_sm_alg.c @@ -20,7 +20,7 @@ #include #include -#include "nimble/porting/nimble/include/syscfg/syscfg.h" +#include "syscfg/syscfg.h" #include "nimble/nimble/include/nimble/nimble_opt.h" #if NIMBLE_BLE_CONNECT diff --git a/src/nimble/nimble/host/src/ble_sm_priv.h b/src/nimble/nimble/host/src/ble_sm_priv.h index 1b238184..67655c58 100644 --- a/src/nimble/nimble/host/src/ble_sm_priv.h +++ b/src/nimble/nimble/host/src/ble_sm_priv.h @@ -21,7 +21,7 @@ #define H_BLE_SM_PRIV_ #include -#include "nimble/porting/nimble/include/syscfg/syscfg.h" +#include "syscfg/syscfg.h" #include "nimble/porting/nimble/include/os/queue.h" #include "nimble/nimble/include/nimble/nimble_opt.h" #if MYNEWT_VAL(ENC_ADV_DATA) diff --git a/src/nimble/nimble/host/store/config/src/ble_store_config.c b/src/nimble/nimble/host/store/config/src/ble_store_config.c index 5f65dbc6..4b689fbb 100644 --- a/src/nimble/nimble/host/store/config/src/ble_store_config.c +++ b/src/nimble/nimble/host/store/config/src/ble_store_config.c @@ -22,7 +22,7 @@ #include #include "nimble/porting/nimble/include/sysinit/sysinit.h" -#include "nimble/porting/nimble/include/syscfg/syscfg.h" +#include "syscfg/syscfg.h" #include "nimble/nimble/host/include/host/ble_hs.h" #include "nimble/nimble/host/store/config/include/store/config/ble_store_config.h" #include "ble_store_config_priv.h" diff --git a/src/nimble/nimble/host/store/config/src/ble_store_config_conf.c b/src/nimble/nimble/host/store/config/src/ble_store_config_conf.c index c6ad62b8..db3fba44 100644 --- a/src/nimble/nimble/host/store/config/src/ble_store_config_conf.c +++ b/src/nimble/nimble/host/store/config/src/ble_store_config_conf.c @@ -19,7 +19,7 @@ #ifndef ESP_PLATFORM -#include "nimble/porting/nimble/include/syscfg/syscfg.h" +#include "syscfg/syscfg.h" #if MYNEWT_VAL(BLE_STORE_CONFIG_PERSIST) diff --git a/src/nimble/nimble/host/store/config/src/ble_store_nvs.c b/src/nimble/nimble/host/store/config/src/ble_store_nvs.c index 0abe4bc4..9829b352 100644 --- a/src/nimble/nimble/host/store/config/src/ble_store_nvs.c +++ b/src/nimble/nimble/host/store/config/src/ble_store_nvs.c @@ -21,7 +21,7 @@ #ifdef ESP_PLATFORM -#include "nimble/porting/nimble/include/syscfg/syscfg.h" +#include "syscfg/syscfg.h" #if MYNEWT_VAL(BLE_STORE_CONFIG_PERSIST) diff --git a/src/nimble/nimble/host/store/ram/src/ble_store_ram.c b/src/nimble/nimble/host/store/ram/src/ble_store_ram.c index d0fbc3fe..5ab00dc2 100644 --- a/src/nimble/nimble/host/store/ram/src/ble_store_ram.c +++ b/src/nimble/nimble/host/store/ram/src/ble_store_ram.c @@ -32,7 +32,7 @@ #include #include "nimble/porting/nimble/include/sysinit/sysinit.h" -#include "nimble/porting/nimble/include/syscfg/syscfg.h" +#include "syscfg/syscfg.h" #include "nimble/nimble/host/include/host/ble_hs.h" #include "nimble/nimble/host/store/ram/include/store/ram/ble_store_ram.h" diff --git a/src/nimble/nimble/include/nimble/ble.h b/src/nimble/nimble/include/nimble/ble.h index 3de02a7b..95731251 100644 --- a/src/nimble/nimble/include/nimble/ble.h +++ b/src/nimble/nimble/include/nimble/ble.h @@ -22,7 +22,7 @@ #include #include -#include "nimble/porting/nimble/include/syscfg/syscfg.h" +#include "syscfg/syscfg.h" #include "nimble/porting/nimble/include/os/os.h" #ifdef __cplusplus diff --git a/src/nimble/nimble/include/nimble/nimble_opt_auto.h b/src/nimble/nimble/include/nimble/nimble_opt_auto.h index 803575ed..8b3fde02 100644 --- a/src/nimble/nimble/include/nimble/nimble_opt_auto.h +++ b/src/nimble/nimble/include/nimble/nimble_opt_auto.h @@ -20,7 +20,7 @@ #ifndef H_NIMBLE_OPT_AUTO_ #define H_NIMBLE_OPT_AUTO_ -#include "nimble/porting/nimble/include/syscfg/syscfg.h" +#include "syscfg/syscfg.h" #ifdef __cplusplus extern "C" { diff --git a/src/nimble/nimble/transport/common/hci_h4/src/hci_h4.c b/src/nimble/nimble/transport/common/hci_h4/src/hci_h4.c index 459729b2..07d14c28 100644 --- a/src/nimble/nimble/transport/common/hci_h4/src/hci_h4.c +++ b/src/nimble/nimble/transport/common/hci_h4/src/hci_h4.c @@ -20,7 +20,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/nimble/nimble/transport/common/hci_ipc/src/hci_ipc.c b/src/nimble/nimble/transport/common/hci_ipc/src/hci_ipc.c index 421399c9..9f891dfb 100644 --- a/src/nimble/nimble/transport/common/hci_ipc/src/hci_ipc.c +++ b/src/nimble/nimble/transport/common/hci_ipc/src/hci_ipc.c @@ -20,7 +20,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/nimble/nimble/transport/esp_ipc/src/hci_esp_ipc.c b/src/nimble/nimble/transport/esp_ipc/src/hci_esp_ipc.c index e1eb6ae4..6622b615 100644 --- a/src/nimble/nimble/transport/esp_ipc/src/hci_esp_ipc.c +++ b/src/nimble/nimble/transport/esp_ipc/src/hci_esp_ipc.c @@ -4,7 +4,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -#include +#include #ifdef ESP_PLATFORM #if !defined(CONFIG_IDF_TARGET_ESP32) && !defined(CONFIG_IDF_TARGET_ESP32C3) && !defined(CONFIG_IDF_TARGET_ESP32S3) diff --git a/src/nimble/nimble/transport/esp_ipc_legacy/src/hci_esp_ipc_legacy.c b/src/nimble/nimble/transport/esp_ipc_legacy/src/hci_esp_ipc_legacy.c index 0b0ecd95..d112f1fb 100644 --- a/src/nimble/nimble/transport/esp_ipc_legacy/src/hci_esp_ipc_legacy.c +++ b/src/nimble/nimble/transport/esp_ipc_legacy/src/hci_esp_ipc_legacy.c @@ -3,7 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ -#include +#include #if defined(CONFIG_IDF_TARGET_ESP32) || defined(CONFIG_IDF_TARGET_ESP32C3) || defined(CONFIG_IDF_TARGET_ESP32S3) #include diff --git a/src/nimble/nimble/transport/include/nimble/transport/monitor.h b/src/nimble/nimble/transport/include/nimble/transport/monitor.h index 2bc90fed..dc12c69c 100644 --- a/src/nimble/nimble/transport/include/nimble/transport/monitor.h +++ b/src/nimble/nimble/transport/include/nimble/transport/monitor.h @@ -20,7 +20,7 @@ #ifndef H_BLE_MONITOR_ #define H_BLE_MONITOR_ -#include +#include #ifdef __cplusplus extern "C" { diff --git a/src/nimble/nimble/transport/include/nimble/transport/transport_ipc.h b/src/nimble/nimble/transport/include/nimble/transport/transport_ipc.h index c421420e..8059c3ae 100644 --- a/src/nimble/nimble/transport/include/nimble/transport/transport_ipc.h +++ b/src/nimble/nimble/transport/include/nimble/transport/transport_ipc.h @@ -20,7 +20,7 @@ #ifndef H_NIMBLE_TRANSPORT_IPC_ #define H_NIMBLE_TRANSPORT_IPC_ -#include +#include #ifdef __cplusplus extern "C" { diff --git a/src/nimble/nimble/transport/include/nimble/transport_impl.h b/src/nimble/nimble/transport/include/nimble/transport_impl.h index 26259b18..429760fa 100644 --- a/src/nimble/nimble/transport/include/nimble/transport_impl.h +++ b/src/nimble/nimble/transport/include/nimble/transport_impl.h @@ -25,7 +25,7 @@ extern "C" { #endif #include "nimble/porting/nimble/include/os/os_mempool.h" -#include "nimble/porting/nimble/include/syscfg/syscfg.h" +#include "syscfg/syscfg.h" /* Init functions to be implemented for transport acting as HS/LL side */ extern void ble_transport_ll_init(void); diff --git a/src/nimble/nimble/transport/nrf5340/src/nrf5340_ble_hci.c b/src/nimble/nimble/transport/nrf5340/src/nrf5340_ble_hci.c index 6f2d31ef..425204d3 100644 --- a/src/nimble/nimble/transport/nrf5340/src/nrf5340_ble_hci.c +++ b/src/nimble/nimble/transport/nrf5340/src/nrf5340_ble_hci.c @@ -21,7 +21,7 @@ #include #include -#include +#include #include #include #include diff --git a/src/nimble/nimble/transport/src/transport.c b/src/nimble/nimble/transport/src/transport.c index 4e538591..97f4e41a 100644 --- a/src/nimble/nimble/transport/src/transport.c +++ b/src/nimble/nimble/transport/src/transport.c @@ -18,7 +18,7 @@ */ #include -#include +#include #include #include #include diff --git a/src/nimble/porting/nimble/include/nimble/nimble_port.h b/src/nimble/porting/nimble/include/nimble/nimble_port.h index 6d77f6ea..695b8c8a 100644 --- a/src/nimble/porting/nimble/include/nimble/nimble_port.h +++ b/src/nimble/porting/nimble/include/nimble/nimble_port.h @@ -21,20 +21,14 @@ #define _NIMBLE_PORT_H #include "nimble/nimble/include/nimble/nimble_npl.h" -#include "nimble/porting/nimble/include/syscfg/syscfg.h" +#include "syscfg/syscfg.h" #ifdef ESP_PLATFORM #include "esp_err.h" -#include "nimconfig.h" -#define NIMBLE_CORE (CONFIG_BT_NIMBLE_PINNED_TO_CORE < portNUM_PROCESSORS ? CONFIG_BT_NIMBLE_PINNED_TO_CORE : tskNO_AFFINITY) - -#define NIMBLE_HS_STACK_SIZE CONFIG_BT_NIMBLE_HOST_TASK_STACK_SIZE +#define NIMBLE_CORE (MYNEWT_VAL(NIMBLE_PINNED_TO_CORE) < portNUM_PROCESSORS ? MYNEWT_VAL(NIMBLE_PINNED_TO_CORE) : tskNO_AFFINITY) +#define NIMBLE_HS_STACK_SIZE (MYNEWT_VAL(NIMBLE_HOST_TASK_STACK_SIZE)) #else -#define NIMBLE_HS_STACK_SIZE (CONFIG_BT_NIMBLE_HOST_TASK_STACK_SIZE / 4) -#endif - -#if SOC_ESP_NIMBLE_CONTROLLER && CONFIG_BT_CONTROLLER_ENABLED -#define NIMBLE_LL_STACK_SIZE CONFIG_BT_LE_CONTROLLER_TASK_STACK_SIZE +#define NIMBLE_HS_STACK_SIZE (MYNEWT_VAL(NIMBLE_HOST_TASK_STACK_SIZE) / 4) #endif #ifdef __cplusplus diff --git a/src/nimble/porting/nimble/include/os/os.h b/src/nimble/porting/nimble/include/os/os.h index 34bd8d69..83ec4b07 100644 --- a/src/nimble/porting/nimble/include/os/os.h +++ b/src/nimble/porting/nimble/include/os/os.h @@ -30,7 +30,7 @@ extern "C" { #define static_assert _Static_assert #endif -#include "nimble/porting/nimble/include/syscfg/syscfg.h" +#include "syscfg/syscfg.h" #include "nimble/nimble/include/nimble/nimble_npl.h" #define OS_ALIGN(__n, __a) ( \ diff --git a/src/nimble/porting/nimble/include/os/os_cputime.h b/src/nimble/porting/nimble/include/os/os_cputime.h index de0aad83..e7728d0f 100644 --- a/src/nimble/porting/nimble/include/os/os_cputime.h +++ b/src/nimble/porting/nimble/include/os/os_cputime.h @@ -31,7 +31,7 @@ extern "C" { #endif -#include "nimble/porting/nimble/include/syscfg/syscfg.h" +#include "syscfg/syscfg.h" #include "nimble/porting/nimble/include/hal/hal_timer.h" /* diff --git a/src/nimble/porting/nimble/include/os/os_trace_api.h b/src/nimble/porting/nimble/include/os/os_trace_api.h index 005a098b..163c4dc8 100644 --- a/src/nimble/porting/nimble/include/os/os_trace_api.h +++ b/src/nimble/porting/nimble/include/os/os_trace_api.h @@ -30,7 +30,7 @@ #include #include -#include "nimble/porting/nimble/include/syscfg/syscfg.h" +#include "syscfg/syscfg.h" #if MYNEWT_VAL(OS_SYSVIEW) #include "sysview/vendor/SEGGER_SYSVIEW.h" #endif diff --git a/src/nimble/porting/nimble/src/os_cputime.c b/src/nimble/porting/nimble/src/os_cputime.c index bc8e7a19..231118ee 100644 --- a/src/nimble/porting/nimble/src/os_cputime.c +++ b/src/nimble/porting/nimble/src/os_cputime.c @@ -20,7 +20,7 @@ #include #include #include -#include "nimble/porting/nimble/include/syscfg/syscfg.h" +#include "syscfg/syscfg.h" #include "nimble/porting/nimble/include/os/os_cputime.h" #include "nimble/porting/nimble/include/hal/hal_timer.h" diff --git a/src/nimble/porting/npl/freertos/src/nimble_port_freertos.c b/src/nimble/porting/npl/freertos/src/nimble_port_freertos.c index 6d5be4a2..dd6015e9 100644 --- a/src/nimble/porting/npl/freertos/src/nimble_port_freertos.c +++ b/src/nimble/porting/npl/freertos/src/nimble_port_freertos.c @@ -34,8 +34,8 @@ UBaseType_t nimble_port_freertos_get_hs_hwm(void) { #ifdef ESP_PLATFORM #include "esp_bt.h" -#ifdef CONFIG_BT_NIMBLE_HOST_TASK_PRIORITY -# define NIMBLE_HOST_TASK_PRIORITY (CONFIG_BT_NIMBLE_HOST_TASK_PRIORITY) +#ifdef MYNEWT_VAL_NIMBLE_HOST_TASK_PRIORITY +# define NIMBLE_HOST_TASK_PRIORITY (MYNEWT_VAL(NIMBLE_HOST_TASK_PRIORITY)) #else # define NIMBLE_HOST_TASK_PRIORITY (configMAX_PRIORITIES - 4) #endif @@ -98,8 +98,8 @@ nimble_port_freertos_deinit(void) #else // ESP_PLATFORM #if NIMBLE_CFG_CONTROLLER -# ifdef CONFIG_BT_NIMBLE_LL_TASK_STACK_SIZE -# define NIMBLE_LL_STACK_SIZE (CONFIG_BT_NIMBLE_LL_TASK_STACK_SIZE / 4) +# ifdef MYNEWT_VAL_NIMBLE_CONTROLLER_TASK_STACK_SIZE +# define NIMBLE_LL_STACK_SIZE (MYNEWT_VAL(NIMBLE_CONTROLLER_TASK_STACK_SIZE) / 4) # else # if MYNEWT_VAL(BLE_LL_CFG_FEAT_LL_EXT_ADV) # define NIMBLE_LL_STACK_SIZE (130) @@ -109,8 +109,8 @@ nimble_port_freertos_deinit(void) # endif // configMAX_PRIORITIES - 1 is Tmr builtin task -#ifdef CONFIG_BT_NIMBLE_LL_TASK_PRIORITY -# define NIMBLE_LL_TASK_PRIORITY (CONFIG_BT_NIMBLE_LL_TASK_PRIORITY) +#ifdef MYNEWT_VAL_BLE_LL_TASK_PRIORITY +# define NIMBLE_LL_TASK_PRIORITY MYNEWT_VAL_BLE_LL_TASK_PRIORITY #else # define NIMBLE_LL_TASK_PRIORITY (configMAX_PRIORITIES - 1) #endif @@ -120,8 +120,8 @@ static StaticTask_t ll_task_buffer; static TaskHandle_t ll_task_h; #endif // NIMBLE_CFG_CONTROLLER -#ifdef CONFIG_BT_NIMBLE_HOST_TASK_PRIORITY -# define NIMBLE_HOST_TASK_PRIORITY (CONFIG_BT_NIMBLE_HOST_TASK_PRIORITY) +#ifdef MYNEWT_VAL_NIMBLE_HOST_TASK_PRIORITY +# define NIMBLE_HOST_TASK_PRIORITY (MYNEWT_VAL(NIMBLE_HOST_TASK_PRIORITY)) #else # define NIMBLE_HOST_TASK_PRIORITY (configMAX_PRIORITIES - 2) #endif diff --git a/src/nimconfig.h b/src/nimconfig.h index 8e2fb5ae..cef77912 100644 --- a/src/nimconfig.h +++ b/src/nimconfig.h @@ -1,16 +1,9 @@ - #pragma once +#pragma once #ifdef ESP_PLATFORM #include "sdkconfig.h" #else #include "ext_nimble_config.h" -/* Clear redefinition warnings */ -#undef CONFIG_BT_NIMBLE_ROLE_CENTRAL -#undef CONFIG_BT_NIMBLE_ROLE_PERIPHERAL -#undef CONFIG_BT_NIMBLE_ROLE_BROADCASTER -#undef CONFIG_BT_NIMBLE_ROLE_OBSERVER -#undef CONFIG_BT_ENABLED -#define CONFIG_BT_ENABLED 1 #endif #include "nimconfig_rename.h" @@ -20,117 +13,51 @@ **********************************************/ /** @brief Un-comment to change the number of simultaneous connections (esp controller max is 9) */ -// #define CONFIG_BT_NIMBLE_MAX_CONNECTIONS 3 - -/** @brief Un-comment to enable storing the timestamp when an attribute value is updated\n - * This allows for checking the last update time using getTimeStamp() or getValue(time_t*)\n - * If disabled, the timestamp returned from these functions will be 0.\n - * Disabling timestamps will reduce the memory used for each value.\n - * 1 = Enabled, 0 = Disabled; Default = Disabled - */ -// #define CONFIG_NIMBLE_CPP_ATT_VALUE_TIMESTAMP_ENABLED 0 - -/** @brief Uncomment to set the default allocation size (bytes) for each attribute if\n - * not specified when the constructor is called. This is also the size used when a remote\n - * characteristic or descriptor is constructed before a value is read/notified.\n - * Increasing this will reduce reallocations but increase memory footprint.\n - * Default value is 20. Range: 1 : 512 (BLE_ATT_ATTR_MAX_LEN) - */ -// #define CONFIG_NIMBLE_CPP_ATT_VALUE_INIT_LENGTH 20 - - -/**************************************************** - * Extended advertising settings * - * NOT FOR USE WITH ORIGINAL ESP32 * - ***************************************************/ - -/** @brief Un-comment to enable extended advertising */ -// #define CONFIG_BT_NIMBLE_EXT_ADV 1 - -/** @brief Un-comment to set the max number of extended advertising instances (Range: 0 - 4) */ -// #define CONFIG_BT_NIMBLE_MAX_EXT_ADV_INSTANCES 1 - -/** @brief Un-comment to set the max extended advertising data size (Range: 31 - 1650) */ -// #define CONFIG_BT_NIMBLE_MAX_EXT_ADV_DATA_LEN 251 - -/** @brief Un-comment to enable periodic advertising */ -// #define CONFIG_BT_NIMBLE_ENABLE_PERIODIC_ADV 1 - -/** @brief Un-comment to change the maximum number of periodically synced devices */ -// #define CONFIG_BT_NIMBLE_MAX_PERIODIC_SYNCS 1 - -/**************************************************** - * END Extended advertising settings * - ***************************************************/ - +// #define MYNEWT_VAL_BLE_MAX_CONNECTIONS 3 /** @brief Un-comment to change the default MTU size */ -// #define CONFIG_BT_NIMBLE_ATT_PREFERRED_MTU 255 +// #define MYNEWT_VAL_BLE_ATT_PREFERRED_MTU 517 /** @brief Un-comment to change default device name */ -// #define CONFIG_BT_NIMBLE_SVC_GAP_DEVICE_NAME "nimble" +// #define MYNEWT_VAL_BLE_SVC_GAP_DEVICE_NAME "nimble" /** @brief Un-comment to set the debug log messages level from the NimBLE host stack.\n * Values: 0 = DEBUG, 1 = INFO, 2 = WARNING, 3 = ERROR, 4 = CRITICAL, 5+ = NONE\n * Uses approx. 32kB of flash memory. */ - // #define CONFIG_BT_NIMBLE_LOG_LEVEL 5 - - /** @brief Un-comment to set the debug log messages level from the NimBLE CPP Wrapper.\n - * Values: 0 = NONE, 1 = ERROR, 2 = WARNING, 3 = INFO, 4+ = DEBUG\n - * Uses approx. 32kB of flash memory. - */ - // #define CONFIG_NIMBLE_CPP_LOG_LEVEL 0 - -/** @brief Un-comment to enable the debug asserts in NimBLE CPP wrapper.*/ -// #define CONFIG_NIMBLE_CPP_DEBUG_ASSERT_ENABLED 1 - -/** @brief Un-comment to see NimBLE host return codes as text debug log messages. - * Uses approx. 7kB of flash memory. - */ -// #define CONFIG_NIMBLE_CPP_ENABLE_RETURN_CODE_TEXT - -/** @brief Un-comment to see GAP event codes as text in debug log messages. - * Uses approx. 1kB of flash memory. - */ -// #define CONFIG_NIMBLE_CPP_ENABLE_GAP_EVENT_CODE_TEXT - -/** @brief Un-comment to see advertisement types as text while scanning in debug log messages. - * Uses approx. 250 bytes of flash memory. - */ -// #define CONFIG_NIMBLE_CPP_ENABLE_ADVERTISEMENT_TYPE_TEXT + // #define MYNEWT_VAL_BLE_HS_LOG_LVL 5 /** @brief Un-comment to change the default GAP appearance */ -// #define CONFIG_BT_NIMBLE_SVC_GAP_APPEARANCE 0x0 +// #define MYNEWT_VAL_BLE_SVC_GAP_APPEARANCE 0x0 /** @brief Un-comment if not using NimBLE Client functions \n * Reduces flash size by approx. 7kB. */ -// #define CONFIG_BT_NIMBLE_ROLE_CENTRAL 0 +// #define MYNEWT_VAL_BLE_ROLE_CENTRAL 0 /** @brief Un-comment if not using NimBLE Scan functions \n * Reduces flash size by approx. 26kB. */ -// #define CONFIG_BT_NIMBLE_ROLE_OBSERVER 0 +// #define MYNEWT_VAL_BLE_ROLE_OBSERVER 0 /** @brief Un-comment if not using NimBLE Server functions \n * Reduces flash size by approx. 16kB. */ -// #define CONFIG_BT_NIMBLE_ROLE_PERIPHERAL 0 +// #define MYNEWT_VAL_BLE_ROLE_PERIPHERAL 0 /** @brief Un-comment if not using NimBLE Advertising functions \n * Reduces flash size by approx. 5kB. */ -// #define CONFIG_BT_NIMBLE_ROLE_BROADCASTER 0 +// #define MYNEWT_VAL_BLE_ROLE_BROADCASTER 0 /** @brief Un-comment to change the number of devices allowed to store/bond with */ -// #define CONFIG_BT_NIMBLE_MAX_BONDS 3 +// #define MYNEWT_VAL_BLE_STORE_MAX_BONDS 3 /** @brief Un-comment to change the maximum number of CCCD subscriptions to store */ -// #define CONFIG_BT_NIMBLE_MAX_CCCDS 8 +// #define MYNEWT_VAL_BLE_STORE_MAX_CCCDS 8 /** @brief Un-comment to change the random address refresh time (in seconds) */ -// #define CONFIG_BT_NIMBLE_RPA_TIMEOUT 900 +// #define MYNEWT_VAL_BLE_RPA_TIMEOUT 900 /** * @brief Un-comment to change the number of MSYS buffers available. @@ -138,16 +65,40 @@ * responses MBUFs are allocated out of msys_1 pool. This may need to be increased if\n * you are sending large blocks of data with a low MTU. E.g: 512 bytes with 23 MTU will fail. */ -// #define CONFIG_BT_NIMBLE_MSYS1_BLOCK_COUNT 12 +// #define MYNEWT_VAL_MSYS_1_BLOCK_COUNT 12 /** @brief Un-comment to use external PSRAM for the NimBLE host */ -// #define CONFIG_BT_NIMBLE_MEM_ALLOC_MODE_EXTERNAL 1 +// #define MYNEWT_VAL_NIMBLE_MEM_ALLOC_MODE_EXTERNAL 1 /** @brief Un-comment to change the core NimBLE host runs on */ -// #define CONFIG_BT_NIMBLE_PINNED_TO_CORE 0 +// #define MYNEWT_VAL_NIMBLE_PINNED_TO_CORE 0 /** @brief Un-comment to change the stack size for the NimBLE host task */ -// #define CONFIG_BT_NIMBLE_HOST_TASK_STACK_SIZE 4096 +// #define MYNEWT_VAL_NIMBLE_HOST_TASK_STACK_SIZE 4096 + +/** + * @brief Un-comment to use mbedtls instead of tinycrypt. + * @details This could save approximately 8k of flash if already using mbedtls for other functionality. + */ +// #define MYNEWT_VAL_BLE_CRYPTO_STACK_MBEDTLS 1 + +/**************************************************** + * Extended advertising settings * + * NOT FOR USE WITH ORIGINAL ESP32 * + ***************************************************/ + +/** @brief Un-comment to enable extended advertising */ +// #define MYNEWT_VAL_BLE_EXT_ADV 1 + +/** @brief Un-comment to set the max number of extended advertising instances (Range: 0 - 4) */ +// #define MYNEWT_VAL_BLE_MULTI_ADV_INSTANCES 1 + +/** @brief Un-comment to set the max extended advertising data size (Range: 31 - 1650) */ +// #define MYNEWT_VAL_BLE_EXT_ADV_MAX_SIZE 251 + +/**************************************************** + * END Extended advertising settings * + ***************************************************/ /** * @brief Un-comment to change the bit used to block tasks during BLE operations @@ -166,261 +117,234 @@ */ // #define CONFIG_NIMBLE_CPP_ADDR_FMT_UPPERCASE 1 -/** - * @brief Un-comment to use mbedtls instead of tinycrypt. - * @details This could save approximately 8k of flash if already using mbedtls for other functionality. +/** @brief Un-comment to enable storing the timestamp when an attribute value is updated\n + * This allows for checking the last update time using getTimeStamp() or getValue(time_t*)\n + * If disabled, the timestamp returned from these functions will be 0.\n + * Disabling timestamps will reduce the memory used for each value.\n + * 1 = Enabled, 0 = Disabled; Default = Disabled */ -// #define CONFIG_BT_NIMBLE_CRYPTO_STACK_MBEDTLS 1 +// #define CONFIG_NIMBLE_CPP_ATT_VALUE_TIMESTAMP_ENABLED 0 + +/** @brief Uncomment to set the default allocation size (bytes) for each attribute if\n + * not specified when the constructor is called. This is also the size used when a remote\n + * characteristic or descriptor is constructed before a value is read/notified.\n + * Increasing this will reduce reallocations but increase memory footprint.\n + * Default value is 20. Range: 1 : 512 (BLE_ATT_ATTR_MAX_LEN) + */ +// #define CONFIG_NIMBLE_CPP_ATT_VALUE_INIT_LENGTH 20 + + /** @brief Un-comment to set the debug log messages level from the NimBLE CPP Wrapper.\n + * Values: 0 = NONE, 1 = ERROR, 2 = WARNING, 3 = INFO, 4+ = DEBUG\n + * Uses approx. 32kB of flash memory. + */ + // #define CONFIG_NIMBLE_CPP_LOG_LEVEL 0 + +/** @brief Un-comment to enable the debug asserts in NimBLE CPP wrapper.*/ +// #define CONFIG_NIMBLE_CPP_DEBUG_ASSERT_ENABLED 1 + +/** @brief Un-comment to see NimBLE host return codes as text debug log messages. + * Uses approx. 7kB of flash memory. + */ +// #define CONFIG_NIMBLE_CPP_ENABLE_RETURN_CODE_TEXT + +/** @brief Un-comment to see GAP event codes as text in debug log messages. + * Uses approx. 1kB of flash memory. + */ +// #define CONFIG_NIMBLE_CPP_ENABLE_GAP_EVENT_CODE_TEXT + +/** @brief Un-comment to see advertisement types as text while scanning in debug log messages. + * Uses approx. 250 bytes of flash memory. + */ +// #define CONFIG_NIMBLE_CPP_ENABLE_ADVERTISEMENT_TYPE_TEXT /********************************** End Arduino user-config **********************************/ /* This section should not be altered */ -#ifndef CONFIG_BT_NIMBLE_ROLE_CENTRAL -#ifndef CONFIG_BT_NIMBLE_ROLE_CENTRAL_DISABLED -#define CONFIG_BT_NIMBLE_ROLE_CENTRAL 1 -#else -#define CONFIG_BT_NIMBLE_ROLE_CENTRAL 0 -#endif +#ifndef MYNEWT_VAL_BLE_ROLE_BROADCASTER +#define MYNEWT_VAL_BLE_ROLE_BROADCASTER (1) #endif -#ifndef CONFIG_BT_NIMBLE_ROLE_OBSERVER -#ifndef CONFIG_BT_NIMBLE_ROLE_OBSERVER_DISABLED -#define CONFIG_BT_NIMBLE_ROLE_OBSERVER 1 -#else -#define CONFIG_BT_NIMBLE_ROLE_OBSERVER 0 +#ifndef MYNEWT_VAL_BLE_ROLE_CENTRAL +#define MYNEWT_VAL_BLE_ROLE_CENTRAL (1) #endif + +#ifndef MYNEWT_VAL_BLE_ROLE_OBSERVER +#define MYNEWT_VAL_BLE_ROLE_OBSERVER (1) #endif -#ifndef CONFIG_BT_NIMBLE_ROLE_PERIPHERAL -#ifndef CONFIG_BT_NIMBLE_ROLE_PERIPHERAL_DISABLED -#define CONFIG_BT_NIMBLE_ROLE_PERIPHERAL 1 -#else -#define CONFIG_BT_NIMBLE_ROLE_PERIPHERAL 0 +#ifndef MYNEWT_VAL_BLE_ROLE_PERIPHERAL +#define MYNEWT_VAL_BLE_ROLE_PERIPHERAL (1) #endif + +#ifndef MYNEWT_VAL_NIMBLE_PINNED_TO_CORE +#define MYNEWT_VAL_NIMBLE_PINNED_TO_CORE (0) #endif -#ifndef CONFIG_BT_NIMBLE_ROLE_BROADCASTER -#ifndef CONFIG_BT_NIMBLE_ROLE_BROADCASTER_DISABLED -#define CONFIG_BT_NIMBLE_ROLE_BROADCASTER 1 -#else -#define CONFIG_BT_NIMBLE_ROLE_BROADCASTER 0 +#ifndef MYNEWT_VAL_NIMBLE_HOST_TASK_STACK_SIZE +#define MYNEWT_VAL_NIMBLE_HOST_TASK_STACK_SIZE (4096) #endif + +#ifndef MYNEWT_VAL_NIMBLE_CONTROLLER_TASK_STACK_SIZE +#define MYNEWT_VAL_NIMBLE_CONTROLLER_TASK_STACK_SIZE (4096) #endif -#ifndef CONFIG_BT_NIMBLE_PINNED_TO_CORE -#define CONFIG_BT_NIMBLE_PINNED_TO_CORE 0 +#ifndef MYNEWT_VAL_NIMBLE_MEM_ALLOC_MODE_EXTERNAL +#define MYNEWT_VAL_NIMBLE_MEM_ALLOC_MODE_INTERNAL (1) #endif -#ifndef CONFIG_BT_NIMBLE_HOST_TASK_STACK_SIZE -#define CONFIG_BT_NIMBLE_HOST_TASK_STACK_SIZE 4096 +#ifndef MYNEWT_VAL_BLE_MAX_CONNECTIONS +#define MYNEWT_VAL_BLE_MAX_CONNECTIONS (3) #endif -#ifndef CONFIG_BT_NIMBLE_MEM_ALLOC_MODE_EXTERNAL -#define CONFIG_BT_NIMBLE_MEM_ALLOC_MODE_INTERNAL 1 +#ifndef MYNEWT_VAL_BLE_STORE_MAX_BONDS +#define MYNEWT_VAL_BLE_STORE_MAX_BONDS (3) #endif -#ifndef CONFIG_BT_NIMBLE_MAX_CONNECTIONS -#define CONFIG_BT_NIMBLE_MAX_CONNECTIONS 3 +#ifndef MYNEWT_VAL_BLE_STORE_MAX_CCCDS +#define MYNEWT_VAL_BLE_STORE_MAX_CCCDS (8) #endif -// bugfix: max connections macro renamed upstream -#ifndef CONFIG_NIMBLE_MAX_CONNECTIONS -#define CONFIG_NIMBLE_MAX_CONNECTIONS CONFIG_BT_NIMBLE_MAX_CONNECTIONS +#ifndef MYNEWT_VAL_BLE_ATT_PREFERRED_MTU +#define MYNEWT_VAL_BLE_ATT_PREFERRED_MTU (255) #endif -#ifndef CONFIG_BT_NIMBLE_MAX_BONDS -#define CONFIG_BT_NIMBLE_MAX_BONDS 3 +#ifndef MYNEWT_VAL_BLE_SVC_GAP_APPEARANCE +#define MYNEWT_VAL_BLE_SVC_GAP_APPEARANCE (0x0) #endif -#ifndef CONFIG_BT_NIMBLE_MAX_CCCDS -#define CONFIG_BT_NIMBLE_MAX_CCCDS 8 +#ifndef MYNEWT_VAL_MSYS_1_BLOCK_COUNT +#define MYNEWT_VAL_MSYS_1_BLOCK_COUNT (12) #endif -#ifndef CONFIG_BT_NIMBLE_SVC_GAP_DEVICE_NAME -#define CONFIG_BT_NIMBLE_SVC_GAP_DEVICE_NAME "nimble" +#ifndef MYNEWT_VAL_MSYS_1_BLOCK_SIZE +#define MYNEWT_VAL_MSYS_1_BLOCK_SIZE (256) #endif -#ifndef CONFIG_BT_NIMBLE_ATT_PREFERRED_MTU -#define CONFIG_BT_NIMBLE_ATT_PREFERRED_MTU 255 +#ifndef MYNEWT_VAL_MSYS_2_BLOCK_COUNT +#define MYNEWT_VAL_MSYS_2_BLOCK_COUNT (0) #endif -#ifndef CONFIG_BT_NIMBLE_SVC_GAP_APPEARANCE -#define CONFIG_BT_NIMBLE_SVC_GAP_APPEARANCE 0x0 +#ifndef MYNEWT_VAL_MSYS_2_BLOCK_SIZE +#define MYNEWT_VAL_MSYS_2_BLOCK_SIZE (0) #endif -#ifdef CONFIG_BT_NIMBLE_MSYS1_BLOCK_COUNT // backward compatibility -#define CONFIG_BT_NIMBLE_MSYS_1_BLOCK_COUNT CONFIG_BT_NIMBLE_MSYS1_BLOCK_COUNT -#elif !defined(CONFIG_BT_NIMBLE_MSYS_1_BLOCK_COUNT) -#define CONFIG_BT_NIMBLE_MSYS_1_BLOCK_COUNT 12 +#ifndef MYNEWT_VAL_BLE_TRANSPORT_EVT_DISCARDABLE_COUNT +#define MYNEWT_VAL_BLE_TRANSPORT_EVT_DISCARDABLE_COUNT (16) #endif -#ifndef CONFIG_BT_NIMBLE_MSYS_1_BLOCK_SIZE -#define CONFIG_BT_NIMBLE_MSYS_1_BLOCK_SIZE 256 +#ifndef MYNEWT_VAL_BLE_RPA_TIMEOUT +#define MYNEWT_VAL_BLE_RPA_TIMEOUT (900) #endif -#ifndef CONFIG_BT_NIMBLE_RPA_TIMEOUT -#define CONFIG_BT_NIMBLE_RPA_TIMEOUT 900 +#ifndef MYNEWT_VAL_BLE_HS_LOG_LVL +#define MYNEWT_VAL_BLE_HS_LOG_LVL (5) #endif -#ifndef CONFIG_BT_NIMBLE_LOG_LEVEL -#define CONFIG_BT_NIMBLE_LOG_LEVEL 5 +#ifndef MYNEWT_VAL_BLE_MESH_DEVICE_NAME +#define MYNEWT_VAL_BLE_SVC_GAP_DEVICE_NAME "nimble" #endif -/** @brief Maximum number of connection oriented channels */ -#ifndef CONFIG_BT_NIMBLE_L2CAP_COC_MAX_NUM -#define CONFIG_BT_NIMBLE_L2CAP_COC_MAX_NUM 0 +#ifndef MYNEWT_VAL_BLE_LL_WHITELIST_SIZE +#define MYNEWT_VAL_BLE_LL_WHITELIST_SIZE (12) #endif /** @brief Set if CCCD's and bond data should be stored in NVS */ -#define CONFIG_BT_NIMBLE_NVS_PERSIST 1 +#define MYNEWT_VAL_BLE_STORE_CONFIG_PERSIST (1) /** @brief Allow legacy paring */ -#define CONFIG_BT_NIMBLE_SM_LEGACY 1 +#define MYNEWT_VAL_BLE_SM_LEGACY (1) /** @brief Allow BLE secure connections */ -#define CONFIG_BT_NIMBLE_SM_SC 1 +#define MYNEWT_VAL_BLE_SM_SC (1) /** @brief Max device name length (bytes) */ -#define CONFIG_BT_NIMBLE_GAP_DEVICE_NAME_MAX_LEN 31 +#define MYNEWT_VAL_BLE_SVC_GAP_DEVICE_NAME_MAX_LENGTH (31) /** @brief ACL Buffer count */ -#define CONFIG_BT_NIMBLE_TRANSPORT_ACL_FROM_LL_COUNT 12 +#define MYNEWT_VAL_BLE_TRANSPORT_ACL_FROM_LL_COUNT (12) /** @brief ACL Buffer size */ -#define CONFIG_BT_NIMBLE_TRANSPORT_ACL_SIZE 255 +#define MYNEWT_VAL_BLE_TRANSPORT_ACL_SIZE (255) /** @brief Transport (HCI) Event Buffer size */ -#if CONFIG_BT_NIMBLE_EXT_ADV -# define CONFIG_BT_NIMBLE_TRANSPORT_EVT_SIZE 257 +#if MYNEWT_VAL_BLE_EXT_ADV +# define MYNEWT_VAL_BLE_TRANSPORT_EVT_SIZE (257) #else -# define CONFIG_BT_NIMBLE_TRANSPORT_EVT_SIZE 70 +# define MYNEWT_VAL_BLE_TRANSPORT_EVT_SIZE (70) #endif /** @brief Number of high priority HCI event buffers */ -#define CONFIG_BT_NIMBLE_TRANSPORT_EVT_COUNT 30 - -/** @brief Number of low priority HCI event buffers */ -#define CONFIG_BT_NIMBLE_TRANSPORT_EVT_DISCARD_COUNT 8 +#define MYNEWT_VAL_BLE_TRANSPORT_EVT_COUNT (30) -#define CONFIG_BT_NIMBLE_L2CAP_COC_SDU_BUFF_COUNT 1 -#define CONFIG_BT_NIMBLE_EATT_CHAN_NUM 0 -#define CONFIG_BT_NIMBLE_SVC_GAP_CENT_ADDR_RESOLUTION -1 -#define CONFIG_BT_NIMBLE_GATT_MAX_PROCS 4 -#define CONFIG_BT_NIMBLE_HS_STOP_TIMEOUT_MS 2000 - -#ifndef CONFIG_BT_ENABLED -#define CONFIG_BT_ENABLED -#endif - -#ifndef CONFIG_BT_NIMBLE_ENABLED -#define CONFIG_BT_NIMBLE_ENABLED 1 -#endif - -#ifndef CONFIG_BT_CONTROLLER_ENABLED -#define CONFIG_BT_CONTROLLER_ENABLED 1 -#endif - -#ifndef CONFIG_BT_NIMBLE_CRYPTO_STACK_MBEDTLS -#define CONFIG_BT_NIMBLE_CRYPTO_STACK_MBEDTLS 0 -#endif +#define MYNEWT_VAL_BLE_L2CAP_COC_SDU_BUFF_COUNT (1) +#define MYNEWT_VAL_BLE_EATT_CHAN_NUM (0) +#define MYNEWT_VAL_BLE_SVC_GAP_CENTRAL_ADDRESS_RESOLUTION (-1) +#define MYNEWT_VAL_BLE_GATT_MAX_PROCS (4) +#define MYNEWT_VAL_BLE_HS_STOP_ON_SHUTDOWN_TIMEOUT (2000) #ifndef MYNEWT_VAL_BLE_CRYPTO_STACK_MBEDTLS -#define MYNEWT_VAL_BLE_CRYPTO_STACK_MBEDTLS (CONFIG_BT_NIMBLE_CRYPTO_STACK_MBEDTLS) +#define MYNEWT_VAL_BLE_CRYPTO_STACK_MBEDTLS (0) #endif #ifdef ESP_PLATFORM -#ifndef CONFIG_BTDM_CONTROLLER_MODE_BLE_ONLY -#define CONFIG_BTDM_CONTROLLER_MODE_BLE_ONLY -#endif - #ifndef CONFIG_BTDM_SCAN_DUPL_TYPE_DEVICE -#define CONFIG_BTDM_SCAN_DUPL_TYPE_DEVICE 0 +#define CONFIG_BTDM_SCAN_DUPL_TYPE_DEVICE (0) #endif #ifndef CONFIG_BTDM_SCAN_DUPL_TYPE_DATA -#define CONFIG_BTDM_SCAN_DUPL_TYPE_DATA 1 +#define CONFIG_BTDM_SCAN_DUPL_TYPE_DATA (1) #endif #ifndef CONFIG_BTDM_SCAN_DUPL_TYPE_DATA_DEVICE -#define CONFIG_BTDM_SCAN_DUPL_TYPE_DATA_DEVICE 2 +#define CONFIG_BTDM_SCAN_DUPL_TYPE_DATA_DEVICE (2) #endif -#if !defined(CONFIG_BT_NIMBLE_LEGACY_VHCI_ENABLE) && defined(CONFIG_IDF_TARGET_ESP32) || \ -defined(CONFIG_IDF_TARGET_ESP32C3) || defined(CONFIG_IDF_TARGET_ESP32S3) -#define CONFIG_BT_NIMBLE_LEGACY_VHCI_ENABLE 1 +#if !defined(CONFIG_BT_NIMBLE_LEGACY_VHCI_ENABLE) && (defined(CONFIG_IDF_TARGET_ESP32) || \ +defined(CONFIG_IDF_TARGET_ESP32C3) || defined(CONFIG_IDF_TARGET_ESP32S3)) +#define CONFIG_BT_NIMBLE_LEGACY_VHCI_ENABLE (1) #endif #ifdef CONFIG_IDF_TARGET_ESP32 -#define CONFIG_BT_NIMBLE_HS_FLOW_CTRL 1 -#define CONFIG_BT_NIMBLE_HS_FLOW_CTRL_ITVL 1000 -#define CONFIG_BT_NIMBLE_HS_FLOW_CTRL_THRESH 2 -#define CONFIG_BT_NIMBLE_HS_FLOW_CTRL_TX_ON_DISCONNECT 1 +#define MYNEWT_VAL_BLE_HS_FLOW_CTRL_TX_ON_DISCONNECT (1) #endif #if !defined(CONFIG_BT_CONTROLLER_DISABLED) -#define CONFIG_BT_CONTROLLER_DISABLED 0 +#define CONFIG_BT_CONTROLLER_DISABLED (0) #endif -#if CONFIG_BT_NIMBLE_EXT_ADV || CONFIG_BT_NIMBLE_ENABLE_PERIODIC_ADV +#if MYNEWT_VAL_BLE_EXT_ADV # if defined(CONFIG_IDF_TARGET_ESP32) # error Extended advertising is not supported on ESP32. # endif #endif #ifndef CONFIG_BT_NIMBLE_USE_ESP_TIMER -#define CONFIG_BT_NIMBLE_USE_ESP_TIMER 1 -#endif - -#ifndef CONFIG_BT_NIMBLE_WHITELIST_SIZE -#define CONFIG_BT_NIMBLE_WHITELIST_SIZE 12 +#define CONFIG_BT_NIMBLE_USE_ESP_TIMER (1) #endif #endif // ESP_PLATFORM -#if CONFIG_BT_NIMBLE_ENABLE_PERIODIC_ADV && !CONFIG_BT_NIMBLE_EXT_ADV -# error Extended advertising must be enabled to use periodic advertising. +#if !defined(MYNEWT_VAL_BLE_MULTI_ADV_INSTANCES) +# define MYNEWT_VAL_BLE_MULTI_ADV_INSTANCES (1) #endif -/* Must have max instances and data length set if extended advertising is enabled */ -#if CONFIG_BT_NIMBLE_EXT_ADV -# if !defined(CONFIG_BT_NIMBLE_MAX_EXT_ADV_INSTANCES) -# define CONFIG_BT_NIMBLE_MAX_EXT_ADV_INSTANCES 1 -# endif -# if !defined(CONFIG_BT_NIMBLE_MAX_EXT_ADV_DATA_LEN) -# define CONFIG_BT_NIMBLE_MAX_EXT_ADV_DATA_LEN 251 -# endif -#endif - -/* Must set max number of syncs if periodic advertising is enabled */ -#if CONFIG_BT_NIMBLE_ENABLE_PERIODIC_ADV && !defined(CONFIG_BT_NIMBLE_MAX_PERIODIC_SYNCS) -# define CONFIG_BT_NIMBLE_MAX_PERIODIC_SYNCS 1 +#if !defined(MYNEWT_VAL_BLE_EXT_ADV_MAX_SIZE) +# define MYNEWT_VAL_BLE_EXT_ADV_MAX_SIZE (251) #endif /* Enables the use of Arduino String class for attribute values */ #if defined __has_include # if __has_include () -# define NIMBLE_CPP_ARDUINO_STRING_AVAILABLE +# define NIMBLE_CPP_ARDUINO_STRING_AVAILABLE (1) # endif #endif #ifndef CONFIG_NIMBLE_CPP_DEBUG_ASSERT_ENABLED -#define CONFIG_NIMBLE_CPP_DEBUG_ASSERT_ENABLED 0 +#define CONFIG_NIMBLE_CPP_DEBUG_ASSERT_ENABLED (0) #endif #ifndef CONFIG_NIMBLE_CPP_FREERTOS_TASK_BLOCK_BIT -#define CONFIG_NIMBLE_CPP_FREERTOS_TASK_BLOCK_BIT 31 +#define CONFIG_NIMBLE_CPP_FREERTOS_TASK_BLOCK_BIT (31) #endif - -#if CONFIG_NIMBLE_CPP_DEBUG_ASSERT_ENABLED && !defined NDEBUG -void nimble_cpp_assert(const char *file, unsigned line) __attribute((weak, noreturn)); -# define NIMBLE_ATT_VAL_FILE (__builtin_strrchr(__FILE__, '/') ? \ - __builtin_strrchr (__FILE__, '/') + 1 : __FILE__) -# define NIMBLE_CPP_DEBUG_ASSERT(cond) \ - if (!(cond)) { \ - nimble_cpp_assert(NIMBLE_ATT_VAL_FILE, __LINE__); \ - } -#else -# define NIMBLE_CPP_DEBUG_ASSERT(cond) (void(0)) -#endif \ No newline at end of file diff --git a/src/nimconfig_rename.h b/src/nimconfig_rename.h index 24e05060..7844e93a 100644 --- a/src/nimconfig_rename.h +++ b/src/nimconfig_rename.h @@ -8,26 +8,6 @@ #define CONFIG_BT_NIMBLE_ENABLED #endif -#if defined(CONFIG_NIMBLE_ROLE_OBSERVER) && !CONFIG_BT_NIMBLE_ROLE_OBSERVER -#define CONFIG_BT_NIMBLE_ROLE_OBSERVER -#endif - -#if defined(CONFIG_NIMBLE_ROLE_BROADCASTER) && !CONFIG_BT_NIMBLE_ROLE_BROADCASTER -#define CONFIG_BT_NIMBLE_ROLE_BROADCASTER -#endif - -#if defined(CONFIG_NIMBLE_ROLE_CENTRAL) && !CONFIG_BT_NIMBLE_ROLE_CENTRAL -#define CONFIG_BT_NIMBLE_ROLE_CENTRAL -#endif - -#if defined(CONFIG_NIMBLE_ROLE_PERIPHERAL) && !CONFIG_BT_NIMBLE_ROLE_PERIPHERAL -#define CONFIG_BT_NIMBLE_ROLE_PERIPHERAL -#endif - -#if defined(CONFIG_NIMBLE_DEBUG) && !defined(CONFIG_BT_NIMBLE_DEBUG) -#define CONFIG_BT_NIMBLE_DEBUG -#endif - #if defined(CONFIG_SCAN_DUPLICATE_BY_DEVICE_ADDR) && !defined(CONFIG_BTDM_SCAN_DUPL_TYPE_DEVICE) #define CONFIG_BTDM_SCAN_DUPL_TYPE_DEVICE CONFIG_SCAN_DUPLICATE_BY_DEVICE_ADDR #endif diff --git a/src/syscfg/syscfg.h b/src/syscfg/syscfg.h index c89df516..c684b0a1 100644 --- a/src/syscfg/syscfg.h +++ b/src/syscfg/syscfg.h @@ -1,2 +1,1716 @@ -#pragma once +/** + * This file was generated by Apache newt version: 1.11.0-dev + */ + #include "nimble/porting/nimble/include/syscfg/syscfg.h" + +#ifndef H_SYSCFG_ +#define H_SYSCFG_ + +#include "nimconfig.h" + +#if CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32C3 || CONFIG_IDF_TARGET_ESP32S3 +#define NIMBLE_CFG_CONTROLLER 0 +#else +#define NIMBLE_CFG_CONTROLLER CONFIG_BT_CONTROLLER_ENABLED +#endif + +#ifndef CONFIG_BT_NIMBLE_ENABLED +#define CONFIG_BT_NIMBLE_ENABLED (1) +#endif + +#ifndef CONFIG_BT_CONTROLLER_ENABLED +#define CONFIG_BT_CONTROLLER_ENABLED (1) +#endif + +/** + * This macro exists to ensure code includes this header when needed. If code + * checks the existence of a setting directly via ifdef without including this + * header, the setting macro will silently evaluate to 0. In contrast, an + * attempt to use these macros without including this header will result in a + * compiler error. + */ +#define MYNEWT_VAL(_name) MYNEWT_VAL_ ## _name +#define MYNEWT_VAL_CHOICE(_name, _val) MYNEWT_VAL_ ## _name ## __ ## _val + +#ifndef MYNEWT_VAL_TINYCRYPT_SYSINIT_STAGE +#define MYNEWT_VAL_TINYCRYPT_SYSINIT_STAGE (200) +#endif + +#ifndef MYNEWT_VAL_TINYCRYPT_UECC_RNG_TRNG_DEV_NAME +#define MYNEWT_VAL_TINYCRYPT_UECC_RNG_TRNG_DEV_NAME "trng" +#endif + +#ifndef MYNEWT_VAL_TINYCRYPT_UECC_RNG_USE_TRNG +#define MYNEWT_VAL_TINYCRYPT_UECC_RNG_USE_TRNG (0) +#endif + +/*** @apache-mynewt-core/hw/bsp/native */ +#ifndef MYNEWT_VAL_BSP_SIMULATED +#define MYNEWT_VAL_BSP_SIMULATED (1) +#endif + +/*** @apache-mynewt-core/hw/hal */ +#ifndef MYNEWT_VAL_HAL_ENABLE_SOFTWARE_BREAKPOINTS +#define MYNEWT_VAL_HAL_ENABLE_SOFTWARE_BREAKPOINTS (1) +#endif + +#ifndef MYNEWT_VAL_HAL_FLASH_MAX_DEVICE_COUNT +#define MYNEWT_VAL_HAL_FLASH_MAX_DEVICE_COUNT (0) +#endif + +#ifndef MYNEWT_VAL_HAL_FLASH_VERIFY_BUF_SZ +#define MYNEWT_VAL_HAL_FLASH_VERIFY_BUF_SZ (16) +#endif + +#ifndef MYNEWT_VAL_HAL_FLASH_VERIFY_ERASES +#define MYNEWT_VAL_HAL_FLASH_VERIFY_ERASES (0) +#endif + +#ifndef MYNEWT_VAL_HAL_FLASH_VERIFY_WRITES +#define MYNEWT_VAL_HAL_FLASH_VERIFY_WRITES (0) +#endif + +#ifndef MYNEWT_VAL_HAL_SBRK +#define MYNEWT_VAL_HAL_SBRK (1) +#endif + +#ifndef MYNEWT_VAL_HAL_SYSTEM_RESET_CB +#define MYNEWT_VAL_HAL_SYSTEM_RESET_CB (0) +#endif + +/*** @apache-mynewt-core/hw/mcu/native */ +#ifndef MYNEWT_VAL_I2C_0 +#define MYNEWT_VAL_I2C_0 (0) +#endif + +#ifndef MYNEWT_VAL_MCU_FLASH_MIN_WRITE_SIZE +#define MYNEWT_VAL_MCU_FLASH_MIN_WRITE_SIZE (1) +#endif + +#ifndef MYNEWT_VAL_MCU_FLASH_STYLE_NORDIC +#define MYNEWT_VAL_MCU_FLASH_STYLE_NORDIC (0) +#endif + +#ifndef MYNEWT_VAL_MCU_FLASH_STYLE_ST +#define MYNEWT_VAL_MCU_FLASH_STYLE_ST (1) +#endif + +#ifndef MYNEWT_VAL_MCU_NATIVE +#define MYNEWT_VAL_MCU_NATIVE (1) +#endif + +#ifndef MYNEWT_VAL_MCU_NATIVE_USE_SIGNALS +#define MYNEWT_VAL_MCU_NATIVE_USE_SIGNALS (1) +#endif + +#ifndef MYNEWT_VAL_MCU_TIMER_POLLER_PRIO +#define MYNEWT_VAL_MCU_TIMER_POLLER_PRIO (0) +#endif + +#ifndef MYNEWT_VAL_MCU_UART_POLLER_PRIO +#define MYNEWT_VAL_MCU_UART_POLLER_PRIO (1) +#endif + +/*** @apache-mynewt-core/kernel/os */ +#ifndef MYNEWT_VAL_FLOAT_USER +#define MYNEWT_VAL_FLOAT_USER (0) +#endif + +#ifndef MYNEWT_VAL_MSYS_1_BLOCK_COUNT +#define MYNEWT_VAL_MSYS_1_BLOCK_COUNT (20) +#endif + +#ifndef MYNEWT_VAL_MSYS_1_BLOCK_SIZE +#define MYNEWT_VAL_MSYS_1_BLOCK_SIZE (292) +#endif + +#ifndef MYNEWT_VAL_MSYS_1_SANITY_MIN_COUNT +#define MYNEWT_VAL_MSYS_1_SANITY_MIN_COUNT (0) +#endif + +#ifndef MYNEWT_VAL_MSYS_2_BLOCK_COUNT +#define MYNEWT_VAL_MSYS_2_BLOCK_COUNT (0) +#endif + +#ifndef MYNEWT_VAL_MSYS_2_BLOCK_SIZE +#define MYNEWT_VAL_MSYS_2_BLOCK_SIZE (0) +#endif + +#ifndef MYNEWT_VAL_MSYS_2_SANITY_MIN_COUNT +#define MYNEWT_VAL_MSYS_2_SANITY_MIN_COUNT (0) +#endif + +#ifndef MYNEWT_VAL_MSYS_SANITY_TIMEOUT +#define MYNEWT_VAL_MSYS_SANITY_TIMEOUT (60000) +#endif + +#ifndef MYNEWT_VAL_OS_ASSERT_CB +#define MYNEWT_VAL_OS_ASSERT_CB (0) +#endif + +#ifndef MYNEWT_VAL_OS_CLI +#define MYNEWT_VAL_OS_CLI (0) +#endif + +#ifndef MYNEWT_VAL_OS_COREDUMP +#define MYNEWT_VAL_OS_COREDUMP (0) +#endif + +#ifndef MYNEWT_VAL_OS_COREDUMP_CB +#define MYNEWT_VAL_OS_COREDUMP_CB (0) +#endif + +#ifndef MYNEWT_VAL_OS_CPUTIME_FREQ +#define MYNEWT_VAL_OS_CPUTIME_FREQ (1000000) +#endif + +#ifndef MYNEWT_VAL_OS_CPUTIME_TIMER_NUM +#define MYNEWT_VAL_OS_CPUTIME_TIMER_NUM (0) +#endif + +/* Overridden by @apache-mynewt-core/hw/bsp/native (defined by @apache-mynewt-core/kernel/os) */ +#ifndef MYNEWT_VAL_OS_CRASH_FILE_LINE +#define MYNEWT_VAL_OS_CRASH_FILE_LINE (1) +#endif + +#ifndef MYNEWT_VAL_OS_CRASH_LOG +#define MYNEWT_VAL_OS_CRASH_LOG (0) +#endif + +#ifndef MYNEWT_VAL_OS_CRASH_RESTORE_REGS +#define MYNEWT_VAL_OS_CRASH_RESTORE_REGS (0) +#endif + +#ifndef MYNEWT_VAL_OS_CRASH_STACKTRACE +#define MYNEWT_VAL_OS_CRASH_STACKTRACE (0) +#endif + +#ifndef MYNEWT_VAL_OS_CTX_SW_STACK_CHECK +#define MYNEWT_VAL_OS_CTX_SW_STACK_CHECK (0) +#endif + +#ifndef MYNEWT_VAL_OS_CTX_SW_STACK_GUARD +#define MYNEWT_VAL_OS_CTX_SW_STACK_GUARD (4) +#endif + +#ifndef MYNEWT_VAL_OS_DEBUG_MODE +#define MYNEWT_VAL_OS_DEBUG_MODE (0) +#endif + +#ifndef MYNEWT_VAL_OS_EVENTQ_DEBUG +#define MYNEWT_VAL_OS_EVENTQ_DEBUG (0) +#endif + +#ifndef MYNEWT_VAL_OS_EVENTQ_MONITOR +#define MYNEWT_VAL_OS_EVENTQ_MONITOR (0) +#endif + +#ifndef MYNEWT_VAL_OS_IDLE_TICKLESS_MS_MAX +#define MYNEWT_VAL_OS_IDLE_TICKLESS_MS_MAX (600000) +#endif + +/* Overridden by @apache-mynewt-core/hw/bsp/native (defined by @apache-mynewt-core/kernel/os) */ +#ifndef MYNEWT_VAL_OS_IDLE_TICKLESS_MS_MIN +#define MYNEWT_VAL_OS_IDLE_TICKLESS_MS_MIN (1) +#endif + +#ifndef MYNEWT_VAL_OS_MAIN_STACK_SIZE +#define MYNEWT_VAL_OS_MAIN_STACK_SIZE (1024) +#endif + +#ifndef MYNEWT_VAL_OS_MAIN_TASK_PRIO +#define MYNEWT_VAL_OS_MAIN_TASK_PRIO (127) +#endif + +#ifndef MYNEWT_VAL_OS_MAIN_TASK_SANITY_ITVL_MS +#define MYNEWT_VAL_OS_MAIN_TASK_SANITY_ITVL_MS (0) +#endif + +#ifndef MYNEWT_VAL_OS_MEMPOOL_CHECK +#define MYNEWT_VAL_OS_MEMPOOL_CHECK (0) +#endif + +#ifndef MYNEWT_VAL_OS_MEMPOOL_GUARD +#define MYNEWT_VAL_OS_MEMPOOL_GUARD (0) +#endif + +#ifndef MYNEWT_VAL_OS_MEMPOOL_POISON +#define MYNEWT_VAL_OS_MEMPOOL_POISON (0) +#endif + +#ifndef MYNEWT_VAL_OS_SCHEDULING +#define MYNEWT_VAL_OS_SCHEDULING (1) +#endif + +#ifndef MYNEWT_VAL_OS_SYSINIT_STAGE +#define MYNEWT_VAL_OS_SYSINIT_STAGE (0) +#endif + +#ifndef MYNEWT_VAL_OS_SYSVIEW +#define MYNEWT_VAL_OS_SYSVIEW (0) +#endif + +#ifndef MYNEWT_VAL_OS_SYSVIEW_TRACE_CALLOUT +#define MYNEWT_VAL_OS_SYSVIEW_TRACE_CALLOUT (1) +#endif + +#ifndef MYNEWT_VAL_OS_SYSVIEW_TRACE_EVENTQ +#define MYNEWT_VAL_OS_SYSVIEW_TRACE_EVENTQ (1) +#endif + +#ifndef MYNEWT_VAL_OS_SYSVIEW_TRACE_MBUF +#define MYNEWT_VAL_OS_SYSVIEW_TRACE_MBUF (0) +#endif + +#ifndef MYNEWT_VAL_OS_SYSVIEW_TRACE_MEMPOOL +#define MYNEWT_VAL_OS_SYSVIEW_TRACE_MEMPOOL (0) +#endif + +#ifndef MYNEWT_VAL_OS_SYSVIEW_TRACE_MUTEX +#define MYNEWT_VAL_OS_SYSVIEW_TRACE_MUTEX (1) +#endif + +#ifndef MYNEWT_VAL_OS_SYSVIEW_TRACE_SEM +#define MYNEWT_VAL_OS_SYSVIEW_TRACE_SEM (1) +#endif + +#ifndef MYNEWT_VAL_OS_TASK_RUN_TIME_CPUTIME +#define MYNEWT_VAL_OS_TASK_RUN_TIME_CPUTIME (0) +#endif + +/* Overridden by @apache-mynewt-core/hw/mcu/native (defined by @apache-mynewt-core/kernel/os) */ +#ifndef MYNEWT_VAL_OS_TICKS_PER_SEC +#define MYNEWT_VAL_OS_TICKS_PER_SEC (100) +#endif + +#ifndef MYNEWT_VAL_OS_TIME_DEBUG +#define MYNEWT_VAL_OS_TIME_DEBUG (0) +#endif + +#ifndef MYNEWT_VAL_OS_WATCHDOG_MONITOR +#define MYNEWT_VAL_OS_WATCHDOG_MONITOR (0) +#endif + +#ifndef MYNEWT_VAL_SANITY_INTERVAL +#define MYNEWT_VAL_SANITY_INTERVAL (15000) +#endif + +#ifndef MYNEWT_VAL_WATCHDOG_INTERVAL +#define MYNEWT_VAL_WATCHDOG_INTERVAL (30000) +#endif + +/*** @apache-mynewt-core/net/ip/native_sockets */ +#ifndef MYNEWT_VAL_NATIVE_SOCKETS_MAX +#define MYNEWT_VAL_NATIVE_SOCKETS_MAX (8) +#endif + +#ifndef MYNEWT_VAL_NATIVE_SOCKETS_MAX_UDP +#define MYNEWT_VAL_NATIVE_SOCKETS_MAX_UDP (2048) +#endif + +#ifndef MYNEWT_VAL_NATIVE_SOCKETS_POLL_INTERVAL_MS +#define MYNEWT_VAL_NATIVE_SOCKETS_POLL_INTERVAL_MS (200) +#endif + +#undef MYNEWT_VAL_NATIVE_SOCKETS_POLL_ITVL + +#ifndef MYNEWT_VAL_NATIVE_SOCKETS_PRIO +#define MYNEWT_VAL_NATIVE_SOCKETS_PRIO (2) +#endif + +#ifndef MYNEWT_VAL_NATIVE_SOCKETS_STACK_SZ +#define MYNEWT_VAL_NATIVE_SOCKETS_STACK_SZ (4096) +#endif + +#ifndef MYNEWT_VAL_NATIVE_SOCKETS_SYSINIT_STAGE +#define MYNEWT_VAL_NATIVE_SOCKETS_SYSINIT_STAGE (200) +#endif + +/*** @apache-mynewt-core/sys/console/stub */ +#ifndef MYNEWT_VAL_CONSOLE_UART_BAUD +#define MYNEWT_VAL_CONSOLE_UART_BAUD (115200) +#endif + +#ifndef MYNEWT_VAL_CONSOLE_UART_DEV +#define MYNEWT_VAL_CONSOLE_UART_DEV "uart0" +#endif + +#ifndef MYNEWT_VAL_CONSOLE_UART_FLOW_CONTROL +#define MYNEWT_VAL_CONSOLE_UART_FLOW_CONTROL (UART_FLOW_CTL_NONE) +#endif + +/*** @apache-mynewt-core/sys/flash_map */ +#ifndef MYNEWT_VAL_FLASH_MAP_MAX_AREAS +#define MYNEWT_VAL_FLASH_MAP_MAX_AREAS (10) +#endif + +#ifndef MYNEWT_VAL_FLASH_MAP_SUPPORT_MFG +#define MYNEWT_VAL_FLASH_MAP_SUPPORT_MFG (0) +#endif + +#ifndef MYNEWT_VAL_FLASH_MAP_SYSINIT_STAGE +#define MYNEWT_VAL_FLASH_MAP_SYSINIT_STAGE (9) +#endif + +/*** @apache-mynewt-core/sys/log/common */ +#ifndef MYNEWT_VAL_DFLT_LOG_LVL +#define MYNEWT_VAL_DFLT_LOG_LVL (1) +#endif + +#ifndef MYNEWT_VAL_DFLT_LOG_MOD +#define MYNEWT_VAL_DFLT_LOG_MOD (0) +#endif + +#ifndef MYNEWT_VAL_LOG_GLOBAL_IDX +#define MYNEWT_VAL_LOG_GLOBAL_IDX (1) +#endif + +/*** @apache-mynewt-core/sys/log/modlog */ +#ifndef MYNEWT_VAL_MODLOG_CONSOLE_DFLT +#define MYNEWT_VAL_MODLOG_CONSOLE_DFLT (1) +#endif + +#ifndef MYNEWT_VAL_MODLOG_LOG_MACROS +#define MYNEWT_VAL_MODLOG_LOG_MACROS (0) +#endif + +#ifndef MYNEWT_VAL_MODLOG_MAX_MAPPINGS +#define MYNEWT_VAL_MODLOG_MAX_MAPPINGS (16) +#endif + +#ifndef MYNEWT_VAL_MODLOG_MAX_PRINTF_LEN +#define MYNEWT_VAL_MODLOG_MAX_PRINTF_LEN (128) +#endif + +#ifndef MYNEWT_VAL_MODLOG_SYSINIT_STAGE +#define MYNEWT_VAL_MODLOG_SYSINIT_STAGE (100) +#endif + +/*** @apache-mynewt-core/sys/log/stub */ +#ifndef MYNEWT_VAL_LOG_CONSOLE +#define MYNEWT_VAL_LOG_CONSOLE (1) +#endif + +#ifndef MYNEWT_VAL_LOG_FCB +#define MYNEWT_VAL_LOG_FCB (0) +#endif + +#ifndef MYNEWT_VAL_LOG_FCB_SLOT1 +#define MYNEWT_VAL_LOG_FCB_SLOT1 (0) +#endif + +#ifndef MYNEWT_VAL_LOG_LEVEL +#define MYNEWT_VAL_LOG_LEVEL (255) +#endif + +/*** @apache-mynewt-core/sys/sys */ +#ifndef MYNEWT_VAL_DEBUG_PANIC_ENABLED +#define MYNEWT_VAL_DEBUG_PANIC_ENABLED (1) +#endif + +/*** @apache-mynewt-core/sys/sysdown */ +#ifndef MYNEWT_VAL_SYSDOWN_CONSTRAIN_DOWN +#define MYNEWT_VAL_SYSDOWN_CONSTRAIN_DOWN (1) +#endif + +#ifndef MYNEWT_VAL_SYSDOWN_PANIC_FILE_LINE +#define MYNEWT_VAL_SYSDOWN_PANIC_FILE_LINE (0) +#endif + +#ifndef MYNEWT_VAL_SYSDOWN_PANIC_MESSAGE +#define MYNEWT_VAL_SYSDOWN_PANIC_MESSAGE (0) +#endif + +#ifndef MYNEWT_VAL_SYSDOWN_TIMEOUT_MS +#define MYNEWT_VAL_SYSDOWN_TIMEOUT_MS (10000) +#endif + +/*** @apache-mynewt-core/sys/sysinit */ +#ifndef MYNEWT_VAL_SYSINIT_CONSTRAIN_INIT +#define MYNEWT_VAL_SYSINIT_CONSTRAIN_INIT (1) +#endif + +/* Overridden by @apache-mynewt-core/hw/bsp/native (defined by @apache-mynewt-core/sys/sysinit) */ +#ifndef MYNEWT_VAL_SYSINIT_PANIC_FILE_LINE +#define MYNEWT_VAL_SYSINIT_PANIC_FILE_LINE (1) +#endif + +/* Overridden by @apache-mynewt-core/hw/bsp/native (defined by @apache-mynewt-core/sys/sysinit) */ +#ifndef MYNEWT_VAL_SYSINIT_PANIC_MESSAGE +#define MYNEWT_VAL_SYSINIT_PANIC_MESSAGE (1) +#endif + +/*** @apache-mynewt-core/util/rwlock */ +#ifndef MYNEWT_VAL_RWLOCK_DEBUG +#define MYNEWT_VAL_RWLOCK_DEBUG (0) +#endif + +/*** @apache-mynewt-nimble/nimble */ +#ifndef MYNEWT_VAL_BLE_CONN_SUBRATING +#define MYNEWT_VAL_BLE_CONN_SUBRATING (0) +#endif + +#ifndef MYNEWT_VAL_BLE_EXT_ADV +#define MYNEWT_VAL_BLE_EXT_ADV (0) +#endif + +#ifndef MYNEWT_VAL_BLE_EXT_ADV_MAX_SIZE +#define MYNEWT_VAL_BLE_EXT_ADV_MAX_SIZE (31) +#endif + +#ifndef MYNEWT_VAL_ENC_ADV_DATA +#define MYNEWT_VAL_ENC_ADV_DATA (0) +#endif + +#ifndef MYNEWT_VAL_BLE_HCI_VS +#define MYNEWT_VAL_BLE_HCI_VS (0) +#endif + +#ifndef MYNEWT_VAL_BLE_HCI_VS_OCF_OFFSET +#define MYNEWT_VAL_BLE_HCI_VS_OCF_OFFSET (0) +#endif + +#ifndef MYNEWT_VAL_BLE_ISO +#define MYNEWT_VAL_BLE_ISO (0) +#endif + +#ifndef MYNEWT_VAL_BLE_ISO_TEST +#define MYNEWT_VAL_BLE_ISO_TEST (0) +#endif + +#ifndef MYNEWT_VAL_BLE_MAX_CONNECTIONS +#define MYNEWT_VAL_BLE_MAX_CONNECTIONS (4) +#endif + +#ifndef MYNEWT_VAL_BLE_MAX_PERIODIC_SYNCS +#define MYNEWT_VAL_BLE_MAX_PERIODIC_SYNCS (1) +#endif + +#ifndef MYNEWT_VAL_BLE_MULTI_ADV_INSTANCES +#define MYNEWT_VAL_BLE_MULTI_ADV_INSTANCES (0) +#endif + +#ifndef MYNEWT_VAL_BLE_PERIODIC_ADV +#define MYNEWT_VAL_BLE_PERIODIC_ADV (0) +#endif + +#ifndef MYNEWT_VAL_BLE_PERIODIC_ADV_SYNC_TRANSFER +#define MYNEWT_VAL_BLE_PERIODIC_ADV_SYNC_TRANSFER (0) +#endif + +#ifndef MYNEWT_VAL_BLE_POWER_CONTROL +#define MYNEWT_VAL_BLE_POWER_CONTROL (0) +#endif + +#ifndef MYNEWT_VAL_BLE_ROLE_BROADCASTER +#define MYNEWT_VAL_BLE_ROLE_BROADCASTER (1) +#endif + +#ifndef MYNEWT_VAL_BLE_ROLE_CENTRAL +#define MYNEWT_VAL_BLE_ROLE_CENTRAL (1) +#endif + +#ifndef MYNEWT_VAL_BLE_ROLE_OBSERVER +#define MYNEWT_VAL_BLE_ROLE_OBSERVER (1) +#endif + +#ifndef MYNEWT_VAL_BLE_ROLE_PERIPHERAL +#define MYNEWT_VAL_BLE_ROLE_PERIPHERAL (1) +#endif + +#ifndef MYNEWT_VAL_BLE_VERSION +#define MYNEWT_VAL_BLE_VERSION (50) +#endif + +#ifndef MYNEWT_VAL_BLE_WHITELIST +#define MYNEWT_VAL_BLE_WHITELIST (1) +#endif + +/*** @apache-mynewt-nimble/nimble/host */ +#ifndef MYNEWT_VAL_BLE_ATT_PREFERRED_MTU +#define MYNEWT_VAL_BLE_ATT_PREFERRED_MTU (256) +#endif + +#ifndef MYNEWT_VAL_BLE_ATT_SVR_FIND_INFO +#define MYNEWT_VAL_BLE_ATT_SVR_FIND_INFO (1) +#endif + +#ifndef MYNEWT_VAL_BLE_ATT_SVR_FIND_TYPE +#define MYNEWT_VAL_BLE_ATT_SVR_FIND_TYPE (1) +#endif + +#ifndef MYNEWT_VAL_BLE_ATT_SVR_INDICATE +#define MYNEWT_VAL_BLE_ATT_SVR_INDICATE (1) +#endif + +#ifndef MYNEWT_VAL_BLE_ATT_SVR_MAX_PREP_ENTRIES +#define MYNEWT_VAL_BLE_ATT_SVR_MAX_PREP_ENTRIES (64) +#endif + +#ifndef MYNEWT_VAL_BLE_ATT_SVR_NOTIFY +#define MYNEWT_VAL_BLE_ATT_SVR_NOTIFY (1) +#endif + +#ifndef MYNEWT_VAL_BLE_ATT_SVR_NOTIFY_MULTI +#define MYNEWT_VAL_BLE_ATT_SVR_NOTIFY_MULTI (MYNEWT_VAL_BLE_ATT_SVR_NOTIFY && (MYNEWT_VAL_BLE_VERSION >= 52)) +#endif + +#ifndef MYNEWT_VAL_BLE_ATT_SVR_QUEUED_WRITE +#define MYNEWT_VAL_BLE_ATT_SVR_QUEUED_WRITE (1) +#endif + +#ifndef MYNEWT_VAL_BLE_ATT_SVR_QUEUED_WRITE_TMO +#define MYNEWT_VAL_BLE_ATT_SVR_QUEUED_WRITE_TMO (30000) +#endif + +#ifndef MYNEWT_VAL_BLE_ATT_SVR_READ +#define MYNEWT_VAL_BLE_ATT_SVR_READ (1) +#endif + +#ifndef MYNEWT_VAL_BLE_ATT_SVR_READ_BLOB +#define MYNEWT_VAL_BLE_ATT_SVR_READ_BLOB (1) +#endif + +#ifndef MYNEWT_VAL_BLE_ATT_SVR_READ_GROUP_TYPE +#define MYNEWT_VAL_BLE_ATT_SVR_READ_GROUP_TYPE (1) +#endif + +#ifndef MYNEWT_VAL_BLE_ATT_SVR_READ_MULT +#define MYNEWT_VAL_BLE_ATT_SVR_READ_MULT (1) +#endif + +#ifndef MYNEWT_VAL_BLE_ATT_SVR_READ_TYPE +#define MYNEWT_VAL_BLE_ATT_SVR_READ_TYPE (1) +#endif + +#ifndef MYNEWT_VAL_BLE_ATT_SVR_SIGNED_WRITE +#define MYNEWT_VAL_BLE_ATT_SVR_SIGNED_WRITE (1) +#endif + +#ifndef MYNEWT_VAL_BLE_ATT_SVR_WRITE +#define MYNEWT_VAL_BLE_ATT_SVR_WRITE (1) +#endif + +#ifndef MYNEWT_VAL_BLE_ATT_SVR_WRITE_NO_RSP +#define MYNEWT_VAL_BLE_ATT_SVR_WRITE_NO_RSP (1) +#endif + +#ifndef MYNEWT_VAL_BLE_EATT_CHAN_NUM +#define MYNEWT_VAL_BLE_EATT_CHAN_NUM (0) +#endif + +#ifndef MYNEWT_VAL_BLE_EATT_LOG_LVL +#define MYNEWT_VAL_BLE_EATT_LOG_LVL (1) +#endif + +#ifndef MYNEWT_VAL_BLE_EATT_LOG_MOD +#define MYNEWT_VAL_BLE_EATT_LOG_MOD (27) +#endif + +#ifndef MYNEWT_VAL_BLE_EATT_MTU +#define MYNEWT_VAL_BLE_EATT_MTU (128) +#endif + +#ifndef MYNEWT_VAL_BLE_GAP_MAX_PENDING_CONN_PARAM_UPDATE +#define MYNEWT_VAL_BLE_GAP_MAX_PENDING_CONN_PARAM_UPDATE (1) +#endif + +#ifndef MYNEWT_VAL_BLE_GATT_DISC_ALL_CHRS +#define MYNEWT_VAL_BLE_GATT_DISC_ALL_CHRS (MYNEWT_VAL_BLE_ROLE_CENTRAL) +#endif + +#ifndef MYNEWT_VAL_BLE_GATT_DISC_ALL_DSCS +#define MYNEWT_VAL_BLE_GATT_DISC_ALL_DSCS (MYNEWT_VAL_BLE_ROLE_CENTRAL) +#endif + +#ifndef MYNEWT_VAL_BLE_GATT_DISC_ALL_SVCS +#define MYNEWT_VAL_BLE_GATT_DISC_ALL_SVCS (MYNEWT_VAL_BLE_ROLE_CENTRAL) +#endif + +#ifndef MYNEWT_VAL_BLE_GATT_DISC_CHR_UUID +#define MYNEWT_VAL_BLE_GATT_DISC_CHR_UUID (MYNEWT_VAL_BLE_ROLE_CENTRAL) +#endif + +#ifndef MYNEWT_VAL_BLE_GATT_DISC_SVC_UUID +#define MYNEWT_VAL_BLE_GATT_DISC_SVC_UUID (MYNEWT_VAL_BLE_ROLE_CENTRAL) +#endif + +#ifndef MYNEWT_VAL_BLE_GATT_FIND_INC_SVCS +#define MYNEWT_VAL_BLE_GATT_FIND_INC_SVCS (MYNEWT_VAL_BLE_ROLE_CENTRAL) +#endif + +#ifndef MYNEWT_VAL_BLE_GATT_INDICATE +#define MYNEWT_VAL_BLE_GATT_INDICATE (1) +#endif + +#ifndef MYNEWT_VAL_BLE_GATT_MAX_PROCS +#define MYNEWT_VAL_BLE_GATT_MAX_PROCS (4) +#endif + +#ifndef MYNEWT_VAL_BLE_GATT_NOTIFY +#define MYNEWT_VAL_BLE_GATT_NOTIFY (1) +#endif + +#ifndef MYNEWT_VAL_BLE_GATT_NOTIFY_MULTIPLE +#define MYNEWT_VAL_BLE_GATT_NOTIFY_MULTIPLE (1) +#endif + +#ifndef MYNEWT_VAL_BLE_GATT_READ +#define MYNEWT_VAL_BLE_GATT_READ (MYNEWT_VAL_BLE_ROLE_CENTRAL) +#endif + +#ifndef MYNEWT_VAL_BLE_GATT_READ_LONG +#define MYNEWT_VAL_BLE_GATT_READ_LONG (MYNEWT_VAL_BLE_ROLE_CENTRAL) +#endif + +#ifndef MYNEWT_VAL_BLE_GATT_READ_MAX_ATTRS +#define MYNEWT_VAL_BLE_GATT_READ_MAX_ATTRS (8) +#endif + +#ifndef MYNEWT_VAL_BLE_GATT_READ_MULT +#define MYNEWT_VAL_BLE_GATT_READ_MULT (MYNEWT_VAL_BLE_ROLE_CENTRAL) +#endif + +#ifndef MYNEWT_VAL_BLE_GATT_READ_MULT_VAR +#define MYNEWT_VAL_BLE_GATT_READ_MULT_VAR (MYNEWT_VAL_BLE_ROLE_CENTRAL) +#endif + +#ifndef MYNEWT_VAL_BLE_GATT_READ_UUID +#define MYNEWT_VAL_BLE_GATT_READ_UUID (MYNEWT_VAL_BLE_ROLE_CENTRAL) +#endif + +#ifndef MYNEWT_VAL_BLE_GATT_RESUME_RATE +#define MYNEWT_VAL_BLE_GATT_RESUME_RATE (1000) +#endif + +#ifndef MYNEWT_VAL_BLE_GATT_SIGNED_WRITE +#define MYNEWT_VAL_BLE_GATT_SIGNED_WRITE (MYNEWT_VAL_BLE_ROLE_CENTRAL) +#endif + +#ifndef MYNEWT_VAL_BLE_GATT_WRITE +#define MYNEWT_VAL_BLE_GATT_WRITE (MYNEWT_VAL_BLE_ROLE_CENTRAL) +#endif + +#ifndef MYNEWT_VAL_BLE_GATT_WRITE_LONG +#define MYNEWT_VAL_BLE_GATT_WRITE_LONG (MYNEWT_VAL_BLE_ROLE_CENTRAL) +#endif + +#ifndef MYNEWT_VAL_BLE_GATT_WRITE_MAX_ATTRS +#define MYNEWT_VAL_BLE_GATT_WRITE_MAX_ATTRS (4) +#endif + +#ifndef MYNEWT_VAL_BLE_GATT_WRITE_NO_RSP +#define MYNEWT_VAL_BLE_GATT_WRITE_NO_RSP (MYNEWT_VAL_BLE_ROLE_CENTRAL) +#endif + +#ifndef MYNEWT_VAL_BLE_GATT_WRITE_RELIABLE +#define MYNEWT_VAL_BLE_GATT_WRITE_RELIABLE (MYNEWT_VAL_BLE_ROLE_CENTRAL) +#endif + +#ifndef MYNEWT_VAL_BLE_GATT_BLOB_TRANSFER +#define MYNEWT_VAL_BLE_GATT_BLOB_TRANSFER (0) +#endif + +#ifndef MYNEWT_VAL_BLE_HOST +#define MYNEWT_VAL_BLE_HOST (1) +#endif + +#ifndef MYNEWT_VAL_BLE_HS_AUTO_START +#define MYNEWT_VAL_BLE_HS_AUTO_START (1) +#endif + +#ifndef MYNEWT_VAL_BLE_HS_DEBUG +#define MYNEWT_VAL_BLE_HS_DEBUG (1) +#endif + +#ifndef MYNEWT_VAL_BLE_HS_FLOW_CTRL +#define MYNEWT_VAL_BLE_HS_FLOW_CTRL (0) +#endif + +#ifndef MYNEWT_VAL_BLE_HS_FLOW_CTRL_ITVL +#define MYNEWT_VAL_BLE_HS_FLOW_CTRL_ITVL (1000) +#endif + +#ifndef MYNEWT_VAL_BLE_HS_FLOW_CTRL_THRESH +#define MYNEWT_VAL_BLE_HS_FLOW_CTRL_THRESH (2) +#endif + +#ifndef MYNEWT_VAL_BLE_HS_FLOW_CTRL_TX_ON_DISCONNECT +#define MYNEWT_VAL_BLE_HS_FLOW_CTRL_TX_ON_DISCONNECT (0) +#endif + +#ifndef MYNEWT_VAL_BLE_HS_LOG_LVL +#define MYNEWT_VAL_BLE_HS_LOG_LVL (1) +#endif + +#ifndef MYNEWT_VAL_BLE_HS_LOG_MOD +#define MYNEWT_VAL_BLE_HS_LOG_MOD (4) +#endif + +#ifndef MYNEWT_VAL_BLE_HS_PHONY_HCI_ACKS +#define MYNEWT_VAL_BLE_HS_PHONY_HCI_ACKS (0) +#endif + +#ifndef MYNEWT_VAL_BLE_HS_REQUIRE_OS +#define MYNEWT_VAL_BLE_HS_REQUIRE_OS (1) +#endif + +#ifndef MYNEWT_VAL_BLE_HS_STOP_ON_SHUTDOWN +#define MYNEWT_VAL_BLE_HS_STOP_ON_SHUTDOWN (1) +#endif + +#ifndef MYNEWT_VAL_BLE_HS_STOP_ON_SHUTDOWN_TIMEOUT +#define MYNEWT_VAL_BLE_HS_STOP_ON_SHUTDOWN_TIMEOUT (2000) +#endif + +#ifndef MYNEWT_VAL_BLE_HS_SYSINIT_STAGE +#define MYNEWT_VAL_BLE_HS_SYSINIT_STAGE (200) +#endif + +#ifndef MYNEWT_VAL_BLE_L2CAP_COC_MAX_NUM +#define MYNEWT_VAL_BLE_L2CAP_COC_MAX_NUM (0) +#endif + +#ifndef MYNEWT_VAL_BLE_L2CAP_COC_MPS +#define MYNEWT_VAL_BLE_L2CAP_COC_MPS (MYNEWT_VAL_MSYS_1_BLOCK_SIZE-8) +#endif + +#ifndef MYNEWT_VAL_BLE_L2CAP_COC_SDU_BUFF_COUNT +#define MYNEWT_VAL_BLE_L2CAP_COC_SDU_BUFF_COUNT (1) +#endif + +#ifndef MYNEWT_VAL_BLE_L2CAP_ENHANCED_COC +#define MYNEWT_VAL_BLE_L2CAP_ENHANCED_COC (0) +#endif + +#ifndef MYNEWT_VAL_BLE_L2CAP_JOIN_RX_FRAGS +#define MYNEWT_VAL_BLE_L2CAP_JOIN_RX_FRAGS (1) +#endif + +#ifndef MYNEWT_VAL_BLE_L2CAP_MAX_CHANS +#define MYNEWT_VAL_BLE_L2CAP_MAX_CHANS (3*MYNEWT_VAL_BLE_MAX_CONNECTIONS) +#endif + +#ifndef MYNEWT_VAL_BLE_L2CAP_RX_FRAG_TIMEOUT +#define MYNEWT_VAL_BLE_L2CAP_RX_FRAG_TIMEOUT (30000) +#endif + +#ifndef MYNEWT_VAL_BLE_L2CAP_SIG_MAX_PROCS +#define MYNEWT_VAL_BLE_L2CAP_SIG_MAX_PROCS (1) +#endif + +#ifndef MYNEWT_VAL_BLE_MESH +#define MYNEWT_VAL_BLE_MESH (0) +#endif + +#ifndef MYNEWT_VAL_BLE_RPA_TIMEOUT +#define MYNEWT_VAL_BLE_RPA_TIMEOUT (300) +#endif + +#ifndef MYNEWT_VAL_BLE_SM_BONDING +#define MYNEWT_VAL_BLE_SM_BONDING (0) +#endif + +#ifndef MYNEWT_VAL_BLE_SM_IO_CAP +#define MYNEWT_VAL_BLE_SM_IO_CAP (BLE_HS_IO_NO_INPUT_OUTPUT) +#endif + +#ifndef MYNEWT_VAL_BLE_SM_KEYPRESS +#define MYNEWT_VAL_BLE_SM_KEYPRESS (0) +#endif + +#ifndef MYNEWT_VAL_BLE_SM_LEGACY +#define MYNEWT_VAL_BLE_SM_LEGACY (1) +#endif + +#ifndef MYNEWT_VAL_BLE_SM_LVL +#define MYNEWT_VAL_BLE_SM_LVL (0) +#endif + +#ifndef MYNEWT_VAL_BLE_SM_MAX_PROCS +#define MYNEWT_VAL_BLE_SM_MAX_PROCS (1) +#endif + +#ifndef MYNEWT_VAL_BLE_SM_MITM +#define MYNEWT_VAL_BLE_SM_MITM (0) +#endif + +#ifndef MYNEWT_VAL_BLE_SM_OOB_DATA_FLAG +#define MYNEWT_VAL_BLE_SM_OOB_DATA_FLAG (0) +#endif + +#ifndef MYNEWT_VAL_BLE_SM_OUR_KEY_DIST +#define MYNEWT_VAL_BLE_SM_OUR_KEY_DIST (0) +#endif + +#ifndef MYNEWT_VAL_BLE_SM_SC +#define MYNEWT_VAL_BLE_SM_SC (1) +#endif + +#ifndef MYNEWT_VAL_BLE_SM_SC_DEBUG_KEYS +#define MYNEWT_VAL_BLE_SM_SC_DEBUG_KEYS (0) +#endif + +#ifndef MYNEWT_VAL_BLE_SM_SC_ONLY +#define MYNEWT_VAL_BLE_SM_SC_ONLY (0) +#endif + +#ifndef MYNEWT_VAL_BLE_SM_THEIR_KEY_DIST +#define MYNEWT_VAL_BLE_SM_THEIR_KEY_DIST (0) +#endif + +#ifndef MYNEWT_VAL_BLE_STORE_MAX_BONDS +#define MYNEWT_VAL_BLE_STORE_MAX_BONDS (3) +#endif + +#ifndef MYNEWT_VAL_BLE_STORE_MAX_CCCDS +#define MYNEWT_VAL_BLE_STORE_MAX_CCCDS (8) +#endif + +#ifdef CONFIG_BT_NIMBLE_MAX_EADS +#define MYNEWT_VAL_BLE_STORE_MAX_EADS CONFIG_BT_NIMBLE_MAX_EADS +#endif + +/*** @apache-mynewt-nimble/nimble/host/services/ans */ +#ifndef MYNEWT_VAL_BLE_SVC_ANS_NEW_ALERT_CAT +#define MYNEWT_VAL_BLE_SVC_ANS_NEW_ALERT_CAT (0) +#endif + +#ifndef MYNEWT_VAL_BLE_SVC_ANS_SYSINIT_STAGE +#define MYNEWT_VAL_BLE_SVC_ANS_SYSINIT_STAGE (303) +#endif + +#ifndef MYNEWT_VAL_BLE_SVC_ANS_UNR_ALERT_CAT +#define MYNEWT_VAL_BLE_SVC_ANS_UNR_ALERT_CAT (0) +#endif + +/*** @apache-mynewt-nimble/nimble/host/services/bas */ +#ifndef MYNEWT_VAL_BLE_SVC_BAS_BATTERY_LEVEL_NOTIFY_ENABLE +#define MYNEWT_VAL_BLE_SVC_BAS_BATTERY_LEVEL_NOTIFY_ENABLE (1) +#endif + +#ifndef MYNEWT_VAL_BLE_SVC_BAS_BATTERY_LEVEL_READ_PERM +#define MYNEWT_VAL_BLE_SVC_BAS_BATTERY_LEVEL_READ_PERM (0) +#endif +#ifndef MYNEWT_VAL_BLE_MESH_ADV_TASK_PRIO +#define MYNEWT_VAL_BLE_MESH_ADV_TASK_PRIO (9) +#endif + + +/*** @apache-mynewt-nimble/nimble/host/mesh */ +/* Overridden by apps/blemesh (defined by @apache-mynewt-nimble/nimble/host/mesh) */ +#ifndef MYNEWT_VAL_BLE_MESH_ADV_BUF_COUNT +#define MYNEWT_VAL_BLE_MESH_ADV_BUF_COUNT (20) +#endif + +#ifndef MYNEWT_VAL_BLE_MESH_APP_KEY_COUNT +#define MYNEWT_VAL_BLE_MESH_APP_KEY_COUNT (1) +#endif + +#ifndef MYNEWT_VAL_BLE_MESH_CFG_CLI +#define MYNEWT_VAL_BLE_MESH_CFG_CLI (0) +#endif +#ifndef MYNEWT_VAL_BLE_MESH_CRPL +#define MYNEWT_VAL_BLE_MESH_CRPL (10) +#endif + +/* Overridden by apps/blemesh (defined by @apache-mynewt-nimble/nimble/host/mesh) */ +#ifndef MYNEWT_VAL_BLE_MESH_DEBUG +#define MYNEWT_VAL_BLE_MESH_DEBUG (0) +#endif + +/* Overridden by apps/blemesh (defined by @apache-mynewt-nimble/nimble/host/mesh) */ +#ifndef MYNEWT_VAL_BLE_MESH_DEBUG_ACCESS +#define MYNEWT_VAL_BLE_MESH_DEBUG_ACCESS (0) +#endif + +/* Overridden by apps/blemesh (defined by @apache-mynewt-nimble/nimble/host/mesh) */ +#ifndef MYNEWT_VAL_BLE_MESH_DEBUG_ADV +#define MYNEWT_VAL_BLE_MESH_DEBUG_ADV (0) +#endif + +/* Overridden by apps/blemesh (defined by @apache-mynewt-nimble/nimble/host/mesh) */ +#ifndef MYNEWT_VAL_BLE_MESH_DEBUG +#define MYNEWT_VAL_BLE_MESH_DEBUG (0) +#endif + +/* Overridden by apps/blemesh (defined by @apache-mynewt-nimble/nimble/host/mesh) */ +#ifndef MYNEWT_VAL_BLE_MESH_DEBUG_ACCESS +#define MYNEWT_VAL_BLE_MESH_DEBUG_ACCESS (0) +#endif + +/* Overridden by apps/blemesh (defined by @apache-mynewt-nimble/nimble/host/mesh) */ +#ifndef MYNEWT_VAL_BLE_MESH_DEBUG_ADV +#define MYNEWT_VAL_BLE_MESH_DEBUG_ADV (0) +#endif + +/* Overridden by apps/blemesh (defined by @apache-mynewt-nimble/nimble/host/mesh) */ +#ifndef MYNEWT_VAL_BLE_MESH_DEBUG_BEACON +#define MYNEWT_VAL_BLE_MESH_DEBUG_BEACON (0) +#endif + +/* Overridden by apps/blemesh (defined by @apache-mynewt-nimble/nimble/host/mesh) */ +#ifndef MYNEWT_VAL_BLE_MESH_DEBUG_CRYPTO +#define MYNEWT_VAL_BLE_MESH_DEBUG_CRYPTO (0) +#endif + +/* Overridden by apps/blemesh (defined by @apache-mynewt-nimble/nimble/host/mesh) */ +#ifndef MYNEWT_VAL_BLE_MESH_DEBUG_FRIEND +#define MYNEWT_VAL_BLE_MESH_DEBUG_FRIEND (0) +#endif + +/* Overridden by apps/blemesh (defined by @apache-mynewt-nimble/nimble/host/mesh) */ +#ifndef MYNEWT_VAL_BLE_MESH_DEBUG_LOW_POWER +#define MYNEWT_VAL_BLE_MESH_DEBUG_LOW_POWER (0) +#endif + +/* Overridden by apps/blemesh (defined by @apache-mynewt-nimble/nimble/host/mesh) */ +#ifndef MYNEWT_VAL_BLE_MESH_DEBUG_MODEL +#define MYNEWT_VAL_BLE_MESH_DEBUG_MODEL (0) +#endif + +/* Overridden by apps/blemesh (defined by @apache-mynewt-nimble/nimble/host/mesh) */ +#ifndef MYNEWT_VAL_BLE_MESH_DEBUG_NET +#define MYNEWT_VAL_BLE_MESH_DEBUG_NET (0) +#endif + +/* Overridden by apps/blemesh (defined by @apache-mynewt-nimble/nimble/host/mesh) */ +#ifndef MYNEWT_VAL_BLE_MESH_DEBUG_PROV +#define MYNEWT_VAL_BLE_MESH_DEBUG_PROV (0) +#endif + +/* Overridden by apps/blemesh (defined by @apache-mynewt-nimble/nimble/host/mesh) */ +#ifndef MYNEWT_VAL_BLE_MESH_DEBUG_PROXY +#define MYNEWT_VAL_BLE_MESH_DEBUG_PROXY (0) +#endif + +#ifndef MYNEWT_VAL_BLE_MESH_DEBUG_SETTINGS +#define MYNEWT_VAL_BLE_MESH_DEBUG_SETTINGS (0) +#endif + +/* Overridden by apps/blemesh (defined by @apache-mynewt-nimble/nimble/host/mesh) */ +#ifndef MYNEWT_VAL_BLE_MESH_DEBUG_TRANS +#define MYNEWT_VAL_BLE_MESH_DEBUG_TRANS (0) +#endif + +#ifndef MYNEWT_VAL_BLE_MESH_DEVICE_NAME +#define MYNEWT_VAL_BLE_MESH_DEVICE_NAME ("nimble-mesh-node") +#endif + +#ifndef MYNEWT_VAL_BLE_MESH_DEV_UUID +#define MYNEWT_VAL_BLE_MESH_DEV_UUID (((uint8_t[16]){0x11, 0x22, 0})) +#endif + +#ifndef MYNEWT_VAL_BLE_MESH_FRIEND +#define MYNEWT_VAL_BLE_MESH_FRIEND (0) +#endif + +#ifndef MYNEWT_VAL_BLE_MESH_FRIEND_LPN_COUNT +#define MYNEWT_VAL_BLE_MESH_FRIEND_LPN_COUNT (2) +#endif + +#ifndef MYNEWT_VAL_BLE_MESH_FRIEND_QUEUE_SIZE +#define MYNEWT_VAL_BLE_MESH_FRIEND_QUEUE_SIZE (16) +#endif + +#ifndef MYNEWT_VAL_BLE_MESH_FRIEND_RECV_WIN +#define MYNEWT_VAL_BLE_MESH_FRIEND_RECV_WIN (255) +#endif + +#ifndef MYNEWT_VAL_BLE_MESH_FRIEND_SEG_RX +#define MYNEWT_VAL_BLE_MESH_FRIEND_SEG_RX (1) +#endif + +#ifndef MYNEWT_VAL_BLE_MESH_FRIEND_SUB_LIST_SIZE +#define MYNEWT_VAL_BLE_MESH_FRIEND_SUB_LIST_SIZE (3) +#endif + +#ifndef MYNEWT_VAL_BLE_MESH_GATT_PROXY +#define MYNEWT_VAL_BLE_MESH_GATT_PROXY (0) +#endif + +#ifndef MYNEWT_VAL_BLE_MESH_HEALTH_CLI +#define MYNEWT_VAL_BLE_MESH_HEALTH_CLI (0) +#endif + +#ifndef MYNEWT_VAL_BLE_MESH_IVU_DIVIDER +#define MYNEWT_VAL_BLE_MESH_IVU_DIVIDER (4) +#endif + +#ifndef MYNEWT_VAL_BLE_MESH_IV_UPDATE_TEST +#define MYNEWT_VAL_BLE_MESH_IV_UPDATE_TEST (0) +#endif + +#ifndef MYNEWT_VAL_BLE_MESH_LABEL_COUNT +#define MYNEWT_VAL_BLE_MESH_LABEL_COUNT (1) +#endif + +#ifndef MYNEWT_VAL_BLE_MESH_LOW_POWER +#define MYNEWT_VAL_BLE_MESH_LOW_POWER (0) +#endif + +#ifndef MYNEWT_VAL_BLE_MESH_LPN_AUTO +#define MYNEWT_VAL_BLE_MESH_LPN_AUTO (1) +#endif + +#ifndef MYNEWT_VAL_BLE_MESH_LPN_AUTO_TIMEOUT +#define MYNEWT_VAL_BLE_MESH_LPN_AUTO_TIMEOUT (15) +#endif + +#ifndef MYNEWT_VAL_BLE_MESH_LPN_ESTABLISHMENT +#define MYNEWT_VAL_BLE_MESH_LPN_ESTABLISHMENT (1) +#endif + +#ifndef MYNEWT_VAL_BLE_MESH_LPN_GROUPS +#define MYNEWT_VAL_BLE_MESH_LPN_GROUPS (10) +#endif + +#ifndef MYNEWT_VAL_BLE_MESH_LPN_INIT_POLL_TIMEOUT +#define MYNEWT_VAL_BLE_MESH_LPN_INIT_POLL_TIMEOUT (MYNEWT_VAL_BLE_MESH_LPN_POLL_TIMEOUT) +#endif + +#ifndef MYNEWT_VAL_BLE_MESH_LPN_MIN_QUEUE_SIZE +#define MYNEWT_VAL_BLE_MESH_LPN_MIN_QUEUE_SIZE (1) +#endif + +#ifndef MYNEWT_VAL_BLE_MESH_LPN_POLL_TIMEOUT +#define MYNEWT_VAL_BLE_MESH_LPN_POLL_TIMEOUT (300) +#endif + +#ifndef MYNEWT_VAL_BLE_MESH_LPN_RECV_DELAY +#define MYNEWT_VAL_BLE_MESH_LPN_RECV_DELAY (100) +#endif + +#ifndef MYNEWT_VAL_BLE_MESH_LPN_RECV_WIN_FACTOR +#define MYNEWT_VAL_BLE_MESH_LPN_RECV_WIN_FACTOR (0) +#endif + +#ifndef MYNEWT_VAL_BLE_MESH_LPN_RETRY_TIMEOUT +#define MYNEWT_VAL_BLE_MESH_LPN_RETRY_TIMEOUT (8) +#endif + +#ifndef MYNEWT_VAL_BLE_MESH_LPN_RSSI_FACTOR +#define MYNEWT_VAL_BLE_MESH_LPN_RSSI_FACTOR (0) +#endif + +#ifndef MYNEWT_VAL_BLE_MESH_LPN_SCAN_LATENCY +#define MYNEWT_VAL_BLE_MESH_LPN_SCAN_LATENCY (10) +#endif + +#ifndef MYNEWT_VAL_BLE_MESH_MODEL_GROUP_COUNT +#define MYNEWT_VAL_BLE_MESH_MODEL_GROUP_COUNT (1) +#endif + +#ifndef MYNEWT_VAL_BLE_MESH_MODEL_KEY_COUNT +#define MYNEWT_VAL_BLE_MESH_MODEL_KEY_COUNT (1) +#endif + +#ifndef MYNEWT_VAL_BLE_MESH_MSG_CACHE_SIZE +#define MYNEWT_VAL_BLE_MESH_MSG_CACHE_SIZE (10) +#endif + +#ifndef MYNEWT_VAL_BLE_MESH_NODE_ID_TIMEOUT +#define MYNEWT_VAL_BLE_MESH_NODE_ID_TIMEOUT (60) +#endif + +#ifndef MYNEWT_VAL_BLE_MESH_OOB_INPUT_ACTIONS +#define MYNEWT_VAL_BLE_MESH_OOB_INPUT_ACTIONS (((BT_MESH_NO_INPUT))) +#endif + +#ifndef MYNEWT_VAL_BLE_MESH_OOB_INPUT_SIZE +#define MYNEWT_VAL_BLE_MESH_OOB_INPUT_SIZE (4) +#endif + +#ifndef MYNEWT_VAL_BLE_MESH_OOB_OUTPUT_ACTIONS +#define MYNEWT_VAL_BLE_MESH_OOB_OUTPUT_ACTIONS (((BT_MESH_DISPLAY_NUMBER))) +#endif + +#ifndef MYNEWT_VAL_BLE_MESH_OOB_OUTPUT_SIZE +#define MYNEWT_VAL_BLE_MESH_OOB_OUTPUT_SIZE (4) +#endif + +#ifndef MYNEWT_VAL_BLE_MESH_PB_ADV +#define MYNEWT_VAL_BLE_MESH_PB_ADV (1) +#endif + +#ifndef MYNEWT_VAL_BLE_MESH_PB_GATT +#define MYNEWT_VAL_BLE_MESH_PB_GATT (1) +#endif + +/* Overridden by @apache-mynewt-nimble/nimble/host/mesh (defined by @apache-mynewt-nimble/nimble/host/mesh) */ +#ifndef MYNEWT_VAL_BLE_MESH_PROV +#define MYNEWT_VAL_BLE_MESH_PROV (0) +#endif + +/* Overridden by @apache-mynewt-nimble/nimble/host/mesh (defined by @apache-mynewt-nimble/nimble/host/mesh) */ +#ifndef MYNEWT_VAL_BLE_MESH_PROXY +#define MYNEWT_VAL_BLE_MESH_PROXY (0) +#endif + +#ifndef MYNEWT_VAL_BLE_MESH_PROXY_FILTER_SIZE +#define MYNEWT_VAL_BLE_MESH_PROXY_FILTER_SIZE (1) +#endif + +#ifndef MYNEWT_VAL_BLE_MESH_RELAY +#define MYNEWT_VAL_BLE_MESH_RELAY (0) +#endif + +#ifndef MYNEWT_VAL_BLE_MESH_RPL_STORE_TIMEOUT +#define MYNEWT_VAL_BLE_MESH_RPL_STORE_TIMEOUT (5) +#endif + +#ifndef MYNEWT_VAL_BLE_MESH_RX_SDU_MAX +#define MYNEWT_VAL_BLE_MESH_RX_SDU_MAX (72) +#endif + +#ifndef MYNEWT_VAL_BLE_MESH_RX_SEG_MSG_COUNT +#define MYNEWT_VAL_BLE_MESH_RX_SEG_MSG_COUNT (2) +#endif + +#ifndef MYNEWT_VAL_BLE_MESH_SEQ_STORE_RATE +#define MYNEWT_VAL_BLE_MESH_SEQ_STORE_RATE (128) +#endif + +/* Overridden by apps/blemesh (defined by @apache-mynewt-nimble/nimble/host/mesh) */ +#ifndef MYNEWT_VAL_BLE_MESH_SETTINGS +#define MYNEWT_VAL_BLE_MESH_SETTINGS (0) +#endif + +#ifndef MYNEWT_VAL_BLE_MESH_SHELL +#define MYNEWT_VAL_BLE_MESH_SHELL (0) +#endif + +#ifndef MYNEWT_VAL_BLE_MESH_SHELL_MODELS +#define MYNEWT_VAL_BLE_MESH_SHELL_MODELS (0) +#endif + +#ifndef MYNEWT_VAL_BLE_MESH_STORE_TIMEOUT +#define MYNEWT_VAL_BLE_MESH_STORE_TIMEOUT (2) +#endif + +#ifndef MYNEWT_VAL_BLE_MESH_SUBNET_COUNT +#define MYNEWT_VAL_BLE_MESH_SUBNET_COUNT (1) +#endif + +#ifndef MYNEWT_VAL_BLE_MESH_TESTING +#define MYNEWT_VAL_BLE_MESH_TESTING (0) +#endif + +/* Overridden by apps/blemesh (defined by @apache-mynewt-nimble/nimble/host/mesh) */ +#ifndef MYNEWT_VAL_BLE_MESH_TX_SEG_MAX +#define MYNEWT_VAL_BLE_MESH_TX_SEG_MAX (6) +#endif + +#ifndef MYNEWT_VAL_BLE_MESH_TX_SEG_MSG_COUNT +#define MYNEWT_VAL_BLE_MESH_TX_SEG_MSG_COUNT (4) +#endif + +#ifndef MYNEWT_VAL_BLE_SVC_BAS_SYSINIT_STAGE +#define MYNEWT_VAL_BLE_SVC_BAS_SYSINIT_STAGE (303) +#endif + +/*** @apache-mynewt-nimble/nimble/host/services/dis */ +#ifndef MYNEWT_VAL_BLE_SVC_DIS_DEFAULT_READ_PERM +#define MYNEWT_VAL_BLE_SVC_DIS_DEFAULT_READ_PERM (-1) +#endif + +#ifndef MYNEWT_VAL_BLE_SVC_DIS_FIRMWARE_REVISION_DEFAULT +#define MYNEWT_VAL_BLE_SVC_DIS_FIRMWARE_REVISION_DEFAULT (NULL) +#endif + +/* Value copied from BLE_SVC_DIS_DEFAULT_READ_PERM */ +#ifndef MYNEWT_VAL_BLE_SVC_DIS_FIRMWARE_REVISION_READ_PERM +#define MYNEWT_VAL_BLE_SVC_DIS_FIRMWARE_REVISION_READ_PERM (-1) +#endif + +#ifndef MYNEWT_VAL_BLE_SVC_DIS_HARDWARE_REVISION_DEFAULT +#define MYNEWT_VAL_BLE_SVC_DIS_HARDWARE_REVISION_DEFAULT (NULL) +#endif + +/* Value copied from BLE_SVC_DIS_DEFAULT_READ_PERM */ +#ifndef MYNEWT_VAL_BLE_SVC_DIS_HARDWARE_REVISION_READ_PERM +#define MYNEWT_VAL_BLE_SVC_DIS_HARDWARE_REVISION_READ_PERM (-1) +#endif + +#ifndef MYNEWT_VAL_BLE_SVC_DIS_MANUFACTURER_NAME_DEFAULT +#define MYNEWT_VAL_BLE_SVC_DIS_MANUFACTURER_NAME_DEFAULT (NULL) +#endif + +/* Value copied from BLE_SVC_DIS_DEFAULT_READ_PERM */ +#ifndef MYNEWT_VAL_BLE_SVC_DIS_MANUFACTURER_NAME_READ_PERM +#define MYNEWT_VAL_BLE_SVC_DIS_MANUFACTURER_NAME_READ_PERM (-1) +#endif + +#ifndef MYNEWT_VAL_BLE_SVC_DIS_MODEL_NUMBER_DEFAULT +#define MYNEWT_VAL_BLE_SVC_DIS_MODEL_NUMBER_DEFAULT "Apache Mynewt NimBLE" +#endif + +#ifndef MYNEWT_VAL_BLE_SVC_DIS_MODEL_NUMBER_READ_PERM +#define MYNEWT_VAL_BLE_SVC_DIS_MODEL_NUMBER_READ_PERM (0) +#endif + +#ifndef MYNEWT_VAL_BLE_SVC_DIS_SERIAL_NUMBER_DEFAULT +#define MYNEWT_VAL_BLE_SVC_DIS_SERIAL_NUMBER_DEFAULT (NULL) +#endif + +/* Value copied from BLE_SVC_DIS_DEFAULT_READ_PERM */ +#ifndef MYNEWT_VAL_BLE_SVC_DIS_SERIAL_NUMBER_READ_PERM +#define MYNEWT_VAL_BLE_SVC_DIS_SERIAL_NUMBER_READ_PERM (-1) +#endif + +#ifndef MYNEWT_VAL_BLE_SVC_DIS_SOFTWARE_REVISION_DEFAULT +#define MYNEWT_VAL_BLE_SVC_DIS_SOFTWARE_REVISION_DEFAULT (NULL) +#endif + +/* Value copied from BLE_SVC_DIS_DEFAULT_READ_PERM */ +#ifndef MYNEWT_VAL_BLE_SVC_DIS_SOFTWARE_REVISION_READ_PERM +#define MYNEWT_VAL_BLE_SVC_DIS_SOFTWARE_REVISION_READ_PERM (-1) +#endif + +#ifndef MYNEWT_VAL_BLE_SVC_DIS_SYSINIT_STAGE +#define MYNEWT_VAL_BLE_SVC_DIS_SYSINIT_STAGE (303) +#endif + +#ifndef MYNEWT_VAL_BLE_SVC_DIS_SYSTEM_ID_DEFAULT +#define MYNEWT_VAL_BLE_SVC_DIS_SYSTEM_ID_DEFAULT (NULL) +#endif + +#ifndef MYNEWT_VAL_BLE_SVC_DIS_PNP_ID_DEFAULT +#define MYNEWT_VAL_BLE_SVC_DIS_PNP_ID_DEFAULT (NULL) +#endif + +/* Value copied from BLE_SVC_DIS_DEFAULT_READ_PERM */ +#ifndef MYNEWT_VAL_BLE_SVC_DIS_SYSTEM_ID_READ_PERM +#define MYNEWT_VAL_BLE_SVC_DIS_SYSTEM_ID_READ_PERM (-1) +#endif + +/* Value copied from BLE_SVC_DIS_DEFAULT_READ_PERM */ +#ifndef MYNEWT_VAL_BLE_SVC_DIS_PNP_ID_READ_PERM +#define MYNEWT_VAL_BLE_SVC_DIS_PNP_ID_READ_PERM (-1) +#endif + +/*** @apache-mynewt-nimble/nimble/host/services/gap */ +#ifndef MYNEWT_VAL_BLE_SVC_GAP_APPEARANCE +#define MYNEWT_VAL_BLE_SVC_GAP_APPEARANCE (0) +#endif + +#ifndef MYNEWT_VAL_BLE_SVC_GAP_APPEARANCE_WRITE_PERM +#define MYNEWT_VAL_BLE_SVC_GAP_APPEARANCE_WRITE_PERM (-1) +#endif + +#ifndef MYNEWT_VAL_BLE_SVC_GAP_CENTRAL_ADDRESS_RESOLUTION +#define MYNEWT_VAL_BLE_SVC_GAP_CENTRAL_ADDRESS_RESOLUTION (-1) +#endif + +#ifndef MYNEWT_VAL_BLE_SVC_GAP_DEVICE_NAME +#define MYNEWT_VAL_BLE_SVC_GAP_DEVICE_NAME "nimble" +#endif + +#ifndef MYNEWT_VAL_BLE_SVC_GAP_DEVICE_NAME_MAX_LENGTH +#define MYNEWT_VAL_BLE_SVC_GAP_DEVICE_NAME_MAX_LENGTH (31) +#endif + +#ifndef MYNEWT_VAL_BLE_SVC_GAP_DEVICE_NAME_WRITE_PERM +#define MYNEWT_VAL_BLE_SVC_GAP_DEVICE_NAME_WRITE_PERM (-1) +#endif + +#ifndef MYNEWT_VAL_BLE_SVC_GAP_PPCP_MAX_CONN_INTERVAL +#define MYNEWT_VAL_BLE_SVC_GAP_PPCP_MAX_CONN_INTERVAL (0) +#endif + +#ifndef MYNEWT_VAL_BLE_SVC_GAP_PPCP_MIN_CONN_INTERVAL +#define MYNEWT_VAL_BLE_SVC_GAP_PPCP_MIN_CONN_INTERVAL (0) +#endif + +#ifndef MYNEWT_VAL_BLE_SVC_GAP_PPCP_SLAVE_LATENCY +#define MYNEWT_VAL_BLE_SVC_GAP_PPCP_SLAVE_LATENCY (0) +#endif + +#ifndef MYNEWT_VAL_BLE_SVC_GAP_PPCP_SUPERVISION_TMO +#define MYNEWT_VAL_BLE_SVC_GAP_PPCP_SUPERVISION_TMO (0) +#endif + +#ifndef MYNEWT_VAL_BLE_SVC_GAP_SYSINIT_STAGE +#define MYNEWT_VAL_BLE_SVC_GAP_SYSINIT_STAGE (301) +#endif + +/*** @apache-mynewt-nimble/nimble/host/services/gatt */ +#ifndef MYNEWT_VAL_BLE_SVC_GATT_SYSINIT_STAGE +#define MYNEWT_VAL_BLE_SVC_GATT_SYSINIT_STAGE (302) +#endif + +/*** @apache-mynewt-nimble/nimble/host/services/ias */ +#ifndef MYNEWT_VAL_BLE_SVC_IAS_SYSINIT_STAGE +#define MYNEWT_VAL_BLE_SVC_IAS_SYSINIT_STAGE (303) +#endif + +/*** @apache-mynewt-nimble/nimble/host/services/ipss */ +#ifndef MYNEWT_VAL_BLE_SVC_IPSS_SYSINIT_STAGE +#define MYNEWT_VAL_BLE_SVC_IPSS_SYSINIT_STAGE (303) +#endif + +/*** @apache-mynewt-nimble/nimble/host/services/lls */ +#ifndef MYNEWT_VAL_BLE_SVC_LLS_SYSINIT_STAGE +#define MYNEWT_VAL_BLE_SVC_LLS_SYSINIT_STAGE (303) +#endif + +/*** @apache-mynewt-nimble/nimble/host/services/tps */ +#ifndef MYNEWT_VAL_BLE_SVC_TPS_SYSINIT_STAGE +#define MYNEWT_VAL_BLE_SVC_TPS_SYSINIT_STAGE (303) +#endif + +/*** @apache-mynewt-nimble/nimble/transport */ +#undef MYNEWT_VAL_BLE_ACL_BUF_COUNT + +#undef MYNEWT_VAL_BLE_ACL_BUF_SIZE + +#undef MYNEWT_VAL_BLE_HCI_BRIDGE + +#undef MYNEWT_VAL_BLE_HCI_EVT_BUF_SIZE + +#undef MYNEWT_VAL_BLE_HCI_EVT_HI_BUF_COUNT + +#undef MYNEWT_VAL_BLE_HCI_EVT_LO_BUF_COUNT + +#undef MYNEWT_VAL_BLE_HCI_TRANSPORT + +#ifndef MYNEWT_VAL_BLE_MONITOR_CONSOLE_BUFFER_SIZE +#define MYNEWT_VAL_BLE_MONITOR_CONSOLE_BUFFER_SIZE (128) +#endif + +#ifndef MYNEWT_VAL_BLE_MONITOR_RTT +#define MYNEWT_VAL_BLE_MONITOR_RTT (0) +#endif + +#ifndef MYNEWT_VAL_BLE_MONITOR_RTT_BUFFERED +#define MYNEWT_VAL_BLE_MONITOR_RTT_BUFFERED (1) +#endif + +#ifndef MYNEWT_VAL_BLE_MONITOR_RTT_BUFFER_NAME +#define MYNEWT_VAL_BLE_MONITOR_RTT_BUFFER_NAME "btmonitor" +#endif + +#ifndef MYNEWT_VAL_BLE_MONITOR_RTT_BUFFER_SIZE +#define MYNEWT_VAL_BLE_MONITOR_RTT_BUFFER_SIZE (256) +#endif + +#ifndef MYNEWT_VAL_BLE_MONITOR_UART +#define MYNEWT_VAL_BLE_MONITOR_UART (0) +#endif + +#ifndef MYNEWT_VAL_BLE_MONITOR_UART_BAUDRATE +#define MYNEWT_VAL_BLE_MONITOR_UART_BAUDRATE (1000000) +#endif + +#ifndef MYNEWT_VAL_BLE_MONITOR_UART_BUFFER_SIZE +#define MYNEWT_VAL_BLE_MONITOR_UART_BUFFER_SIZE (64) +#endif + +#ifndef MYNEWT_VAL_BLE_MONITOR_UART_DEV +#define MYNEWT_VAL_BLE_MONITOR_UART_DEV "uart0" +#endif + +#ifndef MYNEWT_VAL_BLE_TRANSPORT +#define MYNEWT_VAL_BLE_TRANSPORT (1) +#endif + +#ifndef MYNEWT_VAL_BLE_TRANSPORT_ACL_COUNT +#define MYNEWT_VAL_BLE_TRANSPORT_ACL_COUNT (10) +#endif + +/* Value copied from BLE_TRANSPORT_ACL_COUNT */ +#ifndef MYNEWT_VAL_BLE_TRANSPORT_ACL_FROM_HS_COUNT +#define MYNEWT_VAL_BLE_TRANSPORT_ACL_FROM_HS_COUNT (10) +#endif + +/* Value copied from BLE_TRANSPORT_ACL_COUNT */ +#ifndef MYNEWT_VAL_BLE_TRANSPORT_ACL_FROM_LL_COUNT +#define MYNEWT_VAL_BLE_TRANSPORT_ACL_FROM_LL_COUNT (10) +#endif + +#ifndef MYNEWT_VAL_BLE_TRANSPORT_ACL_SIZE +#define MYNEWT_VAL_BLE_TRANSPORT_ACL_SIZE (251) +#endif + +#ifndef MYNEWT_VAL_BLE_TRANSPORT_EVT_COUNT +#define MYNEWT_VAL_BLE_TRANSPORT_EVT_COUNT (4) +#endif + +#ifndef MYNEWT_VAL_BLE_HCI_EVT_HI_BUF_COUNT +#define MYNEWT_VAL_BLE_HCI_EVT_HI_BUF_COUNT (30) +#endif + +#ifndef MYNEWT_VAL_BLE_TRANSPORT_EVT_DISCARDABLE_COUNT +#define MYNEWT_VAL_BLE_TRANSPORT_EVT_DISCARDABLE_COUNT (16) +#endif + +#ifndef MYNEWT_VAL_BLE_TRANSPORT_EVT_SIZE +#define MYNEWT_VAL_BLE_TRANSPORT_EVT_SIZE (70) +#endif + +#ifndef MYNEWT_VAL_BLE_TRANSPORT_HS__cdc +#define MYNEWT_VAL_BLE_TRANSPORT_HS__cdc (0) +#endif +#ifndef MYNEWT_VAL_BLE_TRANSPORT_HS__custom +#define MYNEWT_VAL_BLE_TRANSPORT_HS__custom (0) +#endif +#ifndef MYNEWT_VAL_BLE_TRANSPORT_HS__dialog_cmac +#define MYNEWT_VAL_BLE_TRANSPORT_HS__dialog_cmac (0) +#endif +#ifndef MYNEWT_VAL_BLE_TRANSPORT_HS__native +#define MYNEWT_VAL_BLE_TRANSPORT_HS__native (1) +#endif +#ifndef MYNEWT_VAL_BLE_TRANSPORT_HS__nrf5340 +#define MYNEWT_VAL_BLE_TRANSPORT_HS__nrf5340 (0) +#endif +#ifndef MYNEWT_VAL_BLE_TRANSPORT_HS__uart +#define MYNEWT_VAL_BLE_TRANSPORT_HS__uart (0) +#endif +#ifndef MYNEWT_VAL_BLE_TRANSPORT_HS__usb +#define MYNEWT_VAL_BLE_TRANSPORT_HS__usb (0) +#endif +#ifndef MYNEWT_VAL_BLE_TRANSPORT_HS +#define MYNEWT_VAL_BLE_TRANSPORT_HS (1) +#endif + +/* Overridden by @apache-mynewt-nimble/porting/targets/porting_default (defined by @apache-mynewt-nimble/nimble/transport) */ +#ifndef MYNEWT_VAL_BLE_TRANSPORT_LL__apollo3 +#define MYNEWT_VAL_BLE_TRANSPORT_LL__apollo3 (0) +#endif +#ifndef MYNEWT_VAL_BLE_TRANSPORT_LL__custom +#define MYNEWT_VAL_BLE_TRANSPORT_LL__custom (0) +#endif +#ifndef MYNEWT_VAL_BLE_TRANSPORT_LL__dialog_cmac +#define MYNEWT_VAL_BLE_TRANSPORT_LL__dialog_cmac (0) +#endif +#ifndef MYNEWT_VAL_BLE_TRANSPORT_LL__emspi +#define MYNEWT_VAL_BLE_TRANSPORT_LL__emspi (0) +#endif +#ifndef MYNEWT_VAL_BLE_TRANSPORT_LL__native +#define MYNEWT_VAL_BLE_TRANSPORT_LL__native (0) +#endif +#ifndef MYNEWT_VAL_BLE_TRANSPORT_LL__nrf5340 +#define MYNEWT_VAL_BLE_TRANSPORT_LL__nrf5340 (0) +#endif +#ifndef MYNEWT_VAL_BLE_TRANSPORT_LL__socket +#define MYNEWT_VAL_BLE_TRANSPORT_LL__socket (1) +#endif +#ifndef MYNEWT_VAL_BLE_TRANSPORT_LL +#define MYNEWT_VAL_BLE_TRANSPORT_LL (1) +#endif + +/*** @apache-mynewt-nimble/nimble/transport/socket */ +#ifndef MYNEWT_VAL_BLE_SOCK_CLI_SYSINIT_STAGE +#define MYNEWT_VAL_BLE_SOCK_CLI_SYSINIT_STAGE (500) +#endif + +#ifndef MYNEWT_VAL_BLE_SOCK_LINUX_DEV +#define MYNEWT_VAL_BLE_SOCK_LINUX_DEV (0) +#endif + +#ifndef MYNEWT_VAL_BLE_SOCK_STACK_SIZE +#define MYNEWT_VAL_BLE_SOCK_STACK_SIZE (80) +#endif + +#ifndef MYNEWT_VAL_BLE_SOCK_TASK_PRIO +#define MYNEWT_VAL_BLE_SOCK_TASK_PRIO (9) +#endif + +#ifndef MYNEWT_VAL_BLE_SOCK_TCP_PORT +#define MYNEWT_VAL_BLE_SOCK_TCP_PORT (14433) +#endif + +/* Overridden by @apache-mynewt-nimble/porting/targets/porting_default (defined by @apache-mynewt-nimble/nimble/transport/socket) */ +#ifndef MYNEWT_VAL_BLE_SOCK_USE_LINUX_BLUE +#define MYNEWT_VAL_BLE_SOCK_USE_LINUX_BLUE (1) +#endif + +#ifndef MYNEWT_VAL_BLE_SOCK_USE_NUTTX +#define MYNEWT_VAL_BLE_SOCK_USE_NUTTX (0) +#endif + +/* Overridden by @apache-mynewt-nimble/porting/targets/porting_default (defined by @apache-mynewt-nimble/nimble/transport/socket) */ +#ifndef MYNEWT_VAL_BLE_SOCK_USE_TCP +#define MYNEWT_VAL_BLE_SOCK_USE_TCP (0) +#endif + +/*** newt */ +#ifndef MYNEWT_VAL_APP_NAME +#define MYNEWT_VAL_APP_NAME "dummy_app" +#endif + +#ifndef MYNEWT_VAL_APP_dummy_app +#define MYNEWT_VAL_APP_dummy_app (1) +#endif + +#ifndef MYNEWT_VAL_ARCH_NAME +#define MYNEWT_VAL_ARCH_NAME "sim" +#endif + +#ifndef MYNEWT_VAL_ARCH_sim +#define MYNEWT_VAL_ARCH_sim (1) +#endif + +#ifndef MYNEWT_VAL_BSP_NAME +#define MYNEWT_VAL_BSP_NAME "native" +#endif + +#ifndef MYNEWT_VAL_BSP_native +#define MYNEWT_VAL_BSP_native (1) +#endif + +#ifndef MYNEWT_VAL_NEWT_FEATURE_LOGCFG +#define MYNEWT_VAL_NEWT_FEATURE_LOGCFG (1) +#endif + +#ifndef MYNEWT_VAL_NEWT_FEATURE_SYSDOWN +#define MYNEWT_VAL_NEWT_FEATURE_SYSDOWN (1) +#endif + +#ifndef MYNEWT_VAL_TARGET_NAME +#define MYNEWT_VAL_TARGET_NAME "porting_default" +#endif + +#ifndef MYNEWT_VAL_TARGET_porting_default +#define MYNEWT_VAL_TARGET_porting_default (1) +#endif + +#ifndef MYNEWT_VAL_BLE_LL_ROLE_BROADCASTER +#define MYNEWT_VAL_BLE_LL_ROLE_BROADCASTER MYNEWT_VAL_BLE_ROLE_BROADCASTER +#endif + +#ifndef MYNEWT_VAL_BLE_LL_ROLE_CENTRAL +#define MYNEWT_VAL_BLE_LL_ROLE_CENTRAL MYNEWT_VAL_BLE_ROLE_CENTRAL +#endif + +#ifndef MYNEWT_VAL_BLE_LL_ROLE_OBSERVER +#define MYNEWT_VAL_BLE_LL_ROLE_OBSERVER MYNEWT_VAL_BLE_ROLE_OBSERVER +#endif + +#ifndef MYNEWT_VAL_BLE_LL_ROLE_PERIPHERAL +#define MYNEWT_VAL_BLE_LL_ROLE_PERIPHERAL MYNEWT_VAL_BLE_ROLE_PERIPHERAL +#endif + +#ifndef MYNEWT_VAL_BLE_MESH_NET_BUF_USER_DATA_SIZE +#define MYNEWT_VAL_BLE_MESH_NET_BUF_USER_DATA_SIZE (4) +#endif + +#ifndef MYNEWT_VAL_BLE_MESH_MODEL_VND_MSG_CID_FORCE +#define MYNEWT_VAL_BLE_MESH_MODEL_VND_MSG_CID_FORCE (1) +#endif + +#ifndef MYNEWT_VAL_BLE_MESH_ACCESS_LAYER_MSG +#define MYNEWT_VAL_BLE_MESH_ACCESS_LAYER_MSG (1) +#endif + +#ifndef MYNEWT_VAL_BLE_MESH_CDB +#define MYNEWT_VAL_BLE_MESH_CDB (0) +#endif + +#ifndef MYNEWT_VAL_BLE_MESH_DEFAULT_TTL +#define MYNEWT_VAL_BLE_MESH_DEFAULT_TTL (7) +#endif + +#ifndef MYNEWT_VAL_BLE_MESH_UNPROV_BEACON_INT +#define MYNEWT_VAL_BLE_MESH_UNPROV_BEACON_INT (5) +#endif + +#ifndef MYNEWT_VAL_BLE_MESH_NETWORK_TRANSMIT_COUNT +#define MYNEWT_VAL_BLE_MESH_NETWORK_TRANSMIT_COUNT (2) +#endif + +#ifndef MYNEWT_VAL_BLE_MESH_NETWORK_TRANSMIT_INTERVAL +#define MYNEWT_VAL_BLE_MESH_NETWORK_TRANSMIT_INTERVAL (20) +#endif + +#ifndef MYNEWT_VAL_BLE_MESH_RELAY_RETRANSMIT_COUNT +#define MYNEWT_VAL_BLE_MESH_RELAY_RETRANSMIT_COUNT (2) +#endif + +#ifndef MYNEWT_VAL_BLE_MESH_RELAY_RETRANSMIT_INTERVAL +#define MYNEWT_VAL_BLE_MESH_RELAY_RETRANSMIT_INTERVAL (20) +#endif + +#ifndef MYNEWT_VAL_BLE_MESH_RELAY_ENABLED +#define MYNEWT_VAL_BLE_MESH_RELAY_ENABLED (1) +#endif + +#ifndef MYNEWT_VAL_BLE_MESH_BEACON_ENABLED +#define MYNEWT_VAL_BLE_MESH_BEACON_ENABLED (1) +#endif + +#ifndef MYNEWT_VAL_BLE_MESH_GATT_PROXY_ENABLED +#define MYNEWT_VAL_BLE_MESH_GATT_PROXY_ENABLED (1) +#endif + +#ifndef MYNEWT_VAL_BLE_MESH_FRIEND_ENABLED +#define MYNEWT_VAL_BLE_MESH_FRIEND_ENABLED (1) +#endif + +#ifndef MYNEWT_VAL_BLE_MESH_LPN_SUB_ALL_NODES_ADDR +#define MYNEWT_VAL_BLE_MESH_LPN_SUB_ALL_NODES_ADDR (0) +#endif + +#ifndef MYNEWT_VAL_BLE_MESH_LOOPBACK_BUFS +#define MYNEWT_VAL_BLE_MESH_LOOPBACK_BUFS (3) +#endif + +#ifndef MYNEWT_VAL_BLE_MESH_IV_UPDATE_SEQ_LIMIT +#define MYNEWT_VAL_BLE_MESH_IV_UPDATE_SEQ_LIMIT (0x800000) +#endif + +#ifndef MYNEWT_VAL_BLE_MESH_PB_ADV_RETRANS_TIMEOUT +#define MYNEWT_VAL_BLE_MESH_PB_ADV_RETRANS_TIMEOUT (500) +#endif + +#ifndef MYNEWT_VAL_BLE_MESH_PROV_OOB_PUBLIC_KEY +#define MYNEWT_VAL_BLE_MESH_PROV_OOB_PUBLIC_KEY (0) +#endif + +#ifndef MYNEWT_VAL_BLE_MESH_RX_SEG_MAX +#define MYNEWT_VAL_BLE_MESH_RX_SEG_MAX (3) +#endif + +#ifndef MYNEWT_VAL_BLE_MESH_SEG_BUFS +#define MYNEWT_VAL_BLE_MESH_SEG_BUFS (64) +#endif + +#ifndef MYNEWT_VAL_BLE_MESH_TX_SEG_RETRANS_TIMEOUT_UNICAST +#define MYNEWT_VAL_BLE_MESH_TX_SEG_RETRANS_TIMEOUT_UNICAST (400) +#endif + +#ifndef MYNEWT_VAL_BLE_MESH_TX_SEG_RETRANS_TIMEOUT_GROUP +#define MYNEWT_VAL_BLE_MESH_TX_SEG_RETRANS_TIMEOUT_GROUP (50) +#endif + +/*espressif added configs*/ +#ifndef MYNEWT_VAL_BLE_GATT_CSFC_SIZE +#define MYNEWT_VAL_BLE_GATT_CSFC_SIZE (1) +#endif + +#ifndef MYNEWT_VAL_OS_MEMPOOL_GUARD +#define MYNEWT_VAL_OS_MEMPOOL_GUARD (0) +#endif + +#ifndef MYNEWT_VAL_BLE_LL_CFG_FEAT_LL_PRIVACY +#define MYNEWT_VAL_BLE_LL_CFG_FEAT_LL_PRIVACY (1) +#endif + +#ifndef MYNEWT_VAL_BLE_LL_CFG_FEAT_LL_EXT_ADV +#define MYNEWT_VAL_BLE_LL_CFG_FEAT_LL_EXT_ADV (MYNEWT_VAL_BLE_EXT_ADV) +#endif + +#ifndef MYNEWT_VAL_BLE_MESH_PROVISIONER +#define MYNEWT_VAL_BLE_MESH_PROVISIONER (0) +#endif + +#ifndef MYNEWT_VAL_BLE_GATT_CACHING +#define MYNEWT_VAL_BLE_GATT_CACHING (0) +#endif + +#ifndef MYNEWT_VAL_BLE_STORE_MAX_CSFCS +#define MYNEWT_VAL_BLE_STORE_MAX_CSFCS (MYNEWT_VAL_BLE_MAX_CONNECTIONS) +#endif + +#endif