Skip to content

Commit 263a484

Browse files
committed
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
1 parent b7f106c commit 263a484

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

+99
-88
lines changed

Diff for: libraries/BLE/src/BLE2902.cpp

+1-1
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

Diff for: libraries/BLE/src/BLE2902.h

+2-2
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_ */

Diff for: libraries/BLE/src/BLE2904.cpp

+1-1
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

Diff for: libraries/BLE/src/BLE2904.h

+2-2
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_ */

Diff for: libraries/BLE/src/BLEAddress.cpp

+1-1
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>

Diff for: libraries/BLE/src/BLEAddress.h

+2-2
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_ */

Diff for: libraries/BLE/src/BLEAdvertisedDevice.cpp

+2-2
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"
@@ -562,5 +562,5 @@ size_t BLEAdvertisedDevice::getPayloadLength() {
562562
return m_payloadLength;
563563
}
564564

565-
#endif /* CONFIG_BT_ENABLED */
565+
#endif /* CONFIG_BLUEDROID_ENABLED */
566566

Diff for: libraries/BLE/src/BLEAdvertisedDevice.h

+2-2
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>
@@ -123,5 +123,5 @@ class BLEAdvertisedDeviceCallbacks {
123123
virtual void onResult(BLEAdvertisedDevice advertisedDevice) = 0;
124124
};
125125

126-
#endif /* CONFIG_BT_ENABLED */
126+
#endif /* CONFIG_BLUEDROID_ENABLED */
127127
#endif /* COMPONENTS_CPP_UTILS_BLEADVERTISEDDEVICE_H_ */

Diff for: libraries/BLE/src/BLEAdvertising.cpp

+2-2
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"
@@ -518,4 +518,4 @@ void BLEAdvertising::handleGAPEvent(
518518
}
519519

520520

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

Diff for: libraries/BLE/src/BLEAdvertising.h

+2-2
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>
@@ -76,5 +76,5 @@ class BLEAdvertising {
7676
bool m_scanResp = true;
7777

7878
};
79-
#endif /* CONFIG_BT_ENABLED */
79+
#endif /* CONFIG_BLUEDROID_ENABLED */
8080
#endif /* COMPONENTS_CPP_UTILS_BLEADVERTISING_H_ */

Diff for: libraries/BLE/src/BLEBeacon.cpp

+1-1
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"

Diff for: libraries/BLE/src/BLECharacteristic.cpp

+2-2
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 */

Diff for: libraries/BLE/src/BLECharacteristic.h

+2-2
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_ */

Diff for: libraries/BLE/src/BLECharacteristicMap.cpp

+2-2
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 */

Diff for: libraries/BLE/src/BLEClient.cpp

+2-2
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>
@@ -526,4 +526,4 @@ std::string BLEClient::toString() {
526526
} // toString
527527

528528

529-
#endif // CONFIG_BT_ENABLED
529+
#endif // CONFIG_BLUEDROID_ENABLED

Diff for: libraries/BLE/src/BLEClient.h

+2-2
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_ */

Diff for: libraries/BLE/src/BLEDescriptor.cpp

+2-2
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 */

Diff for: libraries/BLE/src/BLEDescriptor.h

+2-2
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_ */

Diff for: libraries/BLE/src/BLEDescriptorMap.cpp

+2-2
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 */

Diff for: libraries/BLE/src/BLEDevice.cpp

+2-2
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>
@@ -661,4 +661,4 @@ void BLEDevice::setCustomGattsHandler(gatts_event_handler handler) {
661661
m_customGattsHandler = handler;
662662
}
663663

664-
#endif // CONFIG_BT_ENABLED
664+
#endif // CONFIG_BLUEDROID_ENABLED

Diff for: libraries/BLE/src/BLEDevice.h

+2-2
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_ */

Diff for: libraries/BLE/src/BLEEddystoneTLM.cpp

+1-1
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 <stdio.h>
1111
#include "esp32-hal-log.h"

Diff for: libraries/BLE/src/BLEEddystoneURL.cpp

+1-1
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"

Diff for: libraries/BLE/src/BLEHIDDevice.cpp

+2-2
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

Diff for: libraries/BLE/src/BLEHIDDevice.h

+2-2
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_ */

Diff for: libraries/BLE/src/BLERemoteCharacteristic.cpp

+2-2
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>
@@ -604,4 +604,4 @@ void BLERemoteCharacteristic::setAuth(esp_gatt_auth_req_t auth) {
604604
m_auth = auth;
605605
}
606606

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

Diff for: libraries/BLE/src/BLERemoteCharacteristic.h

+2-2
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_ */

Diff for: libraries/BLE/src/BLERemoteDescriptor.cpp

+2-2
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"
@@ -180,4 +180,4 @@ void BLERemoteDescriptor::setAuth(esp_gatt_auth_req_t auth) {
180180
m_auth = auth;
181181
}
182182

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

0 commit comments

Comments
 (0)