Skip to content

Commit 591c438

Browse files
RE: Change check for BT_ENABLE to really be a check for BLUEDROID_ENABLED (espressif#4497)
* Change check for CONFIG_BT_ENABLE to really be a check for CONFIG_BLUEDROID_ENABLED Which is really what should have been tested. This allows use of the Arduino layer with the newer Nimble stack for those that don't want to use Bluedroid. In support of meshtastic/firmware#266 * Change check for CONFIG_BT_ENABLE to really be a check for CONFIG_BLUEDROID_ENABLED Which is really what should have been tested. This allows use of the Arduino layer with the newer Nimble stack for those that don't want to use Bluedroid. In support of meshtastic/firmware#266 * wifi prov changes * merge fixes Co-authored-by: geeksville <[email protected]>
1 parent 8767419 commit 591c438

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+95
-96
lines changed

libraries/BLE/src/BLE2902.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* https://www.bluetooth.com/specifications/gatt/viewer?attributeXmlFile=org.bluetooth.descriptor.gatt.client_characteristic_configuration.xml
1111
*/
1212
#include "sdkconfig.h"
13-
#if defined(CONFIG_BT_ENABLED)
13+
#if defined(CONFIG_BLUEDROID_ENABLED)
1414

1515
#include "BLE2902.h"
1616

libraries/BLE/src/BLE2902.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#ifndef COMPONENTS_CPP_UTILS_BLE2902_H_
99
#define COMPONENTS_CPP_UTILS_BLE2902_H_
1010
#include "sdkconfig.h"
11-
#if defined(CONFIG_BT_ENABLED)
11+
#if defined(CONFIG_BLUEDROID_ENABLED)
1212

1313
#include "BLEDescriptor.h"
1414

@@ -30,5 +30,5 @@ class BLE2902: public BLEDescriptor {
3030

3131
}; // BLE2902
3232

33-
#endif /* CONFIG_BT_ENABLED */
33+
#endif /* CONFIG_BLUEDROID_ENABLED */
3434
#endif /* COMPONENTS_CPP_UTILS_BLE2902_H_ */

libraries/BLE/src/BLE2904.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* https://www.bluetooth.com/specifications/gatt/viewer?attributeXmlFile=org.bluetooth.descriptor.gatt.characteristic_presentation_format.xml
1111
*/
1212
#include "sdkconfig.h"
13-
#if defined(CONFIG_BT_ENABLED)
13+
#if defined(CONFIG_BLUEDROID_ENABLED)
1414

1515
#include "BLE2904.h"
1616

libraries/BLE/src/BLE2904.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#ifndef COMPONENTS_CPP_UTILS_BLE2904_H_
99
#define COMPONENTS_CPP_UTILS_BLE2904_H_
1010
#include "sdkconfig.h"
11-
#if defined(CONFIG_BT_ENABLED)
11+
#if defined(CONFIG_BLUEDROID_ENABLED)
1212

1313
#include "BLEDescriptor.h"
1414

@@ -70,5 +70,5 @@ class BLE2904: public BLEDescriptor {
7070
BLE2904_Data m_data;
7171
}; // BLE2904
7272

73-
#endif /* CONFIG_BT_ENABLED */
73+
#endif /* CONFIG_BLUEDROID_ENABLED */
7474
#endif /* COMPONENTS_CPP_UTILS_BLE2904_H_ */

libraries/BLE/src/BLEAddress.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* Author: kolban
66
*/
77
#include "sdkconfig.h"
8-
#if defined(CONFIG_BT_ENABLED)
8+
#if defined(CONFIG_BLUEDROID_ENABLED)
99

1010
#include "BLEAddress.h"
1111
#include <string>

libraries/BLE/src/BLEAddress.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#ifndef COMPONENTS_CPP_UTILS_BLEADDRESS_H_
99
#define COMPONENTS_CPP_UTILS_BLEADDRESS_H_
1010
#include "sdkconfig.h"
11-
#if defined(CONFIG_BT_ENABLED)
11+
#if defined(CONFIG_BLUEDROID_ENABLED)
1212
#include <esp_gap_ble_api.h> // ESP32 BLE
1313
#include <string>
1414

@@ -30,5 +30,5 @@ class BLEAddress {
3030
esp_bd_addr_t m_address;
3131
};
3232

33-
#endif /* CONFIG_BT_ENABLED */
33+
#endif /* CONFIG_BLUEDROID_ENABLED */
3434
#endif /* COMPONENTS_CPP_UTILS_BLEADDRESS_H_ */

libraries/BLE/src/BLEAdvertisedDevice.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
* Author: kolban
1313
*/
1414
#include "sdkconfig.h"
15-
#if defined(CONFIG_BT_ENABLED)
15+
#if defined(CONFIG_BLUEDROID_ENABLED)
1616
#include <sstream>
1717
#include "BLEAdvertisedDevice.h"
1818
#include "BLEUtils.h"
@@ -571,5 +571,5 @@ size_t BLEAdvertisedDevice::getPayloadLength() {
571571
return m_payloadLength;
572572
}
573573

574-
#endif /* CONFIG_BT_ENABLED */
574+
#endif /* CONFIG_BLUEDROID_ENABLED */
575575

libraries/BLE/src/BLEAdvertisedDevice.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#ifndef COMPONENTS_CPP_UTILS_BLEADVERTISEDDEVICE_H_
99
#define COMPONENTS_CPP_UTILS_BLEADVERTISEDDEVICE_H_
1010
#include "sdkconfig.h"
11-
#if defined(CONFIG_BT_ENABLED)
11+
#if defined(CONFIG_BLUEDROID_ENABLED)
1212
#include <esp_gattc_api.h>
1313

1414
#include <map>
@@ -124,5 +124,5 @@ class BLEAdvertisedDeviceCallbacks {
124124
virtual void onResult(BLEAdvertisedDevice advertisedDevice) = 0;
125125
};
126126

127-
#endif /* CONFIG_BT_ENABLED */
127+
#endif /* CONFIG_BLUEDROID_ENABLED */
128128
#endif /* COMPONENTS_CPP_UTILS_BLEADVERTISEDDEVICE_H_ */

libraries/BLE/src/BLEAdvertising.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
*
1818
*/
1919
#include "sdkconfig.h"
20-
#if defined(CONFIG_BT_ENABLED)
20+
#if defined(CONFIG_BLUEDROID_ENABLED)
2121
#include "BLEAdvertising.h"
2222
#include <esp_err.h>
2323
#include "BLEUtils.h"
@@ -525,4 +525,4 @@ void BLEAdvertising::handleGAPEvent(
525525
}
526526

527527

528-
#endif /* CONFIG_BT_ENABLED */
528+
#endif /* CONFIG_BLUEDROID_ENABLED */

libraries/BLE/src/BLEAdvertising.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#ifndef COMPONENTS_CPP_UTILS_BLEADVERTISING_H_
99
#define COMPONENTS_CPP_UTILS_BLEADVERTISING_H_
1010
#include "sdkconfig.h"
11-
#if defined(CONFIG_BT_ENABLED)
11+
#if defined(CONFIG_BLUEDROID_ENABLED)
1212
#include <esp_gap_ble_api.h>
1313
#include "BLEUUID.h"
1414
#include <vector>
@@ -77,5 +77,5 @@ class BLEAdvertising {
7777
bool m_scanResp = true;
7878

7979
};
80-
#endif /* CONFIG_BT_ENABLED */
80+
#endif /* CONFIG_BLUEDROID_ENABLED */
8181
#endif /* COMPONENTS_CPP_UTILS_BLEADVERTISING_H_ */

libraries/BLE/src/BLEBeacon.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* Author: kolban
66
*/
77
#include "sdkconfig.h"
8-
#if defined(CONFIG_BT_ENABLED)
8+
#if defined(CONFIG_BLUEDROID_ENABLED)
99
#include <string.h>
1010
#include "BLEBeacon.h"
1111
#include "esp32-hal-log.h"

libraries/BLE/src/BLECharacteristic.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* Author: kolban
66
*/
77
#include "sdkconfig.h"
8-
#if defined(CONFIG_BT_ENABLED)
8+
#if defined(CONFIG_BLUEDROID_ENABLED)
99
#include <sstream>
1010
#include <string.h>
1111
#include <iomanip>
@@ -800,4 +800,4 @@ void BLECharacteristicCallbacks::onStatus(BLECharacteristic* pCharacteristic, St
800800
} // onStatus
801801

802802

803-
#endif /* CONFIG_BT_ENABLED */
803+
#endif /* CONFIG_BLUEDROID_ENABLED */

libraries/BLE/src/BLECharacteristic.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#ifndef COMPONENTS_CPP_UTILS_BLECHARACTERISTIC_H_
99
#define COMPONENTS_CPP_UTILS_BLECHARACTERISTIC_H_
1010
#include "sdkconfig.h"
11-
#if defined(CONFIG_BT_ENABLED)
11+
#if defined(CONFIG_BLUEDROID_ENABLED)
1212
#include <string>
1313
#include <map>
1414
#include "BLEUUID.h"
@@ -150,5 +150,5 @@ class BLECharacteristicCallbacks {
150150
virtual void onNotify(BLECharacteristic* pCharacteristic);
151151
virtual void onStatus(BLECharacteristic* pCharacteristic, Status s, uint32_t code);
152152
};
153-
#endif /* CONFIG_BT_ENABLED */
153+
#endif /* CONFIG_BLUEDROID_ENABLED */
154154
#endif /* COMPONENTS_CPP_UTILS_BLECHARACTERISTIC_H_ */

libraries/BLE/src/BLECharacteristicMap.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* Author: kolban
66
*/
77
#include "sdkconfig.h"
8-
#if defined(CONFIG_BT_ENABLED)
8+
#if defined(CONFIG_BLUEDROID_ENABLED)
99
#include <sstream>
1010
#include <iomanip>
1111
#include "BLEService.h"
@@ -131,4 +131,4 @@ std::string BLECharacteristicMap::toString() {
131131
} // toString
132132

133133

134-
#endif /* CONFIG_BT_ENABLED */
134+
#endif /* CONFIG_BLUEDROID_ENABLED */

libraries/BLE/src/BLEClient.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* Author: kolban
66
*/
77
#include "sdkconfig.h"
8-
#if defined(CONFIG_BT_ENABLED)
8+
#if defined(CONFIG_BLUEDROID_ENABLED)
99
#include <esp_bt.h>
1010
#include <esp_bt_main.h>
1111
#include <esp_gap_ble_api.h>
@@ -535,4 +535,4 @@ std::string BLEClient::toString() {
535535
} // toString
536536

537537

538-
#endif // CONFIG_BT_ENABLED
538+
#endif // CONFIG_BLUEDROID_ENABLED

libraries/BLE/src/BLEClient.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#define MAIN_BLEDEVICE_H_
1010

1111
#include "sdkconfig.h"
12-
#if defined(CONFIG_BT_ENABLED)
12+
#if defined(CONFIG_BLUEDROID_ENABLED)
1313

1414
#include <esp_gattc_api.h>
1515
#include <string.h>
@@ -99,5 +99,5 @@ class BLEClientCallbacks {
9999
virtual void onDisconnect(BLEClient *pClient) = 0;
100100
};
101101

102-
#endif // CONFIG_BT_ENABLED
102+
#endif // CONFIG_BLUEDROID_ENABLED
103103
#endif /* MAIN_BLEDEVICE_H_ */

libraries/BLE/src/BLEDescriptor.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* Author: kolban
66
*/
77
#include "sdkconfig.h"
8-
#if defined(CONFIG_BT_ENABLED)
8+
#if defined(CONFIG_BLUEDROID_ENABLED)
99
#include <sstream>
1010
#include <string.h>
1111
#include <iomanip>
@@ -284,4 +284,4 @@ void BLEDescriptorCallbacks::onWrite(BLEDescriptor* pDescriptor) {
284284
} // onWrite
285285

286286

287-
#endif /* CONFIG_BT_ENABLED */
287+
#endif /* CONFIG_BLUEDROID_ENABLED */

libraries/BLE/src/BLEDescriptor.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#ifndef COMPONENTS_CPP_UTILS_BLEDESCRIPTOR_H_
99
#define COMPONENTS_CPP_UTILS_BLEDESCRIPTOR_H_
1010
#include "sdkconfig.h"
11-
#if defined(CONFIG_BT_ENABLED)
11+
#if defined(CONFIG_BLUEDROID_ENABLED)
1212
#include <string>
1313
#include "BLEUUID.h"
1414
#include "BLECharacteristic.h"
@@ -73,5 +73,5 @@ class BLEDescriptorCallbacks {
7373
virtual void onRead(BLEDescriptor* pDescriptor);
7474
virtual void onWrite(BLEDescriptor* pDescriptor);
7575
};
76-
#endif /* CONFIG_BT_ENABLED */
76+
#endif /* CONFIG_BLUEDROID_ENABLED */
7777
#endif /* COMPONENTS_CPP_UTILS_BLEDESCRIPTOR_H_ */

libraries/BLE/src/BLEDescriptorMap.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* Author: kolban
66
*/
77
#include "sdkconfig.h"
8-
#if defined(CONFIG_BT_ENABLED)
8+
#if defined(CONFIG_BLUEDROID_ENABLED)
99
#include <sstream>
1010
#include <iomanip>
1111
#include "BLECharacteristic.h"
@@ -145,4 +145,4 @@ BLEDescriptor* BLEDescriptorMap::getNext() {
145145
m_iterator++;
146146
return pRet;
147147
} // getNext
148-
#endif /* CONFIG_BT_ENABLED */
148+
#endif /* CONFIG_BLUEDROID_ENABLED */

libraries/BLE/src/BLEDevice.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* Author: kolban
66
*/
77
#include "sdkconfig.h"
8-
#if defined(CONFIG_BT_ENABLED)
8+
#if defined(CONFIG_BLUEDROID_ENABLED)
99
#include <freertos/FreeRTOS.h>
1010
#include <freertos/event_groups.h>
1111
#include <freertos/task.h>
@@ -669,4 +669,4 @@ void BLEDevice::setCustomGattsHandler(gatts_event_handler handler) {
669669
m_customGattsHandler = handler;
670670
}
671671

672-
#endif // CONFIG_BT_ENABLED
672+
#endif // CONFIG_BLUEDROID_ENABLED

libraries/BLE/src/BLEDevice.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#ifndef MAIN_BLEDevice_H_
99
#define MAIN_BLEDevice_H_
1010
#include "sdkconfig.h"
11-
#if defined(CONFIG_BT_ENABLED)
11+
#if defined(CONFIG_BLUEDROID_ENABLED)
1212
#include <esp_gap_ble_api.h> // ESP32 BLE
1313
#include <esp_gattc_api.h> // ESP32 BLE
1414
#include <map> // Part of C++ STL
@@ -96,5 +96,5 @@ class BLEDevice {
9696

9797
}; // class BLE
9898

99-
#endif // CONFIG_BT_ENABLED
99+
#endif // CONFIG_BLUEDROID_ENABLED
100100
#endif /* MAIN_BLEDevice_H_ */

libraries/BLE/src/BLEEddystoneTLM.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
*
1111
*/
1212
#include "sdkconfig.h"
13-
#if defined(CONFIG_BT_ENABLED)
13+
#if defined(CONFIG_BLUEDROID_ENABLED)
1414
#include <string.h>
1515
#include <stdio.h>
1616
#include "esp32-hal-log.h"

libraries/BLE/src/BLEEddystoneURL.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* Author: pcbreflux
66
*/
77
#include "sdkconfig.h"
8-
#if defined(CONFIG_BT_ENABLED)
8+
#if defined(CONFIG_BLUEDROID_ENABLED)
99
#include <string.h>
1010
#include "esp32-hal-log.h"
1111
#include "BLEEddystoneURL.h"

libraries/BLE/src/BLEHIDDevice.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* Author: chegewara
66
*/
77
#include "sdkconfig.h"
8-
#if defined(CONFIG_BT_ENABLED)
8+
#if defined(CONFIG_BLUEDROID_ENABLED)
99

1010
#include "BLEHIDDevice.h"
1111
#include "BLE2904.h"
@@ -239,5 +239,5 @@ BLEService* BLEHIDDevice::batteryService() {
239239
return m_batteryService;
240240
}
241241

242-
#endif // CONFIG_BT_ENABLED
242+
#endif // CONFIG_BLUEDROID_ENABLED
243243

libraries/BLE/src/BLEHIDDevice.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#define _BLEHIDDEVICE_H_
1010

1111
#include "sdkconfig.h"
12-
#if defined(CONFIG_BT_ENABLED)
12+
#if defined(CONFIG_BLUEDROID_ENABLED)
1313

1414
#include "BLECharacteristic.h"
1515
#include "BLEService.h"
@@ -71,5 +71,5 @@ class BLEHIDDevice {
7171
BLECharacteristic* m_protocolModeCharacteristic; //0x2a4e
7272
BLECharacteristic* m_batteryLevelCharacteristic; //0x2a19
7373
};
74-
#endif // CONFIG_BT_ENABLED
74+
#endif // CONFIG_BLUEDROID_ENABLED
7575
#endif /* _BLEHIDDEVICE_H_ */

libraries/BLE/src/BLERemoteCharacteristic.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#include "BLERemoteCharacteristic.h"
99

1010
#include "sdkconfig.h"
11-
#if defined(CONFIG_BT_ENABLED)
11+
#if defined(CONFIG_BLUEDROID_ENABLED)
1212

1313
#include <esp_gattc_api.h>
1414
#include <esp_err.h>
@@ -613,4 +613,4 @@ void BLERemoteCharacteristic::setAuth(esp_gatt_auth_req_t auth) {
613613
m_auth = auth;
614614
}
615615

616-
#endif /* CONFIG_BT_ENABLED */
616+
#endif /* CONFIG_BLUEDROID_ENABLED */

libraries/BLE/src/BLERemoteCharacteristic.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#ifndef COMPONENTS_CPP_UTILS_BLEREMOTECHARACTERISTIC_H_
99
#define COMPONENTS_CPP_UTILS_BLEREMOTECHARACTERISTIC_H_
1010
#include "sdkconfig.h"
11-
#if defined(CONFIG_BT_ENABLED)
11+
#if defined(CONFIG_BLUEDROID_ENABLED)
1212

1313
#include <string>
1414

@@ -83,5 +83,5 @@ class BLERemoteCharacteristic {
8383
// We maintain a map of descriptors owned by this characteristic keyed by a string representation of the UUID.
8484
std::map<std::string, BLERemoteDescriptor*> m_descriptorMap;
8585
}; // BLERemoteCharacteristic
86-
#endif /* CONFIG_BT_ENABLED */
86+
#endif /* CONFIG_BLUEDROID_ENABLED */
8787
#endif /* COMPONENTS_CPP_UTILS_BLEREMOTECHARACTERISTIC_H_ */

libraries/BLE/src/BLERemoteDescriptor.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* Author: kolban
66
*/
77
#include "sdkconfig.h"
8-
#if defined(CONFIG_BT_ENABLED)
8+
#if defined(CONFIG_BLUEDROID_ENABLED)
99
#include <sstream>
1010
#include "BLERemoteDescriptor.h"
1111
#include "GeneralUtils.h"
@@ -201,4 +201,4 @@ void BLERemoteDescriptor::setAuth(esp_gatt_auth_req_t auth) {
201201
m_auth = auth;
202202
}
203203

204-
#endif /* CONFIG_BT_ENABLED */
204+
#endif /* CONFIG_BLUEDROID_ENABLED */

0 commit comments

Comments
 (0)