mirror of https://github.com/ARMmbed/mbed-os.git
BLE: Fix advertising set issues on legacy controllers.
parent
3ae38ac1e8
commit
daf0f429c8
|
@ -1908,8 +1908,13 @@ const size_t GenericGap::MAX_HCI_DATA_LENGTH;
|
||||||
uint8_t GenericGap::getMaxAdvertisingSetNumber()
|
uint8_t GenericGap::getMaxAdvertisingSetNumber()
|
||||||
{
|
{
|
||||||
useVersionTwoAPI();
|
useVersionTwoAPI();
|
||||||
uint8_t set_number = _pal_gap.get_max_number_of_advertising_sets();
|
|
||||||
return std::min(MAX_ADVERTISING_SETS, set_number);
|
if (is_extended_advertising_available()) {
|
||||||
|
uint8_t set_number = _pal_gap.get_max_number_of_advertising_sets();
|
||||||
|
return std::min(MAX_ADVERTISING_SETS, set_number);
|
||||||
|
} else {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t GenericGap::getMaxAdvertisingDataLength()
|
uint8_t GenericGap::getMaxAdvertisingDataLength()
|
||||||
|
|
Loading…
Reference in New Issue