Mistake on this page?
Report an issue in GitHub or email us
lhci_api.h
Go to the documentation of this file.
1 /*************************************************************************************************/
2 /*!
3  * \file
4  *
5  * \brief Link layer HCI subsystem API.
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 LHCI_API_H
26 #define LHCI_API_H
27 
28 #include "wsf_types.h"
29 #include "wsf_os.h"
30 #include "cfg_mac_ble.h"
31 
32 #ifdef __cplusplus
33 extern "C" {
34 #endif
35 
36 /**************************************************************************************************
37  Data Types
38 **************************************************************************************************/
39 
40 /*! \brief HCI header */
41 typedef struct
42 {
43  uint16_t opCode; /*!< OpCode command field. */
44  uint8_t len; /*!< Parameter length. */
45 } LhciHdr_t;
46 
47 /*! \brief Command handler call signature. */
48 typedef bool_t (*lhciCmdHandler_t)(LhciHdr_t *pHdr, uint8_t *pBuf);
49 
50 /*! \brief Event complete handler call signature. */
51 typedef void (*lhciCompHandler_t)(void);
52 
53 /**************************************************************************************************
54  Function Declarations
55 **************************************************************************************************/
56 
57 /* Initialization */
58 void LhciScanMasterInit(void);
59 void LhciExtScanMasterInit(void);
60 void LhciAdvSlaveInit(void);
61 void LhciExtAdvSlaveInit(void);
62 void LhciEncMasterInit(void);
63 void LhciEncSlaveInit(void);
64 void LhciPrivAdvInit(void);
65 void LhciPrivConnInit(void);
66 void LhciConnInit(void);
67 void LhciConnMasterInit(void);
68 void LhciExtConnMasterInit(void);
69 void LhciScInit(void);
70 void LhciPhyInit(void);
71 void LhciPastInit(void);
72 void LhciChannelSelection2Init(void);
73 void LhciCisMasterInit(void);
74 void LhciCisSlaveInit(void);
75 void LhciBisSlaveInit(void);
76 void LhciBisMasterInit(void);
77 void LhciIsoInit(void);
78 void LhciPowerControlInit(void);
79 void LhciVsExtInit(lhciCmdHandler_t decodeCmd);
80 void LhciHandlerInit(wsfHandlerId_t handlerId);
81 void LhciHandler(wsfEventMask_t event, wsfMsgHdr_t *pMsg);
82 void LhciIsoHandlerInit(wsfHandlerId_t handlerId);
83 void LhciIsoHandler(wsfEventMask_t event, wsfMsgHdr_t *pMsg);
84 #if (LL_ENABLE_TESTER)
85 void LhciTesterInit(void);
86 #endif
87 void LhciInitFinalize(void);
88 
89 /* Command processing */
90 uint8_t LhciPackCmdStatusEvt(uint8_t *pBuf, uint8_t status, uint16_t opCode);
91 uint8_t LhciPackCmdCompleteEvt(uint8_t *pBuf, uint16_t opCode);
92 uint8_t LhciPackCmdCompleteEvtStatus(uint8_t *pBuf, uint8_t status);
93 uint8_t LhciPackVsEvt(uint8_t *pBuf, uint16_t vsEvtCode);
94 void LhciSendEvent(uint8_t *pBuf);
95 bool_t LhciIsEventPending(void);
96 uint8_t LhciPackEvtHdr(uint8_t *pBuf, uint8_t evtCode, uint8_t paramLen);
97 bool_t LhciSnifferHandler(void);
98 
99 /* Event processing */
100 void LhciRegisterSendTrCompleteHandler(lhciCompHandler_t compCback);
101 bool_t LhciVsEncodeTraceMsgEvtPkt(const uint8_t *pBuf, uint32_t len);
102 
103 #ifdef __cplusplus
104 };
105 #endif
106 
107 #endif /* LHCI_API_H */
uint16_t opCode
Definition: lhci_api.h:43
void(* lhciCompHandler_t)(void)
Event complete handler call signature.
Definition: lhci_api.h:51
uint16_t wsfEventMask_t
Event handler event mask data type.
Definition: wsf_os.h:83
BLE MAC system configuration.
bool_t(* lhciCmdHandler_t)(LhciHdr_t *pHdr, uint8_t *pBuf)
Command handler call signature.
Definition: lhci_api.h:48
uint8_t len
Definition: lhci_api.h:44
Platform-independent data types.
uint8_t wsfHandlerId_t
Event handler ID data type.
Definition: wsf_os.h:80
HCI header.
Definition: lhci_api.h:41
Software foundation OS API.
Common message structure passed to event handler.
Definition: wsf_os.h:106
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.