Skip to content

Commit eeca03f

Browse files
committed
BLE - Fix exclusion of getMaxAdvertisingSetNumber and getMaxAdvertisingDataLength
1 parent 3142f26 commit eeca03f

File tree

2 files changed

+16
-14
lines changed

2 files changed

+16
-14
lines changed

features/FEATURE_BLE/ble/generic/GenericGap.h

Lines changed: 2 additions & 0 deletions
Original file line numberOriginal file lineDiff line numberDiff line change
@@ -93,8 +93,10 @@ class GenericGap :
93
typedef typename LegacyGap::Role_t Role_t;
93
typedef typename LegacyGap::Role_t Role_t;
94

94

95
// Imports from Gap
95
// Imports from Gap
96+
#if BLE_ROLE_BROADCASTER
96
using ble::interface::Gap<GenericGap>::getMaxAdvertisingSetNumber;
97
using ble::interface::Gap<GenericGap>::getMaxAdvertisingSetNumber;
97
using ble::interface::Gap<GenericGap>::getMaxAdvertisingDataLength;
98
using ble::interface::Gap<GenericGap>::getMaxAdvertisingDataLength;
99+
#endif // BLE_ROLE_BROADCASTER
98
using ble::interface::Gap<GenericGap>::isFeatureSupported;
100
using ble::interface::Gap<GenericGap>::isFeatureSupported;
99
using ble::interface::Gap<GenericGap>::useVersionOneAPI;
101
using ble::interface::Gap<GenericGap>::useVersionOneAPI;
100
using ble::interface::Gap<GenericGap>::useVersionTwoAPI;
102
using ble::interface::Gap<GenericGap>::useVersionTwoAPI;

features/FEATURE_BLE/source/generic/GenericGap.tpp

Lines changed: 14 additions & 14 deletions
Original file line numberOriginal file lineDiff line numberDiff line change
@@ -2234,7 +2234,7 @@ ble_error_t GenericGap<PalGapImpl, PalSecurityManager, ConnectionEventMonitorEve
2234
}
2234
}
2235

2235

2236
uint8_t new_handle = LEGACY_ADVERTISING_HANDLE + 1;
2236
uint8_t new_handle = LEGACY_ADVERTISING_HANDLE + 1;
2237-
uint8_t end = getMaxAdvertisingSetNumber();
2237+
uint8_t end = getMaxAdvertisingSetNumber_();
2238

2238

2239
*handle = INVALID_ADVERTISING_HANDLE;
2239
*handle = INVALID_ADVERTISING_HANDLE;
2240

2240

@@ -2271,7 +2271,7 @@ ble_error_t GenericGap<PalGapImpl, PalSecurityManager, ConnectionEventMonitorEve
2271
return BLE_ERROR_INVALID_PARAM;
2271
return BLE_ERROR_INVALID_PARAM;
2272
}
2272
}
2273

2273

2274-
if (handle >= getMaxAdvertisingSetNumber()) {
2274+
if (handle >= getMaxAdvertisingSetNumber_()) {
2275
return BLE_ERROR_INVALID_PARAM;
2275
return BLE_ERROR_INVALID_PARAM;
2276
}
2276
}
2277

2277

@@ -2308,7 +2308,7 @@ ble_error_t GenericGap<PalGapImpl, PalSecurityManager, ConnectionEventMonitorEve
2308
useVersionTwoAPI();
2308
useVersionTwoAPI();
2309

2309

2310
#if BLE_FEATURE_EXTENDED_ADVERTISING
2310
#if BLE_FEATURE_EXTENDED_ADVERTISING
2311-
if (handle >= getMaxAdvertisingSetNumber()) {
2311+
if (handle >= getMaxAdvertisingSetNumber_()) {
2312
return BLE_ERROR_INVALID_PARAM;
2312
return BLE_ERROR_INVALID_PARAM;
2313
}
2313
}
2314

2314

@@ -2350,7 +2350,7 @@ ble_error_t GenericGap<PalGapImpl, PalSecurityManager, ConnectionEventMonitorEve
2350
const AdvertisingParameters &params
2350
const AdvertisingParameters &params
2351
)
2351
)
2352
{
2352
{
2353-
if (handle >= getMaxAdvertisingSetNumber()) {
2353+
if (handle >= getMaxAdvertisingSetNumber_()) {
2354
return BLE_ERROR_INVALID_PARAM;
2354
return BLE_ERROR_INVALID_PARAM;
2355
}
2355
}
2356

2356

@@ -2466,7 +2466,7 @@ ble_error_t GenericGap<PalGapImpl, PalSecurityManager, ConnectionEventMonitorEve
2466
);
2466
);
2467

2467

2468
#if BLE_FEATURE_EXTENDED_ADVERTISING
2468
#if BLE_FEATURE_EXTENDED_ADVERTISING
2469-
if (handle >= getMaxAdvertisingSetNumber()) {
2469+
if (handle >= getMaxAdvertisingSetNumber_()) {
2470
return BLE_ERROR_INVALID_PARAM;
2470
return BLE_ERROR_INVALID_PARAM;
2471
}
2471
}
2472

2472

@@ -2575,7 +2575,7 @@ ble_error_t GenericGap<PalGapImpl, PalSecurityManager, ConnectionEventMonitorEve
2575
ble_error_t error = BLE_ERROR_NONE;
2575
ble_error_t error = BLE_ERROR_NONE;
2576

