8000 BT: uint16_t numHandles by toxuin · Pull Request #687 · nkolban/esp32-snippets · GitHub
[go: up one dir, main page]

Skip to content

BT: uint16_t numHandles #687

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 1 commit into from
Oct 14, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions cpp_utils/BLEService.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ static const char* LOG_TAG = "BLEService"; // Tag for logging.
* @param [in] uuid The UUID of the service.
* @param [in] numHandles The maximum number of handles associated with the service.
*/
BLEService::BLEService(const char* uuid, uint32_t numHandles) : BLEService(BLEUUID(uuid), numHandles) {
BLEService::BLEService(const char* uuid, uint16_t numHandles) : BLEService(BLEUUID(uuid), numHandles) {
}


Expand All @@ -44,7 +44,7 @@ BLEService::BLEService(const char* uuid, uint32_t numHandles) : BLEService(BLEUU
* @param [in] uuid The UUID of the service.
* @param [in] numHandles The maximum number of handles associated with the service.
*/
BLEService::BLEService(BLEUUID uuid, uint32_t numHandles) {
BLEService::BLEService(BLEUUID uuid, uint16_t numHandles) {
m_uuid = uuid;
m_handle = NULL_HANDLE;
m_pServer = nullptr;
Expand Down Expand Up @@ -264,7 +264,7 @@ void BLEService::addCharacteristic(BLECharacteristic* pCharacteristic) {
BLECharacteristic* BLEService::createCharacteristic(const char* uuid, uint32_t properties) {
return createCharacteristic(BLEUUID(uuid), properties);
}


/**
* @brief Create a new BLE Characteristic associated with this service.
Expand Down
8 changes: 4 additions & 4 deletions cpp_utils/BLEService.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class BLECharacteristicMap {
void setByUUID(BLECharacteristic* pCharacteristic, const char* uuid);
void setByUUID(BLECharacteristic* pCharacteristic, BLEUUID uuid);
void setByHandle(uint16_t handle, BLECharacteristic* pCharacteristic);
BLECharacteristic* getByUUID(const char* uuid);
BLECharacteristic* getByUUID(const char* uuid);
BLECharacteristic* getByUUID(BLEUUID uuid);
BLECharacteristic* getByHandle(uint16_t handle);
BLECharacteristic* getFirst();
Expand Down Expand Up @@ -69,8 +69,8 @@ class BLEService {
uint8_t m_id = 0;

private:
BLEService(const char* uuid, uint32_t numHandles);
BLEService(BLEUUID uuid, uint32_t numHandles);
BLEService(const char* uuid, uint16_t numHandles);
BLEService(BLEUUID uuid, uint16_t numHandles);
friend class BLEServer;
friend class BLEServiceMap;
friend class BLEDescriptor;
Expand All @@ -88,7 +88,7 @@ class BLEService {
FreeRTOS::Semaphore m_semaphoreStartEvt = FreeRTOS::Semaphore("StartEvt");
FreeRTOS::Semaphore m_semaphoreStopEvt = FreeRTOS::Semaphore("StopEvt");

uint32_t m_numHandles;
uint16_t m_numHandles;

BLECharacteristic* getLastCreatedCharacteristic();
void handleGATTServerEvent(
Expand Down
0