Skip to content

RE: Change check for BT_ENABLE to really be a check for BLUEDROID_ENABLED #4497

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Nov 6, 2020
Merged
2 changes: 1 addition & 1 deletion libraries/BLE/src/BLE2902.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* https://www.bluetooth.com/specifications/gatt/viewer?attributeXmlFile=org.bluetooth.descriptor.gatt.client_characteristic_configuration.xml
*/
#include "sdkconfig.h"
#if defined(CONFIG_BT_ENABLED)
#if defined(CONFIG_BLUEDROID_ENABLED)

#include "BLE2902.h"

Expand Down
4 changes: 2 additions & 2 deletions libraries/BLE/src/BLE2902.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#ifndef COMPONENTS_CPP_UTILS_BLE2902_H_
#define COMPONENTS_CPP_UTILS_BLE2902_H_
#include "sdkconfig.h"
#if defined(CONFIG_BT_ENABLED)
#if defined(CONFIG_BLUEDROID_ENABLED)

#include "BLEDescriptor.h"

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

}; // BLE2902

#endif /* CONFIG_BT_ENABLED */
#endif /* CONFIG_BLUEDROID_ENABLED */
#endif /* COMPONENTS_CPP_UTILS_BLE2902_H_ */
2 changes: 1 addition & 1 deletion libraries/BLE/src/BLE2904.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* https://www.bluetooth.com/specifications/gatt/viewer?attributeXmlFile=org.bluetooth.descriptor.gatt.characteristic_presentation_format.xml
*/
#include "sdkconfig.h"
#if defined(CONFIG_BT_ENABLED)
#if defined(CONFIG_BLUEDROID_ENABLED)

#include "BLE2904.h"

Expand Down
4 changes: 2 additions & 2 deletions libraries/BLE/src/BLE2904.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#ifndef COMPONENTS_CPP_UTILS_BLE2904_H_
#define COMPONENTS_CPP_UTILS_BLE2904_H_
#include "sdkconfig.h"
#if defined(CONFIG_BT_ENABLED)
#if defined(CONFIG_BLUEDROID_ENABLED)

#include "BLEDescriptor.h"

Expand Down Expand Up @@ -70,5 +70,5 @@ class BLE2904: public BLEDescriptor {
BLE2904_Data m_data;
}; // BLE2904

#endif /* CONFIG_BT_ENABLED */
#endif /* CONFIG_BLUEDROID_ENABLED */
#endif /* COMPONENTS_CPP_UTILS_BLE2904_H_ */
2 changes: 1 addition & 1 deletion libraries/BLE/src/BLEAddress.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* Author: kolban
*/
#include "sdkconfig.h"
#if defined(CONFIG_BT_ENABLED)
#if defined(CONFIG_BLUEDROID_ENABLED)

#include "BLEAddress.h"
#include <string>
Expand Down
4 changes: 2 additions & 2 deletions libraries/BLE/src/BLEAddress.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#ifndef COMPONENTS_CPP_UTILS_BLEADDRESS_H_
#define COMPONENTS_CPP_UTILS_BLEADDRESS_H_
#include "sdkconfig.h"
#if defined(CONFIG_BT_ENABLED)
#if defined(CONFIG_BLUEDROID_ENABLED)
#include <esp_gap_ble_api.h> // ESP32 BLE
#include <string>

Expand All @@ -30,5 +30,5 @@ class BLEAddress {
esp_bd_addr_t m_address;
};

#endif /* CONFIG_BT_ENABLED */
#endif /* CONFIG_BLUEDROID_ENABLED */
#endif /* COMPONENTS_CPP_UTILS_BLEADDRESS_H_ */
4 changes: 2 additions & 2 deletions libraries/BLE/src/BLEAdvertisedDevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* Author: kolban
*/
#include "sdkconfig.h"
#if defined(CONFIG_BT_ENABLED)
#if defined(CONFIG_BLUEDROID_ENABLED)
#include <sstream>
#include "BLEAdvertisedDevice.h"
#include "BLEUtils.h"
Expand Down Expand Up @@ -571,5 +571,5 @@ size_t BLEAdvertisedDevice::getPayloadLength() {
return m_payloadLength;
}

#endif /* CONFIG_BT_ENABLED */
#endif /* CONFIG_BLUEDROID_ENABLED */

4 changes: 2 additions & 2 deletions libraries/BLE/src/BLEAdvertisedDevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#ifndef COMPONENTS_CPP_UTILS_BLEADVERTISEDDEVICE_H_
#define COMPONENTS_CPP_UTILS_BLEADVERTISEDDEVICE_H_
#include "sdkconfig.h"
#if defined(CONFIG_BT_ENABLED)
#if defined(CONFIG_BLUEDROID_ENABLED)
#include <esp_gattc_api.h>

