You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2020/05/04 11:54:16 UTC

[GitHub] [mynewt-nimble] sjanc commented on a change in pull request #806: nimble/ll: Some LL fixes, cleaning and improvements

sjanc commented on a change in pull request #806:
URL: https://github.com/apache/mynewt-nimble/pull/806#discussion_r419360684



##########
File path: nimble/controller/src/ble_ll_ctrl.c
##########
@@ -1040,7 +1060,44 @@ ble_ll_ctrl_rx_periodic_sync_ind(struct ble_ll_conn_sm *connsm, uint8_t *dptr)
                                  connsm->sync_transfer_skip,
                                  connsm->sync_transfer_sync_timeout);
     }
+    return BLE_ERR_MAX;
+}
+#endif
 
+#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LL_SCA_UPDATE)
+/**
+ * Called when a BLE_LL_CTRL_CLOCK_ACCURACY_REQ PDU is received
+ *
+ * @param connsm
+ * @param dptr
+ * @param rsp Pointer to CtrData of BLE_LL_CTRL_CLOCK_ACCURACY_RSP.
+ *
+ * @return uint8_t
+ */
+static uint8_t
+ble_ll_ctrl_rx_sca_req(struct ble_ll_conn_sm *connsm, uint8_t *dptr,
+                       uint8_t *rsp)
+{
+    ble_ll_ctrl_sca_req_rsp_make(connsm, rsp);
+    return BLE_LL_CTRL_CLOCK_ACCURACY_RSP;
+}
+
+/**
+ * Called when a BLE_LL_CTRL_CLOCK_ACCURACY_RSP PDU is received
+ *
+ * @param connsm
+ * @param dptr
+ *
+ * @return uint8_t
+ */
+static uint8_t
+ble_ll_ctrl_rx_sca_rsp(struct ble_ll_conn_sm *connsm, uint8_t *dptr)
+{
+    if (!(connsm->cur_ctrl_proc == BLE_LL_CTRL_PROC_SCA_UPDATE)) {

Review comment:
       if (foo != BAR)  maybe ?:)

##########
File path: nimble/syscfg.yml
##########
@@ -77,6 +77,19 @@ syscfg.defs:
             integer for easy comparison.
         range: 50, 51, 52
         value: 50
+    BLE_ISO:

Review comment:
       I think we should have BLE_LL_FEAT_ISO (or similar) for controller configuration that defaults to BLE_ISO (which should set both host and controller support). This should keep this similar to other LL config options

##########
File path: nimble/controller/include/controller/ble_ll_conn.h
##########
@@ -58,6 +58,8 @@ extern "C" {
 /* Definition for RSSI when the RSSI is unknown */
 #define BLE_LL_CONN_UNKNOWN_RSSI        (127)
 
+#define BLE_LL_CONN_ISO_HANDLE_OFFSET   (0x0100)

Review comment:
       I'd name this BLE_LL_CONN_HANDLE_ISO_OFFSET (so that is it similar to BLE_HS_CONN_HANDLE_*)




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org