2576

2577
#if BLE_FEATURE_EXTENDED_ADVERTISING
2577
#if BLE_FEATURE_EXTENDED_ADVERTISING
2578-
if (handle >= getMaxAdvertisingSetNumber()) {
2578+
if (handle >= getMaxAdvertisingSetNumber_()) {
2579
return BLE_ERROR_INVALID_PARAM;
2579
return BLE_ERROR_INVALID_PARAM;
2580
}
2580
}
2581

2581

@@ -2634,7 +2634,7 @@ ble_error_t GenericGap<PalGapImpl, PalSecurityManager, ConnectionEventMonitorEve
2634
ble_error_t status;
2634
ble_error_t status;
2635

2635

2636
#if BLE_FEATURE_EXTENDED_ADVERTISING
2636
#if BLE_FEATURE_EXTENDED_ADVERTISING
2637-
if (handle >= getMaxAdvertisingSetNumber()) {
2637+
if (handle >= getMaxAdvertisingSetNumber_()) {
2638
return BLE_ERROR_INVALID_PARAM;
2638
return BLE_ERROR_INVALID_PARAM;
2639
}
2639
}
2640

2640

@@ -2686,7 +2686,7 @@ bool GenericGap<PalGapImpl, PalSecurityManager, ConnectionEventMonitorEventHandl
2686
{
2686
{
2687
useVersionTwoAPI();
2687
useVersionTwoAPI();
2688

2688

2689-
if (handle >= getMaxAdvertisingSetNumber()) {
2689+
if (handle >= getMaxAdvertisingSetNumber_()) {
2690
return false;
2690
return false;
2691
}
2691
}
2692

2692

@@ -2711,7 +2711,7 @@ ble_error_t GenericGap<PalGapImpl, PalSecurityManager, ConnectionEventMonitorEve
2711
return BLE_ERROR_INVALID_PARAM;
2711
return BLE_ERROR_INVALID_PARAM;
2712
}
2712
}
2713

2713

2714-
if (handle >= getMaxAdvertisingSetNumber()) {
2714+
if (handle >= getMaxAdvertisingSetNumber_()) {
2715
return BLE_ERROR_INVALID_PARAM;
2715
return BLE_ERROR_INVALID_PARAM;
2716
}
2716
}
2717

2717

@@ -2739,15 +2739,15 @@ ble_error_t GenericGap<PalGapImpl, PalSecurityManager, ConnectionEventMonitorEve
2739
return BLE_ERROR_INVALID_PARAM;
2739
return BLE_ERROR_INVALID_PARAM;
2740
}
2740
}
2741

2741

2742-
if (handle >= getMaxAdvertisingSetNumber()) {
2742+
if (handle >= getMaxAdvertisingSetNumber_()) {
2743
return BLE_ERROR_INVALID_PARAM;
2743
return BLE_ERROR_INVALID_PARAM;
2744
}
2744
}
2745

2745

2746
if (!_existing_sets.get(handle)) {
2746
if (!_existing_sets.get(handle)) {
2747
return BLE_ERROR_INVALID_PARAM;
2747
return BLE_ERROR_INVALID_PARAM;
2748
}
2748
}
2749

2749

2750-
if (payload.size() > getMaxAdvertisingDataLength()) {
2750+
if (payload.size() > getMaxAdvertisingDataLength_()) {
2751
return BLE_ERROR_INVALID_PARAM;
2751
return BLE_ERROR_INVALID_PARAM;
2752
}
2752
}
2753

2753

@@ -2801,7 +2801,7 @@ ble_error_t GenericGap<PalGapImpl, PalSecurityManager, ConnectionEventMonitorEve
2801
return BLE_ERROR_INVALID_PARAM;
2801
return BLE_ERROR_INVALID_PARAM;
2802
}
2802
}
2803

2803

2804-
if (handle >= getMaxAdvertisingSetNumber()) {
2804+
if (handle >= getMaxAdvertisingSetNumber_()) {
2805
return BLE_ERROR_INVALID_PARAM;
2805
return BLE_ERROR_INVALID_PARAM;
2806
}
2806
}
2807

2807

@@ -2835,7 +2835,7 @@ ble_error_t GenericGap<PalGapImpl, PalSecurityManager, ConnectionEventMonitorEve
2835
return BLE_ERROR_INVALID_PARAM;
2835
return BLE_ERROR_INVALID_PARAM;
2836
}
2836
}
2837

2837

2838-
if (handle >= getMaxAdvertisingSetNumber()) {
2838+
if (handle >= getMaxAdvertisingSetNumber_()) {
2839
return BLE_ERROR_INVALID_PARAM;
2839
return BLE_ERROR_INVALID_PARAM;
2840
}
2840
}
2841

2841

@@ -2861,7 +2861,7 @@ bool GenericGap<PalGapImpl, PalSecurityManager, ConnectionEventMonitorEventHandl
2861
{
2861
{
2862
useVersionTwoAPI();
2862
useVersionTwoAPI();
2863

2863

2864-
if (handle >= getMaxAdvertisingSetNumber()) {
2864+
if (handle >= getMaxAdvertisingSetNumber_()) {
2865
return false;
2865
return false;
2866
}
2866
}
2867

2867

0 commit comments

Comments
 (0)