Skip to content

Conversation

LDong-Arm
Copy link
Contributor

@LDong-Arm LDong-Arm commented Apr 7, 2020

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.

@LDong-Arm
Copy link
Contributor Author

LDong-Arm commented Apr 7, 2020

@ARMmbed/mbed-os-pan @pan- @evedon This is another (and should be the final) round of BLE examples update. It needs to get in at the same time as ARMmbed/mbed-os#12730 in mbed-os due to an API change.

In ARMmbed/mbed-os#12730 we have removed
legacy address-related types (BLEProtocol:: namespace) in favour
of new once in ble:: namespace. This commit updates examples
so they continue to work the latest Mbed OS.
@LDong-Arm LDong-Arm changed the title Update address types to align with the latest Mbed OS API changes Use new types for BLE address and Gap Apr 8, 2020
Copy link

@evedon evedon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code change looks good.

Copy link
Member

@pan- pan- left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@pan- pan- merged commit 3b23dc5 into ARMmbed:master Apr 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants