Skip to content

Commit 68afa73

Browse files
fix gap example to match GAP fixes
1 parent bb89d5b commit 68afa73

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Diff for: BLE_GAP/source/main.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -178,9 +178,9 @@ class GAPDevice : private mbed::NonCopyable<GAPDevice>, public Gap::EventHandler
178178
addr[5], addr[4], addr[3], addr[2], addr[1], addr[0]);
179179

180180
/* setup the default phy used in connection to 2M to reduce power consumption */
181-
Gap::Phys_t tx_phys = { /* 1M */ false, /* 2M */ true, /* coded */ false };
182-
Gap::Phys_t rx_phys = { /* 1M */ false, /* 2M */ true, /* coded */ false };
183-
ble_error_t err = _ble.gap().setPreferedPhys(&tx_phys, &rx_phys);
181+
Gap::PhySet_t tx_phys(/* 1M */ false, /* 2M */ true, /* coded */ false);
182+
Gap::PhySet_t rx_phys(/* 1M */ false, /* 2M */ true, /* coded */ false);
183+
ble_error_t err = _ble.gap().setPreferredPhys(&tx_phys, &rx_phys);
184184
if (err) {
185185
printf("INFO: GAP::setPreferedPhys failed with error code %s", BLE::errorToString(err));
186186
}

0 commit comments

Comments
 (0)