mirror of https://github.com/ARMmbed/mbed-os.git
fix constness to match recent const changes
parent
b293426a81
commit
e9c0f587af
|
@ -52,7 +52,7 @@ public:
|
||||||
*
|
*
|
||||||
* @param event Advertising report @see AdvertisingReportEvent_t for details.
|
* @param event Advertising report @see AdvertisingReportEvent_t for details.
|
||||||
*/
|
*/
|
||||||
virtual void onAdvertisingReport(const AdvertisingReportEvent &event) { }
|
void onAdvertisingReport(const AdvertisingReportEvent &event) { }
|
||||||
|
|
||||||
/** Called when scan times out.
|
/** Called when scan times out.
|
||||||
*/
|
*/
|
||||||
|
@ -229,7 +229,7 @@ public:
|
||||||
*/
|
*/
|
||||||
virtual ble_error_t setAdvertisingPayload(
|
virtual ble_error_t setAdvertisingPayload(
|
||||||
advertising_handle_t handle,
|
advertising_handle_t handle,
|
||||||
mbed::Span<uint8_t> payload,
|
mbed::Span<const uint8_t> payload,
|
||||||
bool minimiseFragmentation = false
|
bool minimiseFragmentation = false
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -243,7 +243,7 @@ public:
|
||||||
*/
|
*/
|
||||||
virtual ble_error_t setAdvertisingScanResponse(
|
virtual ble_error_t setAdvertisingScanResponse(
|
||||||
advertising_handle_t handle,
|
advertising_handle_t handle,
|
||||||
mbed::Span<uint8_t> response,
|
mbed::Span<const uint8_t> response,
|
||||||
bool minimiseFragmentation = false
|
bool minimiseFragmentation = false
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -298,7 +298,7 @@ public:
|
||||||
*/
|
*/
|
||||||
virtual ble_error_t setPeriodicAdvertisingPayload(
|
virtual ble_error_t setPeriodicAdvertisingPayload(
|
||||||
advertising_handle_t handle,
|
advertising_handle_t handle,
|
||||||
mbed::Span<uint8_t> payload
|
mbed::Span<const uint8_t> payload
|
||||||
);
|
);
|
||||||
|
|
||||||
/** Start periodic advertising for a given set. Periodic advertising will not start until
|
/** Start periodic advertising for a given set. Periodic advertising will not start until
|
||||||
|
|
|
@ -78,55 +78,55 @@ public:
|
||||||
|
|
||||||
/** @copydoc Gap::IsFeatureSupported
|
/** @copydoc Gap::IsFeatureSupported
|
||||||
*/
|
*/
|
||||||
bool isFeatureSupported(
|
virtual bool isFeatureSupported(
|
||||||
controller_supported_features_t feature
|
controller_supported_features_t feature
|
||||||
);
|
);
|
||||||
|
|
||||||
/** @copydoc Gap::getMaxAdvertisingSetNumber
|
/** @copydoc Gap::getMaxAdvertisingSetNumber
|
||||||
*/
|
*/
|
||||||
uint8_t getMaxAdvertisingSetNumber();
|
virtual uint8_t getMaxAdvertisingSetNumber();
|
||||||
|
|
||||||
/** @copydoc Gap::getMaxAdvertisingDataLength
|
/** @copydoc Gap::getMaxAdvertisingDataLength
|
||||||
*/
|
*/
|
||||||
uint8_t getMaxAdvertisingDataLength();
|
virtual uint8_t getMaxAdvertisingDataLength();
|
||||||
|
|
||||||
/** @copydoc Gap::createAdvertisingSet
|
/** @copydoc Gap::createAdvertisingSet
|
||||||
*/
|
*/
|
||||||
ble_error_t createAdvertisingSet(
|
virtual ble_error_t createAdvertisingSet(
|
||||||
advertising_handle_t *handle,
|
advertising_handle_t *handle,
|
||||||
const AdvertisingParameters ¶meters
|
const AdvertisingParameters ¶meters
|
||||||
);
|
);
|
||||||
|
|
||||||
/** @copydoc Gap::destroyAdvertisingSet
|
/** @copydoc Gap::destroyAdvertisingSet
|
||||||
*/
|
*/
|
||||||
ble_error_t destroyAdvertisingSet(advertising_handle_t handle);
|
virtual ble_error_t destroyAdvertisingSet(advertising_handle_t handle);
|
||||||
|
|
||||||
/** @copydoc Gap::setAdvertisingParams
|
/** @copydoc Gap::setAdvertisingParams
|
||||||
*/
|
*/
|
||||||
ble_error_t setAdvertisingParameters(
|
virtual ble_error_t setAdvertisingParameters(
|
||||||
advertising_handle_t handle,
|
advertising_handle_t handle,
|
||||||
const AdvertisingParameters ¶ms
|
const AdvertisingParameters ¶ms
|
||||||
);
|
);
|
||||||
|
|
||||||
/** @copydoc Gap::setAdvertisingPayload
|
/** @copydoc Gap::setAdvertisingPayload
|
||||||
*/
|
*/
|
||||||
ble_error_t setAdvertisingPayload(
|
virtual ble_error_t setAdvertisingPayload(
|
||||||
advertising_handle_t handle,
|
advertising_handle_t handle,
|
||||||
mbed::Span<uint8_t> payload,
|
mbed::Span<const uint8_t> payload,
|
||||||
bool minimiseFragmentation
|
bool minimiseFragmentation
|
||||||
);
|
);
|
||||||
|
|
||||||
/** @copydoc Gap::setAdvertisingScanResponse
|
/** @copydoc Gap::setAdvertisingScanResponse
|
||||||
*/
|
*/
|
||||||
ble_error_t setAdvertisingScanResponse(
|
virtual ble_error_t setAdvertisingScanResponse(
|
||||||
advertising_handle_t handle,
|
advertising_handle_t handle,
|
||||||
mbed::Span<uint8_t> response,
|
mbed::Span<const uint8_t> response,
|
||||||
bool minimiseFragmentation
|
bool minimiseFragmentation
|
||||||
);
|
);
|
||||||
|
|
||||||
/** @copydoc Gap::startAdvertising
|
/** @copydoc Gap::startAdvertising
|
||||||
*/
|
*/
|
||||||
ble_error_t startAdvertising(
|
virtual ble_error_t startAdvertising(
|
||||||
advertising_handle_t handle,
|
advertising_handle_t handle,
|
||||||
adv_duration_t maxDuration,
|
adv_duration_t maxDuration,
|
||||||
uint8_t maxEvents
|
uint8_t maxEvents
|
||||||
|
@ -134,11 +134,11 @@ public:
|
||||||
|
|
||||||
/** @copydoc Gap::stopAdvertising
|
/** @copydoc Gap::stopAdvertising
|
||||||
*/
|
*/
|
||||||
ble_error_t stopAdvertising(advertising_handle_t handle);
|
virtual ble_error_t stopAdvertising(advertising_handle_t handle);
|
||||||
|
|
||||||
/** @copydoc Gap::isAdvertisingActive
|
/** @copydoc Gap::isAdvertisingActive
|
||||||
*/
|
*/
|
||||||
bool isAdvertisingActive(advertising_handle_t handle);
|
virtual bool isAdvertisingActive(advertising_handle_t handle);
|
||||||
|
|
||||||
/** @copydoc Gap::setPeriodicAdvertisingParameters
|
/** @copydoc Gap::setPeriodicAdvertisingParameters
|
||||||
*/
|
*/
|
||||||
|
@ -153,7 +153,7 @@ public:
|
||||||
*/
|
*/
|
||||||
virtual ble_error_t setPeriodicAdvertisingPayload(
|
virtual ble_error_t setPeriodicAdvertisingPayload(
|
||||||
advertising_handle_t handle,
|
advertising_handle_t handle,
|
||||||
mbed::Span<uint8_t> payload
|
mbed::Span<const uint8_t> payload
|
||||||
);
|
);
|
||||||
|
|
||||||
/** @copydoc Gap::startPeriodicAdvertising
|
/** @copydoc Gap::startPeriodicAdvertising
|
||||||
|
@ -529,7 +529,7 @@ public:
|
||||||
/**
|
/**
|
||||||
* @copydoc ::Gap::processConnectionEvent
|
* @copydoc ::Gap::processConnectionEvent
|
||||||
*/
|
*/
|
||||||
void processConnectionEvent(
|
virtual void processConnectionEvent(
|
||||||
Handle_t handle,
|
Handle_t handle,
|
||||||
Role_t role,
|
Role_t role,
|
||||||
peer_address_type_t peerAddrType,
|
peer_address_type_t peerAddrType,
|
||||||
|
@ -544,7 +544,7 @@ public:
|
||||||
/**
|
/**
|
||||||
* @copydoc ::Gap::processDisconnectionEvent
|
* @copydoc ::Gap::processDisconnectionEvent
|
||||||
*/
|
*/
|
||||||
void processDisconnectionEvent(
|
virtual void processDisconnectionEvent(
|
||||||
Handle_t handle,
|
Handle_t handle,
|
||||||
DisconnectionReason_t reason
|
DisconnectionReason_t reason
|
||||||
);
|
);
|
||||||
|
@ -552,7 +552,7 @@ public:
|
||||||
private:
|
private:
|
||||||
ble_error_t setAdvertisingData(
|
ble_error_t setAdvertisingData(
|
||||||
advertising_handle_t handle,
|
advertising_handle_t handle,
|
||||||
mbed::Span<uint8_t> payload,
|
mbed::Span<const uint8_t> payload,
|
||||||
bool minimiseFragmentation,
|
bool minimiseFragmentation,
|
||||||
bool scan_response
|
bool scan_response
|
||||||
);
|
);
|
||||||
|
|
|
@ -60,7 +60,7 @@ ble_error_t Gap::setAdvertisingParameters(
|
||||||
|
|
||||||
ble_error_t Gap::setAdvertisingPayload(
|
ble_error_t Gap::setAdvertisingPayload(
|
||||||
advertising_handle_t handle,
|
advertising_handle_t handle,
|
||||||
mbed::Span<uint8_t> payload,
|
mbed::Span<const uint8_t> payload,
|
||||||
bool minimiseFragmentation
|
bool minimiseFragmentation
|
||||||
) {
|
) {
|
||||||
/* Requesting action from porter(s): override this API if this capability is supported. */
|
/* Requesting action from porter(s): override this API if this capability is supported. */
|
||||||
|
@ -69,7 +69,7 @@ ble_error_t Gap::setAdvertisingPayload(
|
||||||
|
|
||||||
ble_error_t Gap::setAdvertisingScanResponse(
|
ble_error_t Gap::setAdvertisingScanResponse(
|
||||||
advertising_handle_t handle,
|
advertising_handle_t handle,
|
||||||
mbed::Span<uint8_t> response,
|
mbed::Span<const uint8_t> response,
|
||||||
bool minimiseFragmentation
|
bool minimiseFragmentation
|
||||||
) {
|
) {
|
||||||
/* Requesting action from porter(s): override this API if this capability is supported. */
|
/* Requesting action from porter(s): override this API if this capability is supported. */
|
||||||
|
@ -107,7 +107,7 @@ ble_error_t Gap::setPeriodicAdvertisingParameters(
|
||||||
|
|
||||||
ble_error_t Gap::setPeriodicAdvertisingPayload(
|
ble_error_t Gap::setPeriodicAdvertisingPayload(
|
||||||
advertising_handle_t handle,
|
advertising_handle_t handle,
|
||||||
mbed::Span<uint8_t> payload
|
mbed::Span<const uint8_t> payload
|
||||||
) {
|
) {
|
||||||
/* Requesting action from porter(s): override this API if this capability is supported. */
|
/* Requesting action from porter(s): override this API if this capability is supported. */
|
||||||
return BLE_ERROR_NOT_IMPLEMENTED;
|
return BLE_ERROR_NOT_IMPLEMENTED;
|
||||||
|
|
|
@ -1907,7 +1907,7 @@ ble_error_t GenericGap::setExtendedAdvertisingParameters(
|
||||||
|
|
||||||
ble_error_t GenericGap::setAdvertisingPayload(
|
ble_error_t GenericGap::setAdvertisingPayload(
|
||||||
advertising_handle_t handle,
|
advertising_handle_t handle,
|
||||||
mbed::Span<uint8_t> payload,
|
mbed::Span<const uint8_t> payload,
|
||||||
bool minimiseFragmentation
|
bool minimiseFragmentation
|
||||||
) {
|
) {
|
||||||
return setAdvertisingData(handle, payload, minimiseFragmentation, false);
|
return setAdvertisingData(handle, payload, minimiseFragmentation, false);
|
||||||
|
@ -1915,7 +1915,7 @@ ble_error_t GenericGap::setAdvertisingPayload(
|
||||||
|
|
||||||
ble_error_t GenericGap::setAdvertisingScanResponse(
|
ble_error_t GenericGap::setAdvertisingScanResponse(
|
||||||
advertising_handle_t handle,
|
advertising_handle_t handle,
|
||||||
mbed::Span<uint8_t> response,
|
mbed::Span<const uint8_t> response,
|
||||||
bool minimiseFragmentation
|
bool minimiseFragmentation
|
||||||
) {
|
) {
|
||||||
return setAdvertisingData(handle, response, minimiseFragmentation, true);
|
return setAdvertisingData(handle, response, minimiseFragmentation, true);
|
||||||
|
@ -1923,7 +1923,7 @@ ble_error_t GenericGap::setAdvertisingScanResponse(
|
||||||
|
|
||||||
ble_error_t GenericGap::setAdvertisingData(
|
ble_error_t GenericGap::setAdvertisingData(
|
||||||
advertising_handle_t handle,
|
advertising_handle_t handle,
|
||||||
mbed::Span<uint8_t> payload,
|
mbed::Span<const uint8_t> payload,
|
||||||
bool minimiseFragmentation,
|
bool minimiseFragmentation,
|
||||||
bool scan_response
|
bool scan_response
|
||||||
) {
|
) {
|
||||||
|
@ -1995,7 +1995,7 @@ ble_error_t GenericGap::setAdvertisingData(
|
||||||
}
|
}
|
||||||
|
|
||||||
// extract the payload
|
// extract the payload
|
||||||
mbed::Span<uint8_t> sub_payload = payload.subspan(
|
mbed::Span<const uint8_t> sub_payload = payload.subspan(
|
||||||
i,
|
i,
|
||||||
std::min(MAX_HCI_DATA_LENGTH, (end - i))
|
std::min(MAX_HCI_DATA_LENGTH, (end - i))
|
||||||
);
|
);
|
||||||
|
@ -2153,7 +2153,7 @@ ble_error_t GenericGap::setPeriodicAdvertisingParameters(
|
||||||
|
|
||||||
ble_error_t GenericGap::setPeriodicAdvertisingPayload(
|
ble_error_t GenericGap::setPeriodicAdvertisingPayload(
|
||||||
advertising_handle_t handle,
|
advertising_handle_t handle,
|
||||||
mbed::Span<uint8_t> payload
|
mbed::Span<const uint8_t> payload
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if (handle == LEGACY_ADVERTISING_HANDLE) {
|
if (handle == LEGACY_ADVERTISING_HANDLE) {
|
||||||
|
@ -2189,7 +2189,7 @@ ble_error_t GenericGap::setPeriodicAdvertisingPayload(
|
||||||
}
|
}
|
||||||
|
|
||||||
// extract the payload
|
// extract the payload
|
||||||
mbed::Span<uint8_t> sub_payload = payload.subspan(
|
mbed::Span<const uint8_t> sub_payload = payload.subspan(
|
||||||
i,
|
i,
|
||||||
std::min(MAX_HCI_DATA_LENGTH, (end - i))
|
std::min(MAX_HCI_DATA_LENGTH, (end - i))
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue