Mistake on this page?
Report an issue in GitHub or email us
custom_chci_tr.h
1 /* Copyright (c) 2009-2019 Arm Limited
2  * SPDX-License-Identifier: Apache-2.0
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #ifndef CUSTOM_CHCI_TR_H_
18 #define CUSTOM_CHCI_TR_H_
19 
20 #ifdef __cplusplus
21 extern "C" {
22 #endif
23 
24 /**
25  * Provide this callback in your HCI driver.
26  *
27  * @param prot Must be CHCI_TR_PROT_BLE.
28  * @param hci_type HCI type, HCI_ACL_TYPE or HCI_CMD_TYPE.
29  * @param len Buffer length.
30  * @param pData Data to be sent.
31  * @return Number of bytes processed.
32  */
33 uint16_t ControllerToHostWrite(uint8_t prot, uint8_t hci_type, uint16_t len, uint8_t *pData);
34 
35 /**
36  * Send bytes from host to controller.
37  *
38  * @param prot Protocol, must be CHCI_TR_PROT_BLE.
39  * @param hci_type HCI type, HCI_ACL_TYPE or HCI_CMD_TYPE.
40  * @param len Buffer length.
41  * @param pData Data to be sent.
42  * @return Number of bytes processed.
43  */
44 uint16_t CustomChciTrRead(uint8_t prot, uint8_t hci_type, uint16_t len, uint8_t *pData);
45 
46 /**
47  * Send bytes from controller to host.
48  *
49  * @param prot Protocol, must be CHCI_TR_PROT_BLE.
50  * @param controller_type Controller type, CHCI_TR_TYPE_DATA or CHCI_TR_TYPE_EVT.
51  * @param len Buffer length.
52  * @param pData Data to be sent.
53  * @return Number of bytes processed.
54  */
55 uint16_t CustomChciTrWrite(uint8_t prot, uint8_t controller_type, uint16_t len, uint8_t *pData);
56 
57 void CustomChciTrInit(uint16_t maxAclLen, uint16_t maxIsoSduLen);
58 
59 #ifdef __cplusplus
60 };
61 #endif
62 
63 #endif /* CUSTOM_CHCI_TR_H_ */
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.