mirror of https://github.com/ARMmbed/mbed-os.git
BLE: move GapAdvertisingParameters to ble::AdvertisingParameters
parent
1324116377
commit
f0cbd9f434
|
@ -1735,7 +1735,7 @@ public:
|
|||
*/
|
||||
virtual ble_error_t createAdvertisingSet(
|
||||
AdvHandle_t *handle,
|
||||
const GapAdvertisingParameters ¶meters
|
||||
const ble::AdvertisingParameters ¶meters
|
||||
)
|
||||
{
|
||||
(void) handle;
|
||||
|
@ -1765,7 +1765,7 @@ public:
|
|||
*/
|
||||
virtual ble_error_t setAdvertisingParams(
|
||||
AdvHandle_t handle,
|
||||
const GapAdvertisingParameters ¶ms
|
||||
const ble::AdvertisingParameters ¶ms
|
||||
) {
|
||||
(void) handle;
|
||||
(void) params;
|
||||
|
|
|
@ -29,6 +29,8 @@
|
|||
* @{
|
||||
*/
|
||||
|
||||
namespace ble {
|
||||
|
||||
/**
|
||||
* Parameters defining the advertising process.
|
||||
*
|
||||
|
@ -42,7 +44,7 @@
|
|||
* - Duration of the advertising process. As others, it can be set at
|
||||
* construction time, modified by setTimeout() and retrieved by getTimeout().
|
||||
*/
|
||||
class GapAdvertisingParameters {
|
||||
class AdvertisingParameters {
|
||||
public:
|
||||
|
||||
/**
|
||||
|
@ -99,7 +101,7 @@ public:
|
|||
*
|
||||
* @note If value in input are out of range, they will be normalized.
|
||||
*/
|
||||
GapAdvertisingParameters(
|
||||
AdvertisingParameters(
|
||||
ble::advertising_type_t advType = ble::ADV_CONNECTABLE_UNDIRECTED,
|
||||
uint32_t minInterval = GAP_ADV_PARAMS_INTERVAL_MIN_NONCON,
|
||||
uint32_t maxInterval = GAP_ADV_PARAMS_INTERVAL_MAX,
|
||||
|
@ -691,6 +693,8 @@ private:
|
|||
uint8_t _includeHeaderTxPower:1;
|
||||
};
|
||||
|
||||
} // namespace ble
|
||||
|
||||
/**
|
||||
* @}
|
||||
* @}
|
||||
|
|
|
@ -82,14 +82,14 @@ public:
|
|||
|
||||
ble_error_t createAdvertisingSet(
|
||||
AdvHandle_t *handle,
|
||||
const GapAdvertisingParameters ¶meters
|
||||
const AdvertisingParameters ¶meters
|
||||
);
|
||||
|
||||
ble_error_t destroyAdvertisingSet(AdvHandle_t handle);
|
||||
|
||||
ble_error_t setAdvertisingParams(
|
||||
AdvHandle_t handle,
|
||||
const GapAdvertisingParameters ¶ms
|
||||
const AdvertisingParameters ¶ms
|
||||
);
|
||||
|
||||
ble_error_t setAdvertisingPayload(
|
||||
|
@ -670,7 +670,7 @@ private:
|
|||
private:
|
||||
ble_error_t setExtendedAdvertisingParameters(
|
||||
AdvHandle_t handle,
|
||||
const GapAdvertisingParameters ¶meters
|
||||
const AdvertisingParameters ¶meters
|
||||
);
|
||||
|
||||
bool is_extended_advertising_available();
|
||||
|
|
|
@ -435,7 +435,7 @@ GenericGap::GenericGap(
|
|||
if (is_extended_advertising_available()) {
|
||||
setExtendedAdvertisingParameters(
|
||||
LEGACY_ADVERTISING_HANDLE,
|
||||
GapAdvertisingParameters()
|
||||
AdvertisingParameters()
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -1658,7 +1658,7 @@ uint8_t GenericGap::getMaxAdvertisingDataLength()
|
|||
|
||||
ble_error_t GenericGap::createAdvertisingSet(
|
||||
AdvHandle_t *handle,
|
||||
const GapAdvertisingParameters ¶meters
|
||||
const AdvertisingParameters ¶meters
|
||||
)
|
||||
{
|
||||
if (is_extended_advertising_available()) {
|
||||
|
@ -1724,7 +1724,7 @@ ble_error_t GenericGap::destroyAdvertisingSet(AdvHandle_t handle) {
|
|||
|
||||
ble_error_t GenericGap::setAdvertisingParams(
|
||||
AdvHandle_t handle,
|
||||
const GapAdvertisingParameters ¶ms
|
||||
const AdvertisingParameters ¶ms
|
||||
) {
|
||||
if (handle >= getMaxAdvertisingSetNumber()) {
|
||||
return BLE_ERROR_INVALID_PARAM;
|
||||
|
@ -1762,7 +1762,7 @@ ble_error_t GenericGap::setAdvertisingParams(
|
|||
|
||||
ble_error_t GenericGap::setExtendedAdvertisingParameters(
|
||||
AdvHandle_t handle,
|
||||
const GapAdvertisingParameters ¶ms
|
||||
const AdvertisingParameters ¶ms
|
||||
)
|
||||
{
|
||||
if (handle >= getMaxAdvertisingSetNumber()) {
|
||||
|
|
Loading…
Reference in New Issue