• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2021 Bestechnic (Shanghai) Co., Ltd. All rights reserved.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 #ifndef __INTERSYSHCI_H__
16 #define __INTERSYSHCI_H__
17 
18 #include "trans_adapt.h"
19 #define INTERSYS_TX_SIGNAL (0x01)
20 
21 #if defined(__cplusplus)
22 extern "C" {
23 #endif
24 
25 bool BESHCI_Controller_Log_Handler(const unsigned char *p_buff, uint32_t length);
26 void BESHCI_Open(void);
27 void BESHCI_Close(void);
28 void BESHCI_LOCK_TX(void);
29 void BESHCI_UNLOCK_TX(void);
30 /***************************************************************************
31  *
32  * BES intersys RX data API
33  * Please return the length of the data read each time
34  *
35  ****************************************************************************/
36 unsigned short bes_hci_receive_data( const uint8_t *buf, uint32_t size);
37 
38 /***************************************************************************
39  *
40  * BES intersys TX data API
41  *
42  ****************************************************************************/
43 int bes_hci_send_data(uint8_t *buf, int size);
44 
45 typedef bool (*intersys_hci_cmd_filter_handler_func)(uint8_t* pbuf, uint32_t length);
46 void intersys_register_hci_cmd_filter_handler_callback(intersys_hci_cmd_filter_handler_func func);
47 
48 typedef void (*intersys_log_report_func)(uint8_t* data);
49 void intersys_register_log_report_handler_callback(intersys_log_report_func func);
50 
51 void bes_get_hci_rx_flowctrl_info(void);
52 void bes_get_hci_tx_flowctrl_info(void);
53 #if defined(__cplusplus)
54 }
55 #endif
56 
57 #endif /* __INTERSYSHCI_H__ */
58