rymanluk commented on code in PR #1622:
URL: https://github.com/apache/mynewt-nimble/pull/1622#discussion_r1342331500


##########
nimble/host/include/host/ble_iso.h:
##########
@@ -0,0 +1,131 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#ifndef H_BLE_ISO_
+#define H_BLE_ISO_
+#include "syscfg/syscfg.h"
+
+#if MYNEWT_VAL(BLE_ISO)
+
+#include <inttypes.h>
+
+enum {
+    BLE_ISO_CONNECT_REQUEST_EVENT,
+    BLE_ISO_CIS_ESTABLISHED_EVENT,
+    BLE_ISO_CIS_DISCONNECTED_EVENT,
+    BLE_ISO_BIG_CREATE_COMPLETE_EVENT,
+    BLE_ISO_BIG_ESTABLISHED_EVENT,
+    BLE_ISO_BIG_TERMINATE_EVENT,
+    BLE_ISO_BIG_SYNC_LOST_EVENT,
+    BLE_ISO_DATA_EVENT,
+};
+
+struct ble_iso_event {
+
+    uint8_t type;
+
+    union {
+        /* BLE ISO CONNECT REQUEST */
+        struct {
+            uint16_t conn_handle;
+            uint16_t cis_handle;
+        } cis_connect_req;
+
+        /* BLE_ISO_CIS_ESTABLISHED_EVENT */
+        struct {
+            uint8_t status;
+            uint16_t cis_handle;
+        } cis_established;
+
+        /* BLE_ISO_CIS_DISCONNECTED_EVENT */
+        struct {
+            uint8_t status;
+            uint16_t cis_handle;
+        } cis_disconnected;
+
+        /* BLE_ISO_BIG_CREATE_COMPLETE_EVENT,
+         * BLE_ISO_BIG_ESTABLISHED_EVENT*/
+        struct {
+            uint8_t status;
+            uint8_t big_handle;
+            uint8_t bis_cnt;
+            uint16_t bis[0];
+        } big_complete;
+
+        /*BLE_ISO_BIG_SYNC_LOST_EVENT */
+        struct {
+            uint8_t big_handle;
+            uint8_t reason;
+        } big_terminate_lost;
+
+        /* BLE_ISO_DATA_EVENT - for both cis/bis_handles */
+        struct {
+            struct os_mbuf *om;
+            uint16_t handle;
+        } iso_data;
+    };
+};
+
+typedef int ble_iso_event_fn(struct ble_iso_event *event, void *arg);
+int ble_iso_server_register_le_audio(ble_iso_event_fn *cb, void *cb_arg);
+
+struct ble_iso_cig_params {
+    uint32_t sdu_m_to_s_itvl;
+    uint32_t sdu_s_to_m_itvl;
+    uint8_t sca;
+    uint8_t packing;
+    uint8_t framing;
+    uint8_t max_m_to_s_latency;
+    uint8_t max_s_to_m_latency;
+#if MYNEWT_VAL(BLE_ISO_TEST)
+    uint8_t ft_m_to_s;
+    uint8_t ft_s_to_m;
+    uint16_t iso_itvl;
+#endif
+};
+
+struct ble_iso_cis_params {
+    uint16_t max_sdu_m_to_s;
+    uint16_t max_sdu_s_to_m;
+    uint8_t phy_m_to_s;

Review Comment:
   "m_to_s" -> "c_to_p"
   
   



##########
nimble/host/include/host/ble_iso.h:
##########
@@ -0,0 +1,131 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#ifndef H_BLE_ISO_
+#define H_BLE_ISO_
+#include "syscfg/syscfg.h"
+
+#if MYNEWT_VAL(BLE_ISO)
+
+#include <inttypes.h>
+
+enum {
+    BLE_ISO_CONNECT_REQUEST_EVENT,
+    BLE_ISO_CIS_ESTABLISHED_EVENT,
+    BLE_ISO_CIS_DISCONNECTED_EVENT,
+    BLE_ISO_BIG_CREATE_COMPLETE_EVENT,
+    BLE_ISO_BIG_ESTABLISHED_EVENT,
+    BLE_ISO_BIG_TERMINATE_EVENT,
+    BLE_ISO_BIG_SYNC_LOST_EVENT,
+    BLE_ISO_DATA_EVENT,
+};
+
+struct ble_iso_event {
+
+    uint8_t type;
+
+    union {
+        /* BLE ISO CONNECT REQUEST */
+        struct {
+            uint16_t conn_handle;
+            uint16_t cis_handle;
+        } cis_connect_req;
+
+        /* BLE_ISO_CIS_ESTABLISHED_EVENT */
+        struct {
+            uint8_t status;
+            uint16_t cis_handle;
+        } cis_established;
+
+        /* BLE_ISO_CIS_DISCONNECTED_EVENT */
+        struct {
+            uint8_t status;
+            uint16_t cis_handle;
+        } cis_disconnected;
+
+        /* BLE_ISO_BIG_CREATE_COMPLETE_EVENT,
+         * BLE_ISO_BIG_ESTABLISHED_EVENT*/
+        struct {
+            uint8_t status;
+            uint8_t big_handle;
+            uint8_t bis_cnt;
+            uint16_t bis[0];
+        } big_complete;
+
+        /*BLE_ISO_BIG_SYNC_LOST_EVENT */
+        struct {
+            uint8_t big_handle;
+            uint8_t reason;
+        } big_terminate_lost;
+
+        /* BLE_ISO_DATA_EVENT - for both cis/bis_handles */
+        struct {
+            struct os_mbuf *om;
+            uint16_t handle;
+        } iso_data;
+    };
+};
+
+typedef int ble_iso_event_fn(struct ble_iso_event *event, void *arg);
+int ble_iso_server_register_le_audio(ble_iso_event_fn *cb, void *cb_arg);
+
+struct ble_iso_cig_params {
+    uint32_t sdu_m_to_s_itvl;
+    uint32_t sdu_s_to_m_itvl;
+    uint8_t sca;
+    uint8_t packing;
+    uint8_t framing;
+    uint8_t max_m_to_s_latency;
+    uint8_t max_s_to_m_latency;
+#if MYNEWT_VAL(BLE_ISO_TEST)
+    uint8_t ft_m_to_s;
+    uint8_t ft_s_to_m;
+    uint16_t iso_itvl;
+#endif
+};
+
+struct ble_iso_cis_params {
+    uint16_t max_sdu_m_to_s;
+    uint16_t max_sdu_s_to_m;
+    uint8_t phy_m_to_s;

Review Comment:
   Here and it all other places



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to