Use new types for BLE address and Gap #290
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In ARMmbed/mbed-os#12730 we have removed legacy address-related types (BLEProtocol:: namespace) in favour of new once in ble:: namespace. This PR updates examples
so they will continue to work the latest Mbed OS.
Changes:
BLEProtocol::AddressType_t
->ble::own_address_type_t
BLEProtocol::AddressBytes_t
->ble::address_t
Additionally, in #289 we fixed types for Gap, but it got reverted because it contains a typo fix which hasn't landed in mbed-os repo yet. This PR also brings that back.
Gap::Phy_t
->ble::phy_t
Gap::Handle_t
->ble::connection_handle_t
GapAdvertisingData::LE_GENERAL_DISCOVERABLE
->ble::adv_data_flags_t(value).getGeneralDiscoverable()
Gap::CentralPrivacyConfiguration_t
->ble::central_privacy_configuration_t
(Note: currently spelt "privay" in mbed-os, corrected by BLE Gap deprecation cleanup/rework mbed-os#12730)Note: This change is in conjunction with ARMmbed/mbed-os#12730 - they have to be merged roughly at the same time.