@@ -409,7 +409,6 @@ class LegacyGap :
409
409
CENTRAL = 0x2 ,
410
410
};
411
411
412
- #if BLE_ROLE_OBSERVER
413
412
/* *
414
413
* Representation of a scanned advertising packet.
415
414
*
@@ -484,9 +483,7 @@ class LegacyGap :
484
483
*/
485
484
typedef FunctionPointerWithContext<const AdvertisementCallbackParams_t *>
486
485
AdvertisementReportCallback_t;
487
- #endif // BLE_ROLE_OBSERVER
488
486
489
- #if BLE_FEATURE_CONNECTABLE
490
487
/* *
491
488
* Connection events.
492
489
*
@@ -678,21 +675,15 @@ class LegacyGap :
678
675
}
679
676
};
680
677
681
- #endif // BLE_FEATURE_CONNECTABLE
682
- #if BLE_FEATURE_PRIVACY
683
- #if BLE_ROLE_PERIPHERAL
684
678
/* *
685
679
* @copydoc ble::peripheral_privacy_configuration_t
686
680
*/
687
681
typedef ble::peripheral_privacy_configuration_t PeripheralPrivacyConfiguration_t;
688
- #endif // BLE_ROLE_PERIPHERAL
689
- #if BLE_ROLE_CENTRAL
682
+
690
683
/* *
691
684
* @copydoc ble::central_privay_configuration_t
692
685
*/
693
686
typedef ble::central_privay_configuration_t CentralPrivacyConfiguration_t;
694
- #endif // BLE_ROLE_CENTRAL
695
- #endif // BLE_FEATURE_PRIVACY
696
687
697
688
/* *
698
689
* Number of microseconds in 1.25 milliseconds.
@@ -728,7 +719,7 @@ class LegacyGap :
728
719
*/
729
720
typedef CallChainOfFunctionPointersWithContext<TimeoutSource_t>
730
721
TimeoutEventCallbackChain_t;
731
- # if BLE_FEATURE_CONNECTABLE
722
+
732
723
/* *
733
724
* Connection event handler.
734
725
*
@@ -760,7 +751,7 @@ class LegacyGap :
760
751
*/
761
752
typedef CallChainOfFunctionPointersWithContext<const DisconnectionCallbackParams_t *>
762
753
DisconnectionEventCallbackChain_t;
763
- # endif // BLE_FEATURE_CONNECTABLE
754
+
764
755
/* *
765
756
* Radio notification event handler.
766
757
*
@@ -2267,7 +2258,6 @@ class LegacyGap :
2267
2258
2268
2259
/* Entry points for the underlying stack to report events back to the user. */
2269
2260
public:
2270
- #if BLE_FEATURE_CONNECTABLE
2271
2261
/* *
2272
2262
* Notify all registered connection event handlers of a connection event.
2273
2263
*
@@ -2362,8 +2352,7 @@ class LegacyGap :
2362
2352
" Use EventHandler::onDisconnectionComplete() instead"
2363
2353
)
2364
2354
void processDisconnectionEvent(Handle_t handle, DisconnectionReason_t reason);
2365
- #endif // BLE_FEATURE_CONNECTABLE
2366
- #if BLE_ROLE_OBSERVER
2355
+
2367
2356
/* *
2368
2357
* Forward a received advertising packet to all registered event handlers
2369
2358
* listening for scanned packet events.
@@ -2433,7 +2422,7 @@ class LegacyGap :
2433
2422
const uint8_t *advertisingData,
2434
2423
BLEProtocol::AddressType_t addressType = BLEProtocol::AddressType::RANDOM_STATIC
2435
2424
);
2436
- # endif // BLE_ROLE_OBSERVER
2425
+
2437
2426
/* *
2438
2427
* Notify the occurrence of a timeout event to all registered timeout events
2439
2428
* handler.
@@ -2454,7 +2443,6 @@ class LegacyGap :
2454
2443
void processTimeoutEvent(TimeoutSource_t source);
2455
2444
2456
2445
protected:
2457
- #if BLE_ROLE_BROADCASTER
2458
2446
/* *
2459
2447
* Current advertising parameters.
2460
2448
*/
@@ -2464,36 +2452,31 @@ class LegacyGap :
2464
2452
* Current advertising data.
2465
2453
*/
2466
2454
GapAdvertisingData _advPayload;
2467
- #endif // BLE_ROLE_BROADCASTER
2468
- #if BLE_ROLE_OBSERVER
2455
+
2469
2456
/* *
2470
2457
* Current scanning parameters.
2471
2458
*/
2472
2459
GapScanningParams _scanningParams;
2473
- #endif // BLE_ROLE_OBSERVER
2474
- #if BLE_ROLE_BROADCASTER
2460
+
2475
2461
/* *
2476
2462
* Current scan response.
2477
2463
*/
2478
2464
GapAdvertisingData _scanResponse;
2479
- #endif // BLE_ROLE_BROADCASTER
2480
- #if BLE_FEATURE_CONNECTABLE
2465
+
2481
2466
/* *
2482
2467
* Number of open connections.
2483
2468
*/
2484
2469
uint8_t connectionCount;
2485
- #endif // BLE_FEATURE_CONNECTABLE
2486
2470
2487
2471
/* *
2488
2472
* Current GAP state.
2489
2473
*/
2490
2474
GapState_t state;
2491
- # if BLE_ROLE_OBSERVER
2475
+
2492
2476
/* *
2493
2477
* Active scanning flag.
2494
2478
*/
2495
2479
bool scanningActive;
2496
- #endif // BLE_ROLE_OBSERVER
2497
2480
2498
2481
protected:
2499
2482
/* *
@@ -2507,14 +2490,12 @@ class LegacyGap :
2507
2490
*/
2508
2491
RadioNotificationEventCallback_t radioNotificationCallback;
2509
2492
2510
- #if BLE_ROLE_OBSERVER
2511
2493
/* *
2512
2494
* The registered callback handler for scanned advertisement packet
2513
2495
* notifications.
2514
2496
*/
2515
2497
AdvertisementReportCallback_t onAdvertisementReport;
2516
- #endif // BLE_ROLE_OBSERVER
2517
- #if BLE_FEATURE_CONNECTABLE
2498
+
2518
2499
/* *
2519
2500
* Callchain containing all registered callback handlers for connection
2520
2501
* events.
@@ -2526,7 +2507,7 @@ class LegacyGap :
2526
2507
* events.
2527
2508
*/
2528
2509
DisconnectionEventCallbackChain_t disconnectionCallChain;
2529
- # endif // BLE_FEATURE_CONNECTABLE
2510
+
2530
2511
private:
2531
2512
/* *
2532
2513
* Callchain containing all registered callback handlers for shutdown
0 commit comments