mirror of https://github.com/ARMmbed/mbed-os.git
BLE: Fix the number of advertising sets supported
The number of advertising sets supported is the minimum of advertising sets supported beween the host and the controller.pull/8998/head
parent
4e5240b743
commit
e7f81fe7e8
|
@ -923,7 +923,7 @@ uint16_t Gap::get_maximum_advertising_data_length()
|
||||||
|
|
||||||
uint8_t Gap::get_max_number_of_advertising_sets()
|
uint8_t Gap::get_max_number_of_advertising_sets()
|
||||||
{
|
{
|
||||||
return HciGetNumSupAdvSets();
|
return std::min(HciGetNumSupAdvSets(), (uint8_t) DM_NUM_ADV_SETS);
|
||||||
}
|
}
|
||||||
|
|
||||||
ble_error_t Gap::remove_advertising_set(advertising_handle_t advertising_handle)
|
ble_error_t Gap::remove_advertising_set(advertising_handle_t advertising_handle)
|
||||||
|
|
Loading…
Reference in New Issue