Mistake on this page?
Report an issue in GitHub or email us
lctr_api_cis.h
Go to the documentation of this file.
1 /*************************************************************************************************/
2 /*!
3  * \file
4  *
5  * \brief Link layer controller CIS slave interface file.
6  *
7  * Copyright (c) 2013-2019 Arm Ltd. All Rights Reserved.
8  *
9  * Copyright (c) 2019-2020 Packetcraft, Inc.
10  *
11  * Licensed under the Apache License, Version 2.0 (the "License");
12  * you may not use this file except in compliance with the License.
13  * You may obtain a copy of the License at
14  *
15  * http://www.apache.org/licenses/LICENSE-2.0
16  *
17  * Unless required by applicable law or agreed to in writing, software
18  * distributed under the License is distributed on an "AS IS" BASIS,
19  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20  * See the License for the specific language governing permissions and
21  * limitations under the License.
22  */
23 /*************************************************************************************************/
24 
25 #ifndef LCTR_API_CIS_H
26 #define LCTR_API_CIS_H
27 
28 #include "lctr_api.h"
29 #include "lmgr_api_cis_slave.h"
30 #include "cfg_mac_ble.h"
31 #include "lmgr_api_iso.h"
32 
33 #ifdef __cplusplus
34 extern "C" {
35 #endif
36 
37 /**************************************************************************************************
38  Constants
39 **************************************************************************************************/
40 
41 /*! \brief Maximum value for maximum Data PDU length (spec limit is 251) */
42 #define LCTR_CIS_MAX_DATA_LEN_MAX BB_DATA_PLD_MAX_LEN
43 
44 /*! \brief Data channel PDU length (header + payload + MIC). */
45 #define LCTR_CIS_DATA_PDU_LEN(len) ((len) + LL_DATA_HDR_LEN + LL_DATA_MIC_LEN)
46 
47 /*! \brief Maximum data channel PDU length (header + payload + MIC). */
48 #define LCTR_CIS_DATA_PDU_MAX_LEN LCTR_CIS_DATA_PDU_LEN(LCTR_CIS_MAX_DATA_LEN_MAX)
49 
50 /*! \brief Minimum data channel PDU length (header + payload + MIC). */
51 #define LCTR_CIS_DATA_PDU_MIN_LEN LCTR_CIS_DATA_PDU_LEN(0)
52 
53 /*! \brief CIS messages. */
54 enum
55 {
56  /* Broadcast events */
57  LCTR_CIS_MSG_RESET = LCTR_MSG_RESET, /*!< Reset API message. */
58  /* Scan events */
59  LCTR_CIS_MSG_CIS_EST, /*!< CIS established event. */
60  LCTR_CIS_MSG_CIS_EST_FAIL, /*!< CIS establishment failed event. */
61  LCTR_CIS_MSG_CIS_DISC, /*!< CIS disconnect event. */
62  LCTR_CIS_MSG_CIS_CONN_FAIL, /*!< CIS connection fail to maintain event. */
63  LCTR_CIS_MSG_CIS_CLOSED, /*!< CIS closed event. */
64  LCTR_CIS_MSG_CIS_TERM_MIC_FAILED, /*!< CIS terminated due to MIC failiure event. */
65  LCTR_CIS_MSG_TOTAL, /*!< Total number of CIS slave events. */
66  LCTR_CIS_MSG_INVALID= 0xFF, /*!< Invalid CIS message. */
67 };
68 
69 /**************************************************************************************************
70  Data Types
71 **************************************************************************************************/
72 
73 /*! \brief Disconnect message. Make sure it has the same structure as lctrDisconnect_t. */
74 typedef struct
75 {
76  lctrMsgHdr_t hdr; /*!< Message header. */
77  uint8_t reason; /*!< Disconnect reason. */
79 
80 /*! \brief Link layer controller message data. */
81 typedef union
82 {
83  lctrMsgHdr_t hdr; /*!< Message header. */
84  lctrCisDisconnect_t disc; /*!< Disconnect message data. */
85 } lctrCisMsg_t;
86 
87 /**************************************************************************************************
88  Function Declarations
89 **************************************************************************************************/
90 
91 /* Initialization */
92 void LctrCisSlvInit();
93 
94 #ifdef __cplusplus
95 };
96 #endif
97 
98 #endif /* LCTR_API_CIS_H */
lctrMsgHdr_t hdr
Definition: lctr_api_cis.h:83
Disconnect message. Make sure it has the same structure as lctrDisconnect_t.
Definition: lctr_api_cis.h:74
Link layer manager connected isochronous stream slave interface file.
BLE MAC system configuration.
Link layer controller common interface file.
lctrMsgHdr_t hdr
Definition: lctr_api_cis.h:76
Common message structure passed to event handler.
Definition: lctr_api.h:109
lctrCisDisconnect_t disc
Definition: lctr_api_cis.h:84
Link layer manager connection interface file.
Link layer controller message data.
Definition: lctr_api_cis.h:81
Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.