rymanluk commented on a change in pull request #283: Adding Periodic 
Advertising Feature
URL: https://github.com/apache/mynewt-nimble/pull/283#discussion_r246780701
 
 

 ##########
 File path: nimble/host/src/ble_hs_hci_evt.c
 ##########
 @@ -620,6 +626,73 @@ ble_hs_hci_evt_le_ext_adv_rpt(uint8_t subevent, uint8_t 
*data, int len)
 #endif
     return 0;
 }
+static int
+ble_hs_hci_evt_le_per_adv_sync_estab (uint8_t subevent, uint8_t *data, int len)
+{
+#if MYNEWT_VAL(BLE_EXT_ADV) && MYNEWT_VAL(BLE_PERIODIC_ADV)
+       struct hci_le_subev_per_adv_sync_estab evt;
+
+       if (len < BLE_HCI_LE_PER_ADV_SYNC_ESTAB_LEN) {
+               return BLE_HS_ECONTROLLER;
+       }
+
+       evt.status = data[1];
+       evt.sync_handle = get_le16(data + 2);
+       evt.sid = data[4];
+       evt.adv_addr_type = data[5];
+       memcpy(evt.adv_addr, &data[6], 6);
+       evt.adv_phy = data[12];
+       evt.per_adv_ival = get_le16(data + 13);
+       evt.adv_clk_accuracy = data[15];
+
+       ble_gap_rx_per_adv_sync_estab(&evt);
+#endif
+
+       return 0;
+}
+
+static int
+ble_hs_hci_evt_le_per_adv_rpt (uint8_t subevent, uint8_t *data, int len)
 
 Review comment:
   redundant space before `(` - there are other places with the same.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to