8000 Removal of un-needed semaphore · kebot-embedded/esp32-snippets@d8f4d7a · GitHub
[go: up one dir, main page]

Skip to content
< 8000 script crossorigin="anonymous" type="application/javascript" src="https://github.githubassets.com/assets/sessions-eed3aa0554dd.js" defer="defer">

Commit d8f4d7a

Browse files
committed
Removal of un-needed semaphore
1 parent 1bc0402 commit d8f4d7a

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

cpp_utils/BLEService.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ void BLEService::handleGATTServerEvent(
222222

223223

224224
switch(event) {
225-
// ESP_GATTS_ADD_CHAR_EVT - Indicate that a characteristic was added to the service.
225+
// ESP_GATTS_ADD_CHAR_EVT - Indicate that a characteristic was added to the service.
226226
// add_char:
227227
// - esp_gatt_status_t status
228228
// - uint16_t attr_handle
@@ -238,13 +238,11 @@ void BLEService::handleGATTServerEvent(
238238
ESP_LOGE(LOG_TAG, "Expected to find characteristic with UUID: %s, but didnt!",
239239
BLEUUID(param->add_char.char_uuid).toString().c_str());
240240
dump();
241-
m_semaphoreAddCharEvt.give();
242241
break;
243242
}
244243
pCharacteristic->setHandle(param->add_char.attr_handle);
245244
m_characteristicMap.setByHandle(param->add_char.attr_handle, pCharacteristic);
246245
//ESP_LOGD(tag, "Characteristic map: %s", m_characteristicMap.toString().c_str());
247-
m_semaphoreAddCharEvt.give();
248246
break;
249247
} // Reached the correct service.
250248
break;
@@ -288,6 +286,7 @@ void BLEService::handleGATTServerEvent(
288286
} // Default
289287
} // Switch
290288

289+
// Invoke the GATTS handler in each of the associated characteristics.
291290
m_characteristicMap.handleGATTServerEvent(event, gatts_if, param);
292291
} // handleGATTServerEvent
293292

cpp_utils/BLEService.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ class BLEService {
7979
BLECharacteristic* m_lastCreatedCharacteristic;
8080
BLEServer* m_pServer;
8181
//FreeRTOS::Semaphore m_serializeMutex;
82-
FreeRTOS::Semaphore m_semaphoreAddCharEvt = FreeRTOS::Semaphore("AddCharEvt");
8382
FreeRTOS::Semaphore m_semaphoreCreateEvt = FreeRTOS::Semaphore("CreateEvt");
8483
FreeRTOS::Semaphore m_semaphoreStartEvt = FreeRTOS::Semaphore("StartEvt");
8584
BLEUUID m_uuid;

0 commit comments

Comments
 (0)
0