Kai Ren / Mbed OS BluetoothLEGap
Revision:
11:37872bf83624
Parent:
10:6f1c573093c1
Child:
15:4d9320346162
--- a/source/main.cpp	Wed Sep 26 15:00:23 2018 +0100
+++ b/source/main.cpp	Wed Oct 17 14:45:12 2018 +0100
@@ -178,9 +178,9 @@
                addr[5], addr[4], addr[3], addr[2], addr[1], addr[0]);
 
         /* setup the default phy used in connection to 2M to reduce power consumption */
-        Gap::Phys_t tx_phys = { /* 1M */ false, /* 2M */ true, /* coded */ false };
-        Gap::Phys_t rx_phys = { /* 1M */ false, /* 2M */ true, /* coded */ false };
-        ble_error_t err = _ble.gap().setPreferedPhys(&tx_phys, &rx_phys);
+        Gap::PhySet_t tx_phys(/* 1M */ false, /* 2M */ true, /* coded */ false);
+        Gap::PhySet_t rx_phys(/* 1M */ false, /* 2M */ true, /* coded */ false);
+        ble_error_t err = _ble.gap().setPreferredPhys(&tx_phys, &rx_phys);
         if (err) {
             printf("INFO: GAP::setPreferedPhys failed with error code %s", BLE::errorToString(err));
         }