TuyaOS
tkl_hci.h
浏览该文件的文档.
1
11#ifndef __TKL_HCI_H__
12#define __TKL_HCI_H__
13
14#include "tuya_cloud_types.h"
15#include "tuya_error_code.h"
16
17#ifdef __cplusplus
18extern "C" {
19#endif
20
21/************************** TKL Bluetooth HCI Transport **********************************/
22/*
23 -------- TAL Bluetooth HOST STACK --------
24
25 HCI CMD ACL DATA
26 I O IO
27 | | |
28 | | |
29 | | |
30 O I IO
31 HCI EVENT ACL DATA
32
33 -------- TKL Bluetooth CONTROLLER STACK --------
34*/
35/************************* TKL Bluetooth HCI Transport Interface *********************************/
36
38typedef OPERATE_RET (*TKL_HCI_FUNC_CB)(UCHAR_T *p_buf, USHORT_T buf_len);
39
46OPERATE_RET tkl_hci_init(VOID);
47
54OPERATE_RET tkl_hci_deinit(VOID);
55
65OPERATE_RET tkl_hci_reset(VOID);
66
85OPERATE_RET tkl_hci_cmd_packet_send(CONST UCHAR_T *p_buf, USHORT_T buf_len);
86
106OPERATE_RET tkl_hci_acl_packet_send(CONST UCHAR_T *p_buf, USHORT_T buf_len);
107
128OPERATE_RET tkl_hci_callback_register(CONST TKL_HCI_FUNC_CB hci_evt_cb, CONST TKL_HCI_FUNC_CB acl_pkt_cb);
129
130
131#ifdef __cplusplus
132}
133#endif
134
135#endif
136
OPERATE_RET(* TKL_HCI_FUNC_CB)(UCHAR_T *p_buf, USHORT_T buf_len)
Definition: tkl_hci.h:38
OPERATE_RET tkl_hci_acl_packet_send(CONST UCHAR_T *p_buf, USHORT_T buf_len)
Send HCI-Command Packet to controller from host. HCI ACL Data packets are used to exchange data betwe...
OPERATE_RET tkl_hci_reset(VOID)
[Linux/Android] Function for reseting the bluetooth host-controller interface Try to recover socket o...
OPERATE_RET tkl_hci_init(VOID)
Function for initializing the bluetooth host-controller interface
OPERATE_RET tkl_hci_callback_register(CONST TKL_HCI_FUNC_CB hci_evt_cb, CONST TKL_HCI_FUNC_CB acl_pkt_cb)
Register the hci callback, while receiving "hci-event" or "acl-packet" data from controller,...
OPERATE_RET tkl_hci_deinit(VOID)
Function for de-initializing the bluetooth host-controller interface
OPERATE_RET tkl_hci_cmd_packet_send(CONST UCHAR_T *p_buf, USHORT_T buf_len)
Send HCI-Command Packet to controller from host. The HCI Command packet is used to send commands to t...