Skip to content

Commit 11f39fb

Browse files
authored
Revert "Fix deprecated Gap type usages"
1 parent 21bfa30 commit 11f39fb

File tree

19 files changed

+71
-71
lines changed

19 files changed

+71
-71
lines changed

BLE_BatteryLevel/source/pretty_printer.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,13 +81,13 @@ inline void print_mac_address()
8181
print_address(address);
8282
}
8383

84-
inline const char* phy_to_string(ble::phy_t phy) {
84+
inline const char* phy_to_string(Gap::Phy_t phy) {
8585
switch(phy.value()) {
86-
case ble::phy_t::LE_1M:
86+
case Gap::Phy_t::LE_1M:
8787
return "LE 1M";
88-
case ble::phy_t::LE_2M:
88+
case Gap::Phy_t::LE_2M:
8989
return "LE 2M";
90-
case ble::phy_t::LE_CODED:
90+
case Gap::Phy_t::LE_CODED:
9191
return "LE coded";
9292
default:
9393
return "invalid PHY";

BLE_Beacon/source/pretty_printer.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,13 +81,13 @@ inline void print_mac_address()
8181
print_address(address);
8282
}
8383

84-
inline const char* phy_to_string(ble::phy_t phy) {
84+
inline const char* phy_to_string(Gap::Phy_t phy) {
8585
switch(phy.value()) {
86-
case ble::phy_t::LE_1M:
86+
case Gap::Phy_t::LE_1M:
8787
return "LE 1M";
88-
case ble::phy_t::LE_2M:
88+
case Gap::Phy_t::LE_2M:
8989
return "LE 2M";
90-
case ble::phy_t::LE_CODED:
90+
case Gap::Phy_t::LE_CODED:
9191
return "LE coded";
9292
default:
9393
return "invalid PHY";

BLE_Button/source/pretty_printer.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,13 +81,13 @@ inline void print_mac_address()
8181
print_address(address);
8282
}
8383

84-
inline const char* phy_to_string(ble::phy_t phy) {
84+
inline const char* phy_to_string(Gap::Phy_t phy) {
8585
switch(phy.value()) {
86-
case ble::phy_t::LE_1M:
86+
case Gap::Phy_t::LE_1M:
8787
return "LE 1M";
88-
case ble::phy_t::LE_2M:
88+
case Gap::Phy_t::LE_2M:
8989
return "LE 2M";
90-
case ble::phy_t::LE_CODED:
90+
case Gap::Phy_t::LE_CODED:
9191
return "LE coded";
9292
default:
9393
return "invalid PHY";

BLE_GAP/source/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,7 @@ class GapDemo : private mbed::NonCopyable<GapDemo>, public ble::Gap::EventHandle
443443
/* skip non discoverable device */
444444
if (field.type != ble::adv_data_type_t::FLAGS ||
445445
field.value.size() != 1 ||
446-
!ble::adv_data_flags_t(field.value[0]).getGeneralDiscoverable()) {
446+
!(field.value[0] & GapAdvertisingData::LE_GENERAL_DISCOVERABLE)) {
447447
continue;
448448
}
449449

BLE_GAP/source/pretty_printer.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,13 +81,13 @@ inline void print_mac_address()
8181
print_address(address);
8282
}
8383

84-
inline const char* phy_to_string(ble::phy_t phy) {
84+
inline const char* phy_to_string(Gap::Phy_t phy) {
8585
switch(phy.value()) {
86-
case ble::phy_t::LE_1M:
86+
case Gap::Phy_t::LE_1M:
8787
return "LE 1M";
88-
case ble::phy_t::LE_2M:
88+
case Gap::Phy_t::LE_2M:
8989
return "LE 2M";
90-
case ble::phy_t::LE_CODED:
90+
case Gap::Phy_t::LE_CODED:
9191
return "LE coded";
9292
default:
9393
return "invalid PHY";

BLE_GAPButton/source/pretty_printer.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,13 +81,13 @@ inline void print_mac_address()
8181
print_address(address);
8282
}
8383

84-
inline const char* phy_to_string(ble::phy_t phy) {
84+
inline const char* phy_to_string(Gap::Phy_t phy) {
8585
switch(phy.value()) {
86-
case ble::phy_t::LE_1M:
86+
case Gap::Phy_t::LE_1M:
8787
return "LE 1M";
88-
case ble::phy_t::LE_2M:
88+
case Gap::Phy_t::LE_2M:
8989
return "LE 2M";
90-
case ble::phy_t::LE_CODED:
90+
case Gap::Phy_t::LE_CODED:
9191
return "LE coded";
9292
default:
9393
return "invalid PHY";

BLE_GattClient/source/main.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ class GattClientProcess : private mbed::NonCopyable<GattClientProcess>,
250250
*
251251
* @see GattClient::onServiceDiscoveryTermination
252252
*/
253-
void when_service_discovery_ends(ble::connection_handle_t connection_handle)
253+
void when_service_discovery_ends(Gap::Handle_t connection_handle)
254254
{
255255
if (!_characteristics) {
256256
printf("No characteristics discovered, end of the process.\r\n");
@@ -565,7 +565,7 @@ class GattClientProcess : private mbed::NonCopyable<GattClientProcess>,
565565
}
566566

567567
GattClient *_client;
568-
ble::connection_handle_t _connection_handle;
568+
Gap::Handle_t _connection_handle;
569569
DiscoveredCharacteristicNode *_characteristics;
570570
DiscoveredCharacteristicNode *_it;
571571
GattAttribute::Handle_t _descriptor_handle;

BLE_GattClient/source/pretty_printer.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,13 +94,13 @@ inline void print_mac_address()
9494
}
9595
}
9696

97-
inline const char* phy_to_string(ble::phy_t phy) {
97+
inline const char* phy_to_string(Gap::Phy_t phy) {
9898
switch(phy.value()) {
99-
case ble::phy_t::LE_1M:
99+
case Gap::Phy_t::LE_1M:
100100
return "LE 1M";
101-
case ble::phy_t::LE_2M:
101+
case Gap::Phy_t::LE_2M:
102102
return "LE 2M";
103-
case ble::phy_t::LE_CODED:
103+
case Gap::Phy_t::LE_CODED:
104104
return "LE coded";
105105
default:
106106
return "invalid PHY";

BLE_GattServer/source/pretty_printer.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,13 +94,13 @@ inline void print_mac_address()
9494
}
9595
}
9696

97-
inline const char* phy_to_string(ble::phy_t phy) {
97+
inline const char* phy_to_string(Gap::Phy_t phy) {
9898
switch(phy.value()) {
99-
case ble::phy_t::LE_1M:
99+
case Gap::Phy_t::LE_1M:
100100
return "LE 1M";
101-
case ble::phy_t::LE_2M:
101+
case Gap::Phy_t::LE_2M:
102102
return "LE 2M";
103-
case ble::phy_t::LE_CODED:
103+
case Gap::Phy_t::LE_CODED:
104104
return "LE coded";
105105
default:
106106
return "invalid PHY";

BLE_HeartRate/source/pretty_printer.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,13 +81,13 @@ inline void print_mac_address()
8181
print_address(address);
8282
}
8383

84-
inline const char* phy_to_string(ble::phy_t phy) {
84+
inline const char* phy_to_string(Gap::Phy_t phy) {
8585
switch(phy.value()) {
86-
case ble::phy_t::LE_1M:
86+
case Gap::Phy_t::LE_1M:
8787
return "LE 1M";
88-
case ble::phy_t::LE_2M:
88+
case Gap::Phy_t::LE_2M:
8989
return "LE 2M";
90-
case ble::phy_t::LE_CODED:
90+
case Gap::Phy_t::LE_CODED:
9191
return "LE coded";
9292
default:
9393
return "invalid PHY";

BLE_LED/source/pretty_printer.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,13 +81,13 @@ inline void print_mac_address()
8181
print_address(address);
8282
}
8383

84-
inline const char* phy_to_string(ble::phy_t phy) {
84+
inline const char* phy_to_string(Gap::Phy_t phy) {
8585
switch(phy.value()) {
86-
case ble::phy_t::LE_1M:
86+
case Gap::Phy_t::LE_1M:
8787
return "LE 1M";
88-
case ble::phy_t::LE_2M:
88+
case Gap::Phy_t::LE_2M:
8989
return "LE 2M";
90-
case ble::phy_t::LE_CODED:
90+
case Gap::Phy_t::LE_CODED:
9191
return "LE coded";
9292
default:
9393
return "invalid PHY";

BLE_LEDBlinker/source/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ void characteristic_discovery(const DiscoveredCharacteristic *characteristicP) {
5757
}
5858
}
5959

60-
void discovery_termination(ble::connection_handle_t connectionHandle) {
60+
void discovery_termination(Gap::Handle_t connectionHandle) {
6161
printf("terminated SD for handle %u\r\n", connectionHandle);
6262
if (trigger_led_characteristic) {
6363
trigger_led_characteristic = false;

BLE_LEDBlinker/source/pretty_printer.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,13 +81,13 @@ inline void print_mac_address()
8181
print_address(address);
8282
}
8383

84-
inline const char* phy_to_string(ble::phy_t phy) {
84+
inline const char* phy_to_string(Gap::Phy_t phy) {
8585
switch(phy.value()) {
86-
case ble::phy_t::LE_1M:
86+
case Gap::Phy_t::LE_1M:
8787
return "LE 1M";
88-
case ble::phy_t::LE_2M:
88+
case Gap::Phy_t::LE_2M:
8989
return "LE 2M";
90-
case ble::phy_t::LE_CODED:
90+
case Gap::Phy_t::LE_CODED:
9191
return "LE coded";
9292
default:
9393
return "invalid PHY";

BLE_PeriodicAdvertising/source/pretty_printer.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,13 +91,13 @@ inline void print_mac_address()
9191
}
9292
}
9393

94-
inline const char* phy_to_string(ble::phy_t phy) {
94+
inline const char* phy_to_string(Gap::Phy_t phy) {
9595
switch(phy.value()) {
96-
case ble::phy_t::LE_1M:
96+
case Gap::Phy_t::LE_1M:
9797
return "LE 1M";
98-
case ble::phy_t::LE_2M:
98+
case Gap::Phy_t::LE_2M:
9999
return "LE 2M";
100-
case ble::phy_t::LE_CODED:
100+
case Gap::Phy_t::LE_CODED:
101101
return "LE coded";
102102
default:
103103
return "invalid PHY";

BLE_Privacy/source/main.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -299,9 +299,9 @@ class PrivacyPeripheral : public PrivacyDevice {
299299
return;
300300
}
301301

302-
ble::peripheral_privacy_configuration_t privacy_configuration = {
302+
Gap::PeripheralPrivacyConfiguration_t privacy_configuration = {
303303
/* use_non_resolvable_random_address */ false,
304-
ble::peripheral_privacy_configuration_t::PERFORM_PAIRING_PROCEDURE
304+
Gap::PeripheralPrivacyConfiguration_t::PERFORM_PAIRING_PROCEDURE
305305
};
306306

307307
_ble.gap().setPeripheralPrivacyConfiguration(&privacy_configuration);
@@ -313,9 +313,9 @@ class PrivacyPeripheral : public PrivacyDevice {
313313
virtual void start_after_bonding()
314314
{
315315
printf("start after bonding\r\n");
316-
ble::peripheral_privacy_configuration_t privacy_configuration = {
316+
Gap::PeripheralPrivacyConfiguration_t privacy_configuration = {
317317
/* use_non_resolvable_random_address */ false,
318-
ble::peripheral_privacy_configuration_t::REJECT_NON_RESOLVED_ADDRESS
318+
Gap::PeripheralPrivacyConfiguration_t::REJECT_NON_RESOLVED_ADDRESS
319319
};
320320

321321
_ble.gap().setPeripheralPrivacyConfiguration(&privacy_configuration);
@@ -408,9 +408,9 @@ class PrivacyCentral : public PrivacyDevice {
408408
* and scan requests responses */
409409
virtual void start()
410410
{
411-
ble::central_privacy_configuration_t privacy_configuration = {
411+
Gap::CentralPrivacyConfiguration_t privacy_configuration = {
412412
/* use_non_resolvable_random_address */ false,
413-
ble::central_privacy_configuration_t::DO_NOT_RESOLVE
413+
Gap::CentralPrivacyConfiguration_t::DO_NOT_RESOLVE
414414
};
415415

416416
_ble.gap().setCentralPrivacyConfiguration(&privacy_configuration);
@@ -421,9 +421,9 @@ class PrivacyCentral : public PrivacyDevice {
421421
virtual void start_after_bonding()
422422
{
423423
printf("start after bonding\r\n");
424-
ble::central_privacy_configuration_t privacy_configuration = {
424+
Gap::CentralPrivacyConfiguration_t privacy_configuration = {
425425
/* use_non_resolvable_random_address */ false,
426-
ble::central_privacy_configuration_t::RESOLVE_AND_FILTER
426+
Gap::CentralPrivacyConfiguration_t::RESOLVE_AND_FILTER
427427
};
428428

429429
_ble.gap().setCentralPrivacyConfiguration(&privacy_configuration);

BLE_Privacy/source/pretty_printer.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,13 +81,13 @@ inline void print_mac_address()
8181
print_address(address);
8282
}
8383

84-
inline const char* phy_to_string(ble::phy_t phy) {
84+
inline const char* phy_to_string(Gap::Phy_t phy) {
8585
switch(phy.value()) {
86-
case ble::phy_t::LE_1M:
86+
case Gap::Phy_t::LE_1M:
8787
return "LE 1M";
88-
case ble::phy_t::LE_2M:
88+
case Gap::Phy_t::LE_2M:
8989
return "LE 2M";
90-
case ble::phy_t::LE_CODED:
90+
case Gap::Phy_t::LE_CODED:
9191
return "LE coded";
9292
default:
9393
return "invalid PHY";

BLE_SM/source/main.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,13 +156,13 @@ class SMDevice : private mbed::NonCopyable<SMDevice>,
156156
printf("Error enabling privacy\r\n");
157157
}
158158

159-
Gap::peripheral_privacy_configuration_t configuration_p = {
159+
Gap::PeripheralPrivacyConfiguration_t configuration_p = {
160160
/* use_non_resolvable_random_address */ false,
161-
Gap::peripheral_privacy_configuration_t::REJECT_NON_RESOLVED_ADDRESS
161+
Gap::PeripheralPrivacyConfiguration_t::REJECT_NON_RESOLVED_ADDRESS
162162
};
163163
_ble.gap().setPeripheralPrivacyConfiguration(&configuration_p);
164164

165-
Gap::central_privay_configuration_t configuration_c = {
165+
Gap::CentralPrivacyConfiguration_t configuration_c = {
166166
/* use_non_resolvable_random_address */ false,
167167
Gap::CentralPrivacyConfiguration_t::RESOLVE_AND_FORWARD
168168
};

BLE_SM/source/pretty_printer.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,13 +81,13 @@ inline void print_mac_address()
8181
print_address(address);
8282
}
8383

84-
inline const char* phy_to_string(ble::phy_t phy) {
84+
inline const char* phy_to_string(Gap::Phy_t phy) {
8585
switch(phy.value()) {
86-
case ble::phy_t::LE_1M:
86+
case Gap::Phy_t::LE_1M:
8787
return "LE 1M";
88-
case ble::phy_t::LE_2M:
88+
case Gap::Phy_t::LE_2M:
8989
return "LE 2M";
90-
case ble::phy_t::LE_CODED:
90+
case Gap::Phy_t::LE_CODED:
9191
return "LE coded";
9292
default:
9393
return "invalid PHY";

BLE_Thermometer/source/pretty_printer.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,13 +84,13 @@ inline void print_mac_address()
8484
print_address(address);
8585
}
8686

87-
inline const char* phy_to_string(ble::phy_t phy) {
87+
inline const char* phy_to_string(Gap::Phy_t phy) {
8888
switch(phy.value()) {
89-
case ble::phy_t::LE_1M:
89+
case Gap::Phy_t::LE_1M:
9090
return "LE 1M";
91-
case ble::phy_t::LE_2M:
91+
case Gap::Phy_t::LE_2M:
9292
return "LE 2M";
93-
case ble::phy_t::LE_CODED:
93+
case Gap::Phy_t::LE_CODED:
9494
return "LE coded";
9595
default:
9696
return "invalid PHY";

0 commit comments

Comments
 (0)