8000 Merge pull request #687 from toxuin/num-handles · lexus2k/esp32-snippets@4e0fc44 · GitHub
[go: up one dir, main page]

Skip to content

Commit 4e0fc44

Browse files
authored
Merge pull request nkolban#687 from toxuin/num-handles
BT: uint16_t numHandles
2 parents d1127a6 + 466332c commit 4e0fc44

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

cpp_utils/BLEService.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ static const char* LOG_TAG = "BLEService"; // Tag for logging.
3535
* @param [in] uuid The UUID of the service.
3636
* @param [in] numHandles The maximum number of handles associated with the service.
3737
*/
38-
BLEService::BLEService(const char* uuid, uint32_t numHandles) : BLEService(BLEUUID(uuid), numHandles) {
38+
BLEService::BLEService(const char* uuid, uint16_t numHandles) : BLEService(BLEUUID(uuid), numHandles) {
3939
}
4040

4141

@@ -44,7 +44,7 @@ BLEService::BLEService(const char* uuid, uint32_t numHandles) : BLEService(BLEUU
4444
* @param [in] uuid The UUID of the service.
4545
* @param [in] numHandles The maximum number of handles associated with the service.
4646
*/
47-
BLEService::BLEService(BLEUUID uuid, uint32_t numHandles) {
47+
BLEService::BLEService(BLEUUID uuid, uint16_t numHandles) {
4848
m_uuid = uuid;
4949
m_handle = NULL_HANDLE;
5050
m_pServer = nullptr;
@@ -264,7 +264,7 @@ void BLEService::addCharacteristic(BLECharacteristic* pCharacteristic) {
264264
BLECharacteristic* BLEService::createCharacteristic(const char* uuid, uint32_t properties) {
265265
return createCharacteristic(BLEUUID(uuid), properties);
266266
}
267-
267+
268268

269269
/**
270270
* @brief Create a new BLE Characteristic associated with this service.

cpp_utils/BLEService.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class BLECharacteristicMap {
2727
void setByUUID(BLECharacteristic* pCharacteristic, const char* uuid);
2828
void setByUUID(BLECharacteristic* pCharacteristic, BLEUUID uuid);
2929
void setByHandle(uint16_t handle, BLECharacteristic* pCharacteristic);
30-
BLECharacteristic* getByUUID(const char* uuid);
30+
BLECharacteristic* getByUUID(const char* uuid);
3131
BLECharacteristic* getByUUID(BLEUUID uuid);
3232
BLECharacteristic* getByHandle(uint16_t handle);
3333
BLECharacteristic* getFirst();
@@ -69,8 +69,8 @@ class BLEService {
6969
uint8_t m_id = 0;
7070

7171
private:
72-
BLEService(const char* uuid, uint32_t numHandles);
73-
BLEService(BLEUUID uuid, uint32_t numHandles);
72+
BLEService(const char* uuid, uint16_t numHandles);
73+
BLEService(BLEUUID uuid, uint16_t numHandles);
7474
friend class BLEServer;
7575
friend class BLEServiceMap;
7676
friend class BLEDescriptor;
@@ -88,7 +88,7 @@ class BLEService {
8888
FreeRTOS::Semaphore m_semaphoreStartEvt = FreeRTOS::Semaphore("StartEvt");
8989
FreeRTOS::Semaphore m_semaphoreStopEvt = FreeRTOS::Semaphore("StopEvt");
9090

91-
uint32_t m_numHandles;
91+
uint16_t m_numHandles;
9292

9393
BLECharacteristic* getLastCreatedCharacteristic();
9494
void handleGATTServerEvent(

0 commit comments

Comments
 (0)
0