#include <map>
Expand Down Expand Up @@ -124,5 +124,5 @@ class BLEAdvertisedDeviceCallbacks {
virtual void onResult(BLEAdvertisedDevice advertisedDevice) = 0;
};

#endif /* CONFIG_BT_ENABLED */
#endif /* CONFIG_BLUEDROID_ENABLED */
#endif /* COMPONENTS_CPP_UTILS_BLEADVERTISEDDEVICE_H_ */
4 changes: 2 additions & 2 deletions libraries/BLE/src/BLEAdvertising.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*
*/
#include "sdkconfig.h"
#if defined(CONFIG_BT_ENABLED)
#if defined(CONFIG_BLUEDROID_ENABLED)
#include "BLEAdvertising.h"
#include <esp_err.h>
#include "BLEUtils.h"
Expand Down Expand Up @@ -525,4 +525,4 @@ void BLEAdvertising::handleGAPEvent(
}


#endif /* CONFIG_BT_ENABLED */
#endif /* CONFIG_BLUEDROID_ENABLED */
4 changes: 2 additions & 2 deletions libraries/BLE/src/BLEAdvertising.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#ifndef COMPONENTS_CPP_UTILS_BLEADVERTISING_H_
#define COMPONENTS_CPP_UTILS_BLEADVERTISING_H_
#include "sdkconfig.h"
#if defined(CONFIG_BT_ENABLED)
#if defined(CONFIG_BLUEDROID_ENABLED)
#include <esp_gap_ble_api.h>
#include "BLEUUID.h"
#include <vector>
Expand Down Expand Up @@ -77,5 +77,5 @@ class BLEAdvertising {
bool m_scanResp = true;

};
#endif /* CONFIG_BT_ENABLED */
#endif /* CONFIG_BLUEDROID_ENABLED */
#endif /* COMPONENTS_CPP_UTILS_BLEADVERTISING_H_ */
2 changes: 1 addition & 1 deletion libraries/BLE/src/BLEBeacon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* Author: kolban
*/
#include "sdkconfig.h"
#if defined(CONFIG_BT_ENABLED)
#if defined(CONFIG_BLUEDROID_ENABLED)
#include <string.h>
#include "BLEBeacon.h"
#include "esp32-hal-log.h"
Expand Down
4 changes: 2 additions & 2 deletions libraries/BLE/src/BLECharacteristic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* Author: kolban
*/
#include "sdkconfig.h"
#if defined(CONFIG_BT_ENABLED)
#if defined(CONFIG_BLUEDROID_ENABLED)
#include <sstream>
#include <string.h>
#include <iomanip>
Expand Down Expand Up @@ -800,4 +800,4 @@ void BLECharacteristicCallbacks::onStatus(BLECharacteristic* pCharacteristic, St
} // onStatus


#endif /* CONFIG_BT_ENABLED */
#endif /* CONFIG_BLUEDROID_ENABLED */
4 changes: 2 additions & 2 deletions libraries/BLE/src/BLECharacteristic.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#ifndef COMPONENTS_CPP_UTILS_BLECHARACTERISTIC_H_
#define COMPONENTS_CPP_UTILS_BLECHARACTERISTIC_H_
#include "sdkconfig.h"
#if defined(CONFIG_BT_ENABLED)
#if defined(CONFIG_BLUEDROID_ENABLED)
#include <string>
#include <map>
#include "BLEUUID.h"
Expand Down Expand Up @@ -150,5 +150,5 @@ class BLECharacteristicCallbacks {
virtual void onNotify(BLECharacteristic* pCharacteristic);
virtual void onStatus(BLECharacteristic* pCharacteristic, Status s, uint32_t code);
};
#endif /* CONFIG_BT_ENABLED */
#endif /* CONFIG_BLUEDROID_ENABLED */
#endif /* COMPONENTS_CPP_UTILS_BLECHARACTERISTIC_H_ */
4 changes: 2 additions & 2 deletions libraries/BLE/src/BLECharacteristicMap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* Author: kolban
*/
#include "sdkconfig.h"
#if defined(CONFIG_BT_ENABLED)
#if defined(CONFIG_BLUEDROID_ENABLED)
#include <sstream>
#include <iomanip>
#include "BLEService.h"
Expand Down Expand Up @@ -131,4 +131,4 @@ std::string BLECharacteristicMap::toString() {
} // toString


#endif /* CONFIG_BT_ENABLED */
#endif /* CONFIG_BLUEDROID_ENABLED */
4 changes: 2 additions & 2 deletions libraries/BLE/src/BLEClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* Author: kolban
*/
#include "sdkconfig.h"
#if defined(CONFIG_BT_ENABLED)
#if defined(CONFIG_BLUEDROID_ENABLED)
#include <esp_bt.h>
#include <esp_bt_main.h>
#include <esp_gap_ble_api.h>
Expand Down Expand Up @@ -535,4 +535,4 @@ std::string BLEClient::toString() {
} // toString


#endif // CONFIG_BT_ENABLED
#endif // CONFIG_BLUEDROID_ENABLED
4 changes: 2 additions & 2 deletions libraries/BLE/src/BLEClient.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#define MAIN_BLEDEVICE_H_

#include "sdkconfig.h"
#if defined(CONFIG_BT_ENABLED)
#if defined(CONFIG_BLUEDROID_ENABLED)

#include <esp_gattc_api.h>
#include <string.h>
Expand Down Expand Up @@ -99,5 +99,5 @@ class BLEClientCallbacks {
virtual void onDisconnect(BLEClient *pClient) = 0;
};

#endif // CONFIG_BT_ENABLED
#endif // CONFIG_BLUEDROID_ENABLED
#endif /* MAIN_BLEDEVICE_H_ */
4 changes: 2 additions & 2 deletions libraries/BLE/src/BLEDescriptor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* Author: kolban
*/
#include "sdkconfig.h"
#if defined(CONFIG_BT_ENABLED)
#if defined(CONFIG_BLUEDROID_ENABLED)
#include <sstream>
#include <string.h>
#include <iomanip>
Expand Down Expand Up @@ -284,4 +284,4 @@ void BLEDescriptorCallbacks::onWrite(BLEDescriptor* pDescriptor) {
} // onWrite


#endif /* CONFIG_BT_ENABLED */
#endif /* CONFIG_BLUEDROID_ENABLED */
4 changes: 2 additions & 2 deletions libraries/BLE/src/BLEDescriptor.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#ifndef COMPONENTS_CPP_UTILS_BLEDESCRIPTOR_H_
#define COMPONENTS_CPP_UTILS_BLEDESCRIPTOR_H_
#include "sdkconfig.h"
#if defined(CONFIG_BT_ENABLED)
#if defined(CONFIG_BLUEDROID_ENABLED)
#include <string>
#include "BLEUUID.h"
#include "BLECharacteristic.h"
Expand Down Expand Up @@ -73,5 +73,5 @@ class BLEDescriptorCallbacks {
virtual void onRead(BLEDescriptor* pDescriptor);
virtual void onWrite(BLEDescriptor* pDescriptor);
};
#endif /* CONFIG_BT_ENABLED */
#endif /* CONFIG_BLUEDROID_ENABLED */
#endif /* COMPONENTS_CPP_UTILS_BLEDESCRIPTOR_H_ */
4 changes: 2 additions & 2 deletions libraries/BLE/src/BLEDescriptorMap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* Author: kolban
*/
#include "sdkconfig.h"
#if defined(CONFIG_BT_ENABLED)
#if defined(CONFIG_BLUEDROID_ENABLED)
#include <sstream>
#include <iomanip>
#include "BLECharacteristic.h"
Expand Down Expand Up @@ -145,4 +145,4 @@ BLEDescriptor* BLEDescriptorMap::getNext() {
m_iterator++;
return pRet;
} // getNext
#endif /* CONFIG_BT_ENABLED */
#endif /* CONFIG_BLUEDROID_ENABLED */
4 changes: 2 additions & 2 deletions libraries/BLE/src/BLEDevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* Author: kolban
*/
#include "sdkconfig.h"
#if defined(CONFIG_BT_ENABLED)
#if defined(CONFIG_BLUEDROID_ENABLED)
#include <freertos/FreeRTOS.h>
#include <freertos/event_groups.h>
#include <freertos/task.h>
Expand Down Expand Up @@ -669,4 +669,4 @@ void BLEDevice::setCustomGattsHandler(gatts_event_handler handler) {
m_customGattsHandler = handler;
}

#endif // CONFIG_BT_ENABLED
#endif // CONFIG_BLUEDROID_ENABLED
4 changes: 2 additions & 2 deletions libraries/BLE/src/BLEDevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#ifndef MAIN_BLEDevice_H_
#define MAIN_BLEDevice_H_
#include "sdkconfig.h"
#if defined(CONFIG_BT_ENABLED)
#if defined(CONFIG_BLUEDROID_ENABLED)
#include <esp_gap_ble_api.h> // ESP32 BLE
#include <esp_gattc_api.h> // ESP32 BLE
#include <map> // Part of C++ STL
Expand Down Expand Up @@ -96,5 +96,5 @@ class BLEDevice {

}; // class BLE

#endif // CONFIG_BT_ENABLED
#endif // CONFIG_BLUEDROID_ENABLED
#endif /* MAIN_BLEDevice_H_ */
2 changes: 1 addition & 1 deletion libraries/BLE/src/BLEEddystoneTLM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
*
*/
#include "sdkconfig.h"
#if defined(CONFIG_BT_ENABLED)
#if defined(CONFIG_BLUEDROID_ENABLED)
#include <string.h>
#include <stdio.h>
#include "esp32-hal-log.h"
Expand Down
2 changes: 1 addition & 1 deletion libraries/BLE/src/BLEEddystoneURL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* Author: pcbreflux
*/
#include "sdkconfig.h"
#if defined(CONFIG_BT_ENABLED)
#if defined(CONFIG_BLUEDROID_ENABLED)
#include <string.h>
#include "esp32-hal-log.h"
#include "BLEEddystoneURL.h"
Expand Down
4 changes: 2 additions & 2 deletions libraries/BLE/src/BLEHIDDevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* Author: chegewara
*/
#include "sdkconfig.h"
#if defined(CONFIG_BT_ENABLED)
#if defined(CONFIG_BLUEDROID_ENABLED)

#include "BLEHIDDevice.h"
#include "BLE2904.h"
Expand Down Expand Up @@ -239,5 +239,5 @@ BLEService* BLEHIDDevice::batteryService() {
return m_batteryService;
}

#endif // CONFIG_BT_ENABLED
#endif // CONFIG_BLUEDROID_ENABLED

4 changes: 2 additions & 2 deletions libraries/BLE/src/BLEHIDDevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#define _BLEHIDDEVICE_H_

#include "sdkconfig.h"
#if defined(CONFIG_BT_ENABLED)
#if defined(CONFIG_BLUEDROID_ENABLED)

#include "BLECharacteristic.h"
#include "BLEService.h"
Expand Down Expand Up @@ -71,5 +71,5 @@ class BLEHIDDevice {
BLECharacteristic* m_protocolModeCharacteristic; //0x2a4e
BLECharacteristic* m_batteryLevelCharacteristic; //0x2a19
};
#endif // CONFIG_BT_ENABLED
#endif // CONFIG_BLUEDROID_ENABLED
#endif /* _BLEHIDDEVICE_H_ */
4 changes: 2 additions & 2 deletions libraries/BLE/src/BLERemoteCharacteristic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include "BLERemoteCharacteristic.h"

#include "sdkconfig.h"
#if defined(CONFIG_BT_ENABLED)
#if defined(CONFIG_BLUEDROID_ENABLED)

#include <esp_gattc_api.h>
#include <esp_err.h>
Expand Down Expand Up @@ -613,4 +613,4 @@ void BLERemoteCharacteristic::setAuth(esp_gatt_auth_req_t auth) {
m_auth = auth;
}

#endif /* CONFIG_BT_ENABLED */
#endif /* CONFIG_BLUEDROID_ENABLED */
4 changes: 2 additions & 2 deletions libraries/BLE/src/BLERemoteCharacteristic.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#ifndef COMPONENTS_CPP_UTILS_BLEREMOTECHARACTERISTIC_H_
#define COMPONENTS_CPP_UTILS_BLEREMOTECHARACTERISTIC_H_
#include "sdkconfig.h"
#if defined(CONFIG_BT_ENABLED)
#if defined(CONFIG_BLUEDROID_ENABLED)

#include <string>

Expand Down Expand Up @@ -83,5 +83,5 @@ class BLERemoteCharacteristic {
// We maintain a map of descriptors owned by this characteristic keyed by a string representation of the UUID.
std::map<std::string, BLERemoteDescriptor*> m_descriptorMap;
}; // BLERemoteCharacteristic
#endif /* CONFIG_BT_ENABLED */
#endif /* CONFIG_BLUEDROID_ENABLED */
#endif /* COMPONENTS_CPP_UTILS_BLEREMOTECHARACTERISTIC_H_ */
4 changes: 2 additions & 2 deletions libraries/BLE/src/BLERemoteDescriptor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* Author: kolban
*/
#include "sdkconfig.h"
#if defined(CONFIG_BT_ENABLED)
#if defined(CONFIG_BLUEDROID_ENABLED)
#include <sstream>
#include "BLERemoteDescriptor.h"
#include "GeneralUtils.h"
Expand Down Expand Up @@ -201,4 +201,4 @@ void BLERemoteDescriptor::setAuth(esp_gatt_auth_req_t auth) {
m_auth = auth;
}

#endif /* CONFIG_BT_ENABLED */
#endif /* CONFIG_BLUEDROID_ENABLED */
Loading