Skip to content

Revert "Fix deprecated Gap type usages" #291

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 8, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions BLE_BatteryLevel/source/pretty_printer.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,13 @@ inline void print_mac_address()
print_address(address);
}

inline const char* phy_to_string(ble::phy_t phy) {
inline const char* phy_to_string(Gap::Phy_t phy) {
switch(phy.value()) {
case ble::phy_t::LE_1M:
case Gap::Phy_t::LE_1M:
return "LE 1M";
case ble::phy_t::LE_2M:
case Gap::Phy_t::LE_2M:
return "LE 2M";
case ble::phy_t::LE_CODED:
case Gap::Phy_t::LE_CODED:
return "LE coded";
default:
return "invalid PHY";
Expand Down
8 changes: 4 additions & 4 deletions BLE_Beacon/source/pretty_printer.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,13 @@ inline void print_mac_address()
print_address(address);
}

inline const char* phy_to_string(ble::phy_t phy) {
inline const char* phy_to_string(Gap::Phy_t phy) {
switch(phy.value()) {
case ble::phy_t::LE_1M:
case Gap::Phy_t::LE_1M:
return "LE 1M";
case ble::phy_t::LE_2M:
case Gap::Phy_t::LE_2M:
return "LE 2M";
case ble::phy_t::LE_CODED:
case Gap::Phy_t::LE_CODED:
return "LE coded";
default:
return "invalid PHY";
Expand Down
8 changes: 4 additions & 4 deletions BLE_Button/source/pretty_printer.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,13 @@ inline void print_mac_address()
print_address(address);
}

inline const char* phy_to_string(ble::phy_t phy) {
inline const char* phy_to_string(Gap::Phy_t phy) {
switch(phy.value()) {
case ble::phy_t::LE_1M:
case Gap::Phy_t::LE_1M:
return "LE 1M";
case ble::phy_t::LE_2M:
case Gap::Phy_t::LE_2M:
return "LE 2M";
case ble::phy_t::LE_CODED:
case Gap::Phy_t::LE_CODED:
return "LE coded";
default:
return "invalid PHY";
Expand Down
2 changes: 1 addition & 1 deletion BLE_GAP/source/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ class GapDemo : private mbed::NonCopyable<GapDemo>, public ble::Gap::EventHandle
/* skip non discoverable device */
if (field.type != ble::adv_data_type_t::FLAGS ||
field.value.size() != 1 ||
!ble::adv_data_flags_t(field.value[0]).getGeneralDiscoverable()) {
!(field.value[0] & GapAdvertisingData::LE_GENERAL_DISCOVERABLE)) {
continue;
}

Expand Down
8 changes: 4 additions & 4 deletions BLE_GAP/source/pretty_printer.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,13 @@ inline void print_mac_address()
print_address(address);
}

inline const char* phy_to_string(ble::phy_t phy) {
inline const char* phy_to_string(Gap::Phy_t phy) {
switch(phy.value()) {
case ble::phy_t::LE_1M:
case Gap::Phy_t::LE_1M:
return "LE 1M";
case ble::phy_t::LE_2M:
case Gap::Phy_t::LE_2M:
return "LE 2M";
case ble::phy_t::LE_CODED:
case Gap::Phy_t::LE_CODED:
return "LE coded";
default:
return "invalid PHY";
Expand Down
8 changes: 4 additions & 4 deletions BLE_GAPButton/source/pretty_printer.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,13 @@ inline void print_mac_address()
print_address(address);
}

inline const char* phy_to_string(ble::phy_t phy) {
inline const char* phy_to_string(Gap::Phy_t phy) {
switch(phy.value()) {
case ble::phy_t::LE_1M:
case Gap::Phy_t::LE_1M:
return "LE 1M";
case ble::phy_t::LE_2M:
case Gap::Phy_t::LE_2M:
return "LE 2M";
case ble::phy_t::LE_CODED:
case Gap::Phy_t::LE_CODED:
return "LE coded";
default:
return "invalid PHY";
Expand Down
4 changes: 2 additions & 2 deletions BLE_GattClient/source/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ class GattClientProcess : private mbed::NonCopyable<GattClientProcess>,
*
* @see GattClient::onServiceDiscoveryTermination
*/
void when_service_discovery_ends(ble::connection_handle_t connection_handle)
void when_service_discovery_ends(Gap::Handle_t connection_handle)
{
if (!_characteristics) {
printf("No characteristics discovered, end of the process.\r\n");
Expand Down Expand Up @@ -565,7 +565,7 @@ class GattClientProcess : private mbed::NonCopyable<GattClientProcess>,
}

GattClient *_client;
ble::connection_handle_t _connection_handle;
Gap::Handle_t _connection_handle;
DiscoveredCharacteristicNode *_characteristics;
DiscoveredCharacteristicNode *_it;
GattAttribute::Handle_t _descriptor_handle;
Expand Down
8 changes: 4 additions & 4 deletions BLE_GattClient/source/pretty_printer.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,13 @@ inline void print_mac_address()
}
}

inline const char* phy_to_string(ble::phy_t phy) {
inline const char* phy_to_string(Gap::Phy_t phy) {
switch(phy.value()) {
case ble::phy_t::LE_1M:
case Gap::Phy_t::LE_1M:
return "LE 1M";
case ble::phy_t::LE_2M:
case Gap::Phy_t::LE_2M:
return "LE 2M";
case ble::phy_t::LE_CODED:
case Gap::Phy_t::LE_CODED:
return "LE coded";
default:
return "invalid PHY";
Expand Down
8 changes: 4 additions & 4 deletions BLE_GattServer/source/pretty_printer.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,13 @@ inline void print_mac_address()
}
}

inline const char* phy_to_string(ble::phy_t phy) {
inline const char* phy_to_string(Gap::Phy_t phy) {
switch(phy.value()) {
case ble::phy_t::LE_1M:
case Gap::Phy_t::LE_1M:
return "LE 1M";
case ble::phy_t::LE_2M:
case Gap::Phy_t::LE_2M:
return "LE 2M";
case ble::phy_t::LE_CODED:
case Gap::Phy_t::LE_CODED:
return "LE coded";
default:
return "invalid PHY";
Expand Down
8 changes: 4 additions & 4 deletions BLE_HeartRate/source/pretty_printer.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,13 @@ inline void print_mac_address()
print_address(address);
}

inline const char* phy_to_string(ble::phy_t phy) {
inline const char* phy_to_string(Gap::Phy_t phy) {
switch(phy.value()) {
case ble::phy_t::LE_1M:
case Gap::Phy_t::LE_1M:
return "LE 1M";
case ble::phy_t::LE_2M:
case Gap::Phy_t::LE_2M:
return "LE 2M";
case ble::phy_t::LE_CODED:
case Gap::Phy_t::LE_CODED:
return "LE coded";
default:
return "invalid PHY";
Expand Down
8 changes: 4 additions & 4 deletions BLE_LED/source/pretty_printer.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,13 @@ inline void print_mac_address()
print_address(address);
}

inline const char* phy_to_string(ble::phy_t phy) {
inline const char* phy_to_string(Gap::Phy_t phy) {
switch(phy.value()) {
case ble::phy_t::LE_1M:
case Gap::Phy_t::LE_1M:
return "LE 1M";
case ble::phy_t::LE_2M:
case Gap::Phy_t::LE_2M:
return "LE 2M";
case ble::phy_t::LE_CODED:
case Gap::Phy_t::LE_CODED:
return "LE coded";
default:
return "invalid PHY";
Expand Down
2 changes: 1 addition & 1 deletion BLE_LEDBlinker/source/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ void characteristic_discovery(const DiscoveredCharacteristic *characteristicP) {
}
}

void discovery_termination(ble::connection_handle_t connectionHandle) {
void discovery_termination(Gap::Handle_t connectionHandle) {
printf("terminated SD for handle %u\r\n", connectionHandle);
if (trigger_led_characteristic) {
trigger_led_characteristic = false;
Expand Down
8 changes: 4 additions & 4 deletions BLE_LEDBlinker/source/pretty_printer.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,13 @@ inline void print_mac_address()
print_address(address);
}

inline const char* phy_to_string(ble::phy_t phy) {
inline const char* phy_to_string(Gap::Phy_t phy) {
switch(phy.value()) {
case ble::phy_t::LE_1M:
case Gap::Phy_t::LE_1M:
return "LE 1M";
case ble::phy_t::LE_2M:
case Gap::Phy_t::LE_2M:
return "LE 2M";
case ble::phy_t::LE_CODED:
case Gap::Phy_t::LE_CODED:
return "LE coded";
default:
return "invalid PHY";
Expand Down
8 changes: 4 additions & 4 deletions BLE_PeriodicAdvertising/source/pretty_printer.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,13 @@ inline void print_mac_address()
}
}

inline const char* phy_to_string(ble::phy_t phy) {
inline const char* phy_to_string(Gap::Phy_t phy) {
switch(phy.value()) {
case ble::phy_t::LE_1M:
case Gap::Phy_t::LE_1M:
return "LE 1M";
case ble::phy_t::LE_2M:
case Gap::Phy_t::LE_2M:
return "LE 2M";
case ble::phy_t::LE_CODED:
case Gap::Phy_t::LE_CODED:
return "LE coded";
default:
return "invalid PHY";
Expand Down
16 changes: 8 additions & 8 deletions BLE_Privacy/source/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -299,9 +299,9 @@ class PrivacyPeripheral : public PrivacyDevice {
return;
}

ble::peripheral_privacy_configuration_t privacy_configuration = {
Gap::PeripheralPrivacyConfiguration_t privacy_configuration = {
/* use_non_resolvable_random_address */ false,
ble::peripheral_privacy_configuration_t::PERFORM_PAIRING_PROCEDURE
Gap::PeripheralPrivacyConfiguration_t::PERFORM_PAIRING_PROCEDURE
};

_ble.gap().setPeripheralPrivacyConfiguration(&privacy_configuration);
Expand All @@ -313,9 +313,9 @@ class PrivacyPeripheral : public PrivacyDevice {
virtual void start_after_bonding()
{
printf("start after bonding\r\n");
ble::peripheral_privacy_configuration_t privacy_configuration = {
Gap::PeripheralPrivacyConfiguration_t privacy_configuration = {
/* use_non_resolvable_random_address */ false,
ble::peripheral_privacy_configuration_t::REJECT_NON_RESOLVED_ADDRESS
Gap::PeripheralPrivacyConfiguration_t::REJECT_NON_RESOLVED_ADDRESS
};

_ble.gap().setPeripheralPrivacyConfiguration(&privacy_configuration);
Expand Down Expand Up @@ -408,9 +408,9 @@ class PrivacyCentral : public PrivacyDevice {
* and scan requests responses */
virtual void start()
{
ble::central_privacy_configuration_t privacy_configuration = {
Gap::CentralPrivacyConfiguration_t privacy_configuration = {
/* use_non_resolvable_random_address */ false,
ble::central_privacy_configuration_t::DO_NOT_RESOLVE
Gap::CentralPrivacyConfiguration_t::DO_NOT_RESOLVE
};

_ble.gap().setCentralPrivacyConfiguration(&privacy_configuration);
Expand All @@ -421,9 +421,9 @@ class PrivacyCentral : public PrivacyDevice {
virtual void start_after_bonding()
{
printf("start after bonding\r\n");
ble::central_privacy_configuration_t privacy_configuration = {
Gap::CentralPrivacyConfiguration_t privacy_configuration = {
/* use_non_resolvable_random_address */ false,
ble::central_privacy_configuration_t::RESOLVE_AND_FILTER
Gap::CentralPrivacyConfiguration_t::RESOLVE_AND_FILTER
};

_ble.gap().setCentralPrivacyConfiguration(&privacy_configuration);
Expand Down
8 changes: 4 additions & 4 deletions BLE_Privacy/source/pretty_printer.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,13 @@ inline void print_mac_address()
print_address(address);
}

inline const char* phy_to_string(ble::phy_t phy) {
inline const char* phy_to_string(Gap::Phy_t phy) {
switch(phy.value()) {
case ble::phy_t::LE_1M:
case Gap::Phy_t::LE_1M:
return "LE 1M";
case ble::phy_t::LE_2M:
case Gap::Phy_t::LE_2M:
return "LE 2M";
case ble::phy_t::LE_CODED:
case Gap::Phy_t::LE_CODED:
return "LE coded";
default:
return "invalid PHY";
Expand Down
6 changes: 3 additions & 3 deletions BLE_SM/source/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -156,13 +156,13 @@ class SMDevice : private mbed::NonCopyable<SMDevice>,
printf("Error enabling privacy\r\n");
}

Gap::peripheral_privacy_configuration_t configuration_p = {
Gap::PeripheralPrivacyConfiguration_t configuration_p = {
/* use_non_resolvable_random_address */ false,
Gap::peripheral_privacy_configuration_t::REJECT_NON_RESOLVED_ADDRESS
Gap::PeripheralPrivacyConfiguration_t::REJECT_NON_RESOLVED_ADDRESS
};
_ble.gap().setPeripheralPrivacyConfiguration(&configuration_p);

Gap::central_privay_configuration_t configuration_c = {
Gap::CentralPrivacyConfiguration_t configuration_c = {
/* use_non_resolvable_random_address */ false,
Gap::CentralPrivacyConfiguration_t::RESOLVE_AND_FORWARD
};
Expand Down
8 changes: 4 additions & 4 deletions BLE_SM/source/pretty_printer.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,13 @@ inline void print_mac_address()
print_address(address);
}

inline const char* phy_to_string(ble::phy_t phy) {
inline const char* phy_to_string(Gap::Phy_t phy) {
switch(phy.value()) {
case ble::phy_t::LE_1M:
case Gap::Phy_t::LE_1M:
return "LE 1M";
case ble::phy_t::LE_2M:
case Gap::Phy_t::LE_2M:
return "LE 2M";
case ble::phy_t::LE_CODED:
case Gap::Phy_t::LE_CODED:
return "LE coded";
default:
return "invalid PHY";
Expand Down
8 changes: 4 additions & 4 deletions BLE_Thermometer/source/pretty_printer.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,13 @@ inline void print_mac_address()
print_address(address);
}

inline const char* phy_to_string(ble::phy_t phy) {
inline const char* phy_to_string(Gap::Phy_t phy) {
switch(phy.value()) {
case ble::phy_t::LE_1M:
case Gap::Phy_t::LE_1M:
return "LE 1M";
case ble::phy_t::LE_2M:
case Gap::Phy_t::LE_2M:
return "LE 2M";
case ble::phy_t::LE_CODED:
case Gap::Phy_t::LE_CODED:
return "LE coded";
default:
return "invalid PHY";
Expand Down