File tree Expand file tree Collapse file tree 18 files changed +104
-53
lines changed Expand file tree Collapse file tree 18 files changed +104
-53
lines changed Original file line number Diff line number Diff line change 13
13
*/
14
14
#include " sdkconfig.h"
15
15
#if defined(CONFIG_BT_ENABLED)
16
- #include < esp_log.h>
17
16
#include < sstream>
18
17
#include " BLEAdvertisedDevice.h"
19
18
#include " BLEUtils.h"
20
- #ifdef ARDUINO_ARCH_ESP32
19
+ #if defined( ARDUINO_ARCH_ESP32) && defined(CONFIG_ARDUHAL_ESP_LOG)
21
20
#include " esp32-hal-log.h"
22
- #endif
21
+ #define LOG_TAG " "
22
+ #else
23
+ #include " esp_log.h"
23
24
static const char * LOG_TAG=" BLEAdvertisedDevice" ;
25
+ #endif
24
26
25
27
BLEAdvertisedDevice::BLEAdvertisedDevice () {
26
28
m_adFlag = 0 ;
Original file line number Diff line number Diff line change 19
19
#include " sdkconfig.h"
20
20
#if defined(CONFIG_BT_ENABLED)
21
21
#include " BLEAdvertising.h"
22
- #include < esp_log.h>
23
22
#include < esp_err.h>
24
23
#include " BLEUtils.h"
25
24
#include " GeneralUtils.h"
26
25
27
- #ifdef ARDUINO_ARCH_ESP32
26
+ #if defined( ARDUINO_ARCH_ESP32) && defined(CONFIG_ARDUHAL_ESP_LOG)
28
27
#include " esp32-hal-log.h"
28
+ #define LOG_TAG " "
29
+ #else
30
+ #include " esp_log.h"
31
+ static const char * LOG_TAG = " BLEAdvertising" ;
29
32
#endif
30
33
31
- static const char * LOG_TAG = " BLEAdvertising" ;
32
34
33
35
34
36
/* *
Original file line number Diff line number Diff line change 7
7
#include " sdkconfig.h"
8
8
#if defined(CONFIG_BT_ENABLED)
9
9
#include < string.h>
10
- #include < esp_log.h>
11
10
#include " BLEBeacon.h"
11
+ #if defined(ARDUINO_ARCH_ESP32) && defined(CONFIG_ARDUHAL_ESP_LOG)
12
+ #include " esp32-hal-log.h"
13
+ #define LOG_TAG " "
14
+ #else
15
+ #include " esp_log.h"
16
+ static const char * LOG_TAG = " BLEBeacon" ;
17
+ #endif
12
18
13
19
#define ENDIAN_CHANGE_U16 (x ) ((((x)&0xFF00 )>>8 ) + (((x)&0xFF )<<8 ))
14
20
15
- static const char LOG_TAG[] = " BLEBeacon" ;
16
21
17
22
BLEBeacon::BLEBeacon () {
18
23
m_beaconData.manufacturerId = 0x4c00 ;
Original file line number Diff line number Diff line change 11
11
#include < iomanip>
12
12
#include < stdlib.h>
13
13
#include " sdkconfig.h"
14
- #include < esp_log.h>
15
14
#include < esp_err.h>
16
15
#include " BLECharacteristic.h"
17
16
#include " BLEService.h"
18
17
#include " BLEDevice.h"
19
18
#include " BLEUtils.h"
20
19
#include " BLE2902.h"
21
20
#include " GeneralUtils.h"
22
- #ifdef ARDUINO_ARCH_ESP32
21
+ #if defined( ARDUINO_ARCH_ESP32) && defined(CONFIG_ARDUHAL_ESP_LOG)
23
22
#include " esp32-hal-log.h"
24
- #endif
25
-
23
+ #define LOG_TAG " "
24
+ #else
25
+ #include " esp_log.h"
26
26
static const char * LOG_TAG = " BLECharacteristic" ;
27
+ #endif
27
28
28
29
#define NULL_HANDLE (0xffff )
29
30
Original file line number Diff line number Diff line change 6
6
*/
7
7
#include " sdkconfig.h"
8
8
#if defined(CONFIG_BT_ENABLED)
9
- #include < esp_log.h>
10
9
#include < esp_bt.h>
11
10
#include < esp_bt_main.h>
12
11
#include < esp_gap_ble_api.h>
19
18
#include < sstream>
20
19
#include < unordered_set>
21
20
#include " BLEDevice.h"
22
- #ifdef ARDUINO_ARCH_ESP32
21
+ #if defined( ARDUINO_ARCH_ESP32) && defined(CONFIG_ARDUHAL_ESP_LOG)
23
22
#include " esp32-hal-log.h"
23
+ #define LOG_TAG " "
24
+ #else
25
+ #include " esp_log.h"
26
+ static const char * LOG_TAG = " BLEClient" ;
24
27
#endif
25
28
29
+
26
30
/*
27
31
* Design
28
32
* ------
43
47
*
44
48
*
45
49
*/
46
- static const char * LOG_TAG = " BLEClient" ;
47
50
48
51
BLEClient::BLEClient () {
49
52
m_pClientCallbacks = nullptr ;
Original file line number Diff line number Diff line change 11
11
#include < iomanip>
12
12
#include < stdlib.h>
13
13
#include " sdkconfig.h"
14
- #include < esp_log.h>
15
14
#include < esp_err.h>
16
15
#include " BLEService.h"
17
16
#include " BLEDescriptor.h"
18
17
#include " GeneralUtils.h"
19
- #ifdef ARDUINO_ARCH_ESP32
18
+ #if defined( ARDUINO_ARCH_ESP32) && defined(CONFIG_ARDUHAL_ESP_LOG)
20
19
#include " esp32-hal-log.h"
20
+ #define LOG_TAG " "
21
+ #else
22
+ #include " esp_log.h"
23
+ static const char * LOG_TAG = " BLEDescriptor" ;
21
24
#endif
22
25
23
- static const char * LOG_TAG = " BLEDescriptor " ;
26
+
24
27
25
28
26
29
#define NULL_HANDLE (0xffff )
Original file line number Diff line number Diff line change 19
19
#include < esp_gattc_api.h> // ESP32 BLE
20
20
#include < esp_gatt_common_api.h> // ESP32 BLE
21
21
#include < esp_err.h> // ESP32 ESP-IDF
22
- #include < esp_log.h> // ESP32 ESP-IDF
23
22
#include < map> // Part of C++ Standard library
24
23
#include < sstream> // Part of C++ Standard library
25
24
#include < iomanip> // Part of C++ Standard library
28
27
#include " BLEClient.h"
29
28
#include " BLEUtils.h"
30
29
#include " GeneralUtils.h"
31
- #ifdef ARDUINO_ARCH_ESP32
30
+ #if defined( ARDUINO_ARCH_ESP32) && defined(CONFIG_ARDUHAL_ESP_LOG)
32
31
#include " esp32-hal-log.h"
33
32
#include " esp32-hal-bt.h"
33
+ #define LOG_TAG " "
34
+ #else
35
+ #include " esp_log.h"
36
+ static const char * LOG_TAG = " BLEDevice" ;
34
37
#endif
35
38
36
- static const char * LOG_TAG = " BLEDevice" ;
37
39
38
40
/* *
39
41
* Singletons for the BLEDevice.
Original file line number Diff line number Diff line change 11
11
#if defined(CONFIG_BT_ENABLED)
12
12
13
13
#include < esp_gattc_api.h>
14
- #include < esp_log.h>
10000
15
14
#include < esp_err.h>
16
15
17
16
#include < sstream>
18
17
#include " BLEExceptions.h"
19
18
#include " BLEUtils.h"
20
19
#include " GeneralUtils.h"
21
20
#include " BLERemoteDescriptor.h"
22
- #ifdef ARDUINO_ARCH_ESP32
21
+ #if defined( ARDUINO_ARCH_ESP32) && defined(CONFIG_ARDUHAL_ESP_LOG)
23
22
#include " esp32-hal-log.h"
23
+ #define LOG_TAG " "
24
+ #else
25
+ #include " esp_log.h"
26
+ static const char * LOG_TAG = " BLERemoteCharacteristic" ; // The logging tag for this class.
24
27
#endif
25
28
26
29
27
- static const char * LOG_TAG = " BLERemoteCharacteristic" ; // The logging tag for this class.
28
30
29
31
/* *
30
32
* @brief Constructor.
Original file line number Diff line number Diff line change 9
9
#include < sstream>
10
10
#include " BLERemoteDescriptor.h"
11
11
#include " GeneralUtils.h"
12
- #include < esp_log.h>
13
- #ifdef ARDUINO_ARCH_ESP32
12
+ #if defined(ARDUINO_ARCH_ESP32) && defined(CONFIG_ARDUHAL_ESP_LOG)
14
13
#include " esp32-hal-log.h"
14
+ #define LOG_TAG " "
15
+ #else
16
+ #include " esp_log.h"
17
+ static const char * LOG_TAG = " BLERemoteDescriptor" ;
15
18
#endif
16
19
17
- static const char * LOG_TAG = " BLERemoteDescriptor " ;
20
+
18
21
19
22
20
23
BLERemoteDescriptor::BLERemoteDescriptor (
Original file line number Diff line number Diff line change 11
11
#include " BLERemoteService.h"
12
12
#include " BLEUtils.h"
13
13
#include " GeneralUtils.h"
14
- #include < esp_log.h>
15
14
#include < esp_err.h>
16
- #ifdef ARDUINO_ARCH_ESP32
15
+ #if defined( ARDUINO_ARCH_ESP32) && defined(CONFIG_ARDUHAL_ESP_LOG)
17
16
#include " esp32-hal-log.h"
17
+ #define LOG_TAG " "
18
+ #else
19
+ #include " esp_log.h"
20
+ static const char * LOG_TAG = " BLERemoteService" ;
18
21
#endif
19
22
20
- static const char * LOG_TAG = " BLERemoteService " ;
23
+
21
24
22
25
BLERemoteService::BLERemoteService (
23
26
esp_gatt_id_t srvcId,
Original file line number Diff line number Diff line change 8
8
#if defined(CONFIG_BT_ENABLED)
9
9
10
10
11
- #include < esp_log.h>
12
11
#include < esp_err.h>
13
12
14
13
#include < map>
17
16
#include " BLEScan.h"
18
17
#include " BLEUtils.h"
19
18
#include " GeneralUtils.h"
20
- #ifdef ARDUINO_ARCH_ESP32
19
+ #if defined( ARDUINO_ARCH_ESP32) && defined(CONFIG_ARDUHAL_ESP_LOG)
21
20
#include " esp32-hal-log.h"
21
+ #define LOG_TAG " "
22
+ #else
23
+ #include " esp_log.h"
24
+ static const char * LOG_TAG = " BLEScan" ;
22
25
#endif
23
26
24
- static const char * LOG_TAG = " BLEScan " ;
27
+
25
28
26
29
27
30
/* *
Original file line number Diff line number Diff line change 7
7
8
8
#include " sdkconfig.h"
9
9
#if defined(CONFIG_BT_ENABLED)
10
- #include < esp_log.h>
11
10
#include < esp_bt.h>
12
11
#include < esp_bt_main.h>
13
12
#include " GeneralUtils.h"
18
17
#include < string.h>
19
18
#include < string>
20
19
#include < unordered_set>
21
- #ifdef ARDUINO_ARCH_ESP32
20
+ #if defined( ARDUINO_ARCH_ESP32) && defined(CONFIG_ARDUHAL_ESP_LOG)
22
21
#include " esp32-hal-log.h"
22
+ #define LOG_TAG " "
23
+ #else
24
+ #include " esp_log.h"
25
+ static const char * LOG_TAG = " BLEServer" ;
23
26
#endif
24
27
25
- static const char * LOG_TAG = " BLEServer " ;
28
+
26
29
27
30
28
31
/* *
Original file line number Diff line number Diff line change 11
11
#if defined(CONFIG_BT_ENABLED)
12
12
#include < esp_err.h>
13
13
#include < esp_gatts_api.h>
14
- #include < esp_log.h>
15
14
16
15
#include < iomanip>
17
16
#include < sstream>
22
21
#include " BLEUtils.h"
23
22
#include " GeneralUtils.h"
24
23
25
- #ifdef ARDUINO_ARCH_ESP32
24
+ #if defined( ARDUINO_ARCH_ESP32) && defined(CONFIG_ARDUHAL_ESP_LOG)
26
25
#include " esp32-hal-log.h"
26
+ #define LOG_TAG " "
27
+ #else
28
+ #include " esp_log.h"
29
+ static const char * LOG_TAG = " BLEService" ; // Tag for logging.
27
30
#endif
28
31
29
32
#define NULL_HANDLE (0xffff )
30
33
31
- static const char * LOG_TAG = " BLEService" ; // Tag for logging.
32
34
33
35
/* *
34
36
* @brief Construct an instance of the BLEService
Original file line number Diff line number Diff line change 6
6
*/
7
7
#include " sdkconfig.h"
8
8
#if defined(CONFIG_BT_ENABLED)
9
- #include < esp_log.h>
10
9
#include < string.h>
11
10
#include < sstream>
12
11
#include < iomanip>
13
12
#include < stdio.h>
14
13
#include < assert.h>
15
14
#include < stdlib.h>
16
15
#include " BLEUUID.h"
17
- static const char * LOG_TAG = " BLEUUID" ;
18
16
19
- #ifdef ARDUINO_ARCH_ESP32
17
+ #if defined( ARDUINO_ARCH_ESP32) && defined(CONFIG_ARDUHAL_ESP_LOG)
20
18
#include " esp32-hal-log.h"
19
+ #define LOG_TAG " "
20
+ #else
21
+ #include " esp_log.h"
22
+ static const char * LOG_TAG = " BLEUUID" ;
21
23
#endif
22
24
25
+
23
26
/* *
24
27
* @brief Copy memory from source to target but in reverse order.
25
28
*
Original file line number Diff line number Diff line change 19
19
#include < esp_gap_ble_api.h> // ESP32 BLE
20
20
#include < esp_gattc_api.h> // ESP32 BLE
21
21
#include < esp_err.h> // ESP32 ESP-IDF
22
- #include < esp_log.h> // ESP32 ESP-IDF
23
22
#include < map> // Part of C++ STL
24
23
#include < sstream>
25
24
#include < iomanip>
26
25
27
- #ifdef ARDUINO_ARCH_ESP32
26
+ #if defined( ARDUINO_ARCH_ESP32) && defined(CONFIG_ARDUHAL_ESP_LOG)
28
27
#include " esp32-hal-log.h"
28
+ #define LOG_TAG " "
29
+ #else
30
+ #include " esp_log.h"
31
+ static const char * LOG_TAG = " BLEUtils" ; // Tag for logging.
29
32
#endif
30
33
31
- static const char * LOG_TAG = " BLEUtils" ; // Tag for logging.
32
34
33
35
/*
34
36
static std::map<std::string, BLEClient*> g_addressMap;
Original file line number Diff line number Diff line change 7
7
#include " sdkconfig.h"
8
8
#if defined(CONFIG_BT_ENABLED)
9
9
10
- #include < esp_log.h>
11
-
12
- #include " BLEValue.h"
13
- #ifdef ARDUINO_ARCH_ESP32
10
+ #if defined(ARDUINO_ARCH_ESP32) && defined(CONFIG_ARDUHAL_ESP_LOG)
14
11
#include " esp32-hal-log.h"
12
+ #define LOG_TAG " "
13
+ #else
14
+ #include " esp_log.h"
15
+ static const char * LOG_TAG=" BLEValue" ;
15
16
#endif
16
17
17
- static const char * LOG_TAG= " BLEValue " ;
18
+
18
19
19
20
BLEValue::BLEValue () {
20
21
m_accumulation = " " ;
You can’t perform that action at this time.
0 commit comments