File tree Expand file tree Collapse file tree 2 files changed +52
-0
lines changed
targets/TARGET_CORDIO/source Expand file tree Collapse file tree 2 files changed +52
-0
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,32 @@ namespace interface {
22
22
template <class Impl >
23
23
bool Gap<Impl>::isFeatureSupported(controller_supported_features_t feature)
24
24
{
25
+ #if !BLE_FEATURE_PHY_MANAGEMENT
26
+ if (feature == ble::controller_supported_features_t ::LE_CODED_PHY ||
27
+ feature == ble::controller_supported_features_t ::LE_2M_PHY
28
+ ) {
29
+ return false ;
30
+ }
31
+ #endif
32
+
33
+ #if !BLE_FEATURE_EXTENDED_ADVERTISING
34
+ if (feature == ble::controller_supported_features_t ::LE_EXTENDED_ADVERTISING) {
35
+ return false ;
36
+ }
37
+ #endif
38
+
39
+ #if !BLE_FEATURE_PERIODIC_ADVERTISING
40
+ if (feature == ble::controller_supported_features_t ::LE_PERIODIC_ADVERTISING) {
41
+ return false ;
42
+ }
43
+ #endif
44
+
45
+ #if !BLE_FEATURE_PRIVACY
46
+ if (feature == ble::controller_supported_features_t ::LL_PRIVACY) {
47
+ return false ;
48
+ }
49
+ #endif
50
+
25
51
return impl ()->isFeatureSupported_ (feature);
26
52
}
27
53
Original file line number Diff line number Diff line change @@ -35,6 +35,32 @@ bool Gap<EventHandler>::is_feature_supported_(
35
35
ble::controller_supported_features_t feature
36
36
)
37
37
{
38
+ #if !BLE_FEATURE_PHY_MANAGEMENT
39
+ if (feature == ble::controller_supported_features_t ::LE_CODED_PHY ||
40
+ feature == ble::controller_supported_features_t ::LE_2M_PHY
41
+ ) {
42
+ return false ;
43
+ }
44
+ #endif
45
+
46
+ #if !BLE_FEATURE_EXTENDED_ADVERTISING
47
+ if (feature == ble::controller_supported_features_t ::LE_EXTENDED_ADVERTISING) {
48
+ return false ;
49
+ }
50
+ #endif
51
+
52
+ #if !BLE_FEATURE_PERIODIC_ADVERTISING
53
+ if (feature == ble::controller_supported_features_t ::LE_PERIODIC_ADVERTISING) {
54
+ return false ;
55
+ }
56
+ #endif
57
+
58
+ #if !BLE_FEATURE_PRIVACY
59
+ if (feature == ble::controller_supported_features_t ::LL_PRIVACY) {
60
+ return false ;
61
+ }
62
+ #endif
63
+
38
64
return (HciGetLeSupFeat () & (1 << feature.value ()));
39
65
}
40
66
You can’t perform that action at this time.
0 commit comments