xref: /haiku/headers/os/bluetooth/HCI/btHCI.h (revision b06a48ab8f30b45916a9c157b992827779182163)
1 /*
2  * Copyright 2007 Oliver Ruiz Dorantes, oliver.ruiz.dorantes_at_gmail.com
3  * All rights reserved. Distributed under the terms of the MIT License.
4  */
5 #ifndef _BTHCI_H_
6 #define _BTHCI_H_
7 
8 /* typedefs */
9 typedef int32 hci_id;
10 #define HCI_DEVICE_INDEX_OFFSET 0x7c
11 
12 typedef enum { H2 = 2, H3, H4, H5 } transport_type;
13 
14 typedef enum { 	BT_COMMAND = 0,
15 				BT_EVENT,
16 				BT_ACL,
17 				BT_SCO,
18 				BT_ESCO,
19 				// more packets here
20 				HCI_NUM_PACKET_TYPES
21 } bt_packet_t;
22 
23 /* packets sizes */
24 #define HCI_MAX_ACL_SIZE		1024
25 #define HCI_MAX_SCO_SIZE		255
26 #define HCI_MAX_EVENT_SIZE		260
27 #define HCI_MAX_FRAME_SIZE		(HCI_MAX_ACL_SIZE + 4)
28 
29 /* fields sizes */
30 #define HCI_LAP_SIZE			3	/* LAP */
31 #define HCI_LINK_KEY_SIZE		16	/* link key */
32 #define HCI_PIN_SIZE			16	/* PIN */
33 #define HCI_EVENT_MASK_SIZE		8	/* event mask */
34 #define HCI_CLASS_SIZE			3	/* class */
35 #define HCI_FEATURES_SIZE		8	/* LMP features */
36 #define HCI_DEVICE_NAME_SIZE	248	/* unit name size */
37 
38 #endif // _BTHCI_H_
39