Skip to content

Commit 190cfac

Browse files
committed
Fixes for esp idf commit 79f206be47c3f608615c1de8c491107e6c9194bb and start of esp-idf integration
1 parent 006c88c commit 190cfac

File tree

5 files changed

+66
-12
lines changed

5 files changed

+66
-12
lines changed

Kconfig

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
menu "nkolban's c++ wrappers"
2+
3+
menuconfig NKOLBAN
4+
bool "nkolban's c++ wrappers"
5+
default y
6+
help
7+
Select this option to use nkolban's c++ wrappers.
8+
9+
menuconfig NKOLBAN_BLE
10+
bool "bluetooth wrappers"
11+
depends on BT_ENABLED && NKOLBAN
12+
default y
13+
help
14+
Select this option to use nkolban's c++ bluetooth ble wrappers.
15+
16+
menuconfig NKOLBAN_BLE2902
17+
bool "BLE2902"
18+
depends on NKOLBAN_BLE
19+
default y
20+
help
21+
Select this option to use nkolban's c++ bluetooth BLE2902 wrappers.
22+
23+
endmenu

component.mk

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
c := cpp_utils
2+
COMPONENT_EXTRA_INCLUDES := $(realpath $c)
3+
COMPONENT_ADD_INCLUDEDIRS := $c
4+
COMPONENT_SRCDIRS := $c
5+
6+
$(call compile_only_if,$(CONFIG_NKOLBAN), \
7+
$c/Task.o \
8+
$c/FreeRTOS.o \
9+
$c/GeneralUtils.o \
10+
)
11+
12+
$(call compile_only_if,$(CONFIG_NKOLBAN_BLE), \
13+
$c/BLEAddress.o \
14+
$c/BLEAdvertisedDevice.o \
15+
$c/BLEAdvertising.o \
16+
$c/BLECharacteristic.o \
17+
$c/BLECharacteristicCallbacks.o \
18+
$c/BLECharacteristicMap.o \
19+
$c/BLEClient.o \
20+
$c/BLEDescriptor.o \
21+
$c/BLEDescriptorMap.o \
22+
$c/BLEDevice.o \
23+
$c/BLERemoteCharacteristic.o \
24+
$c/BLERemoteDescriptor.o \
25+
$c/BLERemoteService.o \
26+
$c/BLEScan.o \
27+
$c/BLEServer.o \
28+
$c/BLEService.o \
29+
$c/BLEServiceMap.o \
30+
$c/BLEUUID.o \
31+
$c/BLEUtils.o \
32+
$c/BLEValue.o \
33+
)
34+
35+
$(call compile_only_if,$(CONFIG_NKOLBAN_BLE2902),$c/BLE2902.o)

cpp_utils/BLEClient.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
#include <string.h>
1616
#include <map>
1717
#include <string>
18-
#include <BLERemoteService.h>
18+
#include "BLERemoteService.h"
1919
#include "BLEService.h"
2020
#include "BLEAddress.h"
2121

cpp_utils/BLEUtils.cpp

+6-10
Original file line numberDiff line numberDiff line change
@@ -1286,8 +1286,7 @@ void BLEUtils::dumpGattClientEvent(
12861286
// - uint16_t conn_id
12871287
// - esp_bd_addr_t remote_bda
12881288
case ESP_GATTC_CONNECT_EVT: {
1289-
ESP_LOGD(LOG_TAG, "[staus: %s, conn_id: %d, remote_bda: %s]",
1290-
BLEUtils::gattStatusToString(evtParam->connect.status).c_str(),
1289+
ESP_LOGD(LOG_TAG, "[conn_id: %d, remote_bda: %s]",
12911290
evtParam->connect.conn_id,
12921291
BLEAddress(evtParam->connect.remote_bda).toString().c_str()
12931292
);
@@ -1302,8 +1301,7 @@ void BLEUtils::dumpGattClientEvent(
13021301
// - uint16_t conn_id
13031302
// - esp_bd_addr_t remote_bda
13041303
case ESP_GATTC_DISCONNECT_EVT: {
1305-
ESP_LOGD(LOG_TAG, "[staus: %s, conn_id: %d, remote_bda: %s]",
1306-
BLEUtils::gattStatusToString(evtParam->disconnect.status).c_str(),
1304+
ESP_LOGD(LOG_TAG, "[conn_id: %d, remote_bda: %s]",
13071305
evtParam->disconnect.conn_id,
13081306
BLEAddress(evtParam->disconnect.remote_bda).toString().c_str()
13091307
);
@@ -1586,10 +1584,9 @@ void BLEUtils::dumpGattServerEvent(
15861584
} // ESP_GATTS_CONGEST_EVT
15871585

15881586
case ESP_GATTS_CONNECT_EVT: {
1589-
ESP_LOGD(LOG_TAG, "[conn_id: %d, remote_bda: %s, is_connected: %d]",
1587+
ESP_LOGD(LOG_TAG, "[conn_id: %d, remote_bda: %s]",
15901588
evtParam->connect.conn_id,
1591-
BLEAddress(evtParam->connect.remote_bda).toString().c_str(),
1592-
evtParam->connect.is_connected);
1589+
BLEAddress(evtParam->connect.remote_bda).toString().c_str());
15931590
break;
15941591
} // ESP_GATTS_CONNECT_EVT
15951592

@@ -1603,10 +1600,9 @@ void BLEUtils::dumpGattServerEvent(
16031600
} // ESP_GATTS_CREATE_EVT
16041601

16051602
case ESP_GATTS_DISCONNECT_EVT: {
1606-
ESP_LOGD(LOG_TAG, "[conn_id: %d, remote_bda: %s, is_connected: %d]",
1603+
ESP_LOGD(LOG_TAG, "[conn_id: %d, remote_bda: %s]",
16071604
evtParam->connect.conn_id,
1608-
BLEAddress(evtParam->connect.remote_bda).toString().c_str(),
1609-
evtParam->connect.is_connected);
1605+
BLEAddress(evtParam->connect.remote_bda).toString().c_str());
16101606
break;
16111607
} // ESP_GATTS_DISCONNECT_EVT
16121608

cpp_utils/Doxyfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ PROJECT_LOGO =
5858
# entered, it will be relative to the location where doxygen was started. If
5959
# left blank the current directory will be used.
6060

61-
OUTPUT_DIRECTORY = /home/kolban/esp32/esptest/apps/workspace/esp32-snippets/cpp_utils/docs
61+
OUTPUT_DIRECTORY = docs
6262

6363
# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub-
6464
# directories (in 2 levels) under the output directory of each output format and

0 commit comments

Comments
 (0)