Skip to content

Commit 3b515e4

Browse files
update comments
1 parent fef81a2 commit 3b515e4

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

features/FEATURE_BLE/source/generic/GenericGap.tpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1607,8 +1607,9 @@ void GenericGap<PalGapImpl, PalSecurityManager, ConnectionEventMonitorEventHandl
16071607

16081608
_scan_enabled = false;
16091609

1610-
/* if timeout happened on a 4.2 chip we need to stop the scan manually */
16111610
if (!is_extended_advertising_available()) {
1611+
/* if timeout happened on a 4.2 chip this means legacy scanning and a timer timeout
1612+
* but we need to handle the event from user context - use the event queue to handle it */
16121613
_event_queue.post(
16131614
mbed::callback(
16141615
this,
@@ -1629,6 +1630,7 @@ void GenericGap<PalGapImpl, PalSecurityManager, ConnectionEventMonitorEventHandl
16291630
template <template<class> class PalGapImpl, class PalSecurityManager, class ConnectionEventMonitorEventHandler>
16301631
void GenericGap<PalGapImpl, PalSecurityManager, ConnectionEventMonitorEventHandler>::process_legacy_scan_timeout()
16311632
{
1633+
/* legacy scanning timed out is based on timer so we need to stop the scan manually */
16321634
_pal_gap.scan_enable(false, false);
16331635
#if BLE_FEATURE_PRIVACY
16341636
set_random_address_rotation(false);
@@ -3280,7 +3282,6 @@ ble_error_t GenericGap<PalGapImpl, PalSecurityManager, ConnectionEventMonitorEve
32803282

32813283
_scan_timeout.detach();
32823284
if (duration.value()) {
3283-
/**/
32843285
_scan_timeout.attach_us(
32853286
mbed::callback(this, &GenericGap::on_scan_timeout_),
32863287
microsecond_t(duration).value()

0 commit comments

Comments
 (0)