hci: extract internal definitions from bluetooth.h

This commit is contained in:
Matthias Ringwald 2019-09-26 16:12:03 +02:00
parent 09f91c9f55
commit 9c13b5ca32
3 changed files with 17 additions and 9 deletions

View File

@ -121,12 +121,6 @@ typedef enum {
#define HCI_SCO_DATA_PACKET 0x03
#define HCI_EVENT_PACKET 0x04
// packet header sizes
#define HCI_CMD_HEADER_SIZE 3
#define HCI_ACL_HEADER_SIZE 4
#define HCI_SCO_HEADER_SIZE 3
#define HCI_EVENT_HEADER_SIZE 2
/**
* HCI Layer
*/
@ -324,9 +318,6 @@ typedef enum {
#define HCI_ACL_2DH5_SIZE 679
#define HCI_ACL_3DH5_SIZE 1021
#define HCI_EVENT_PAYLOAD_SIZE 255
#define HCI_CMD_PAYLOAD_SIZE 255
#define LE_ADVERTISING_DATA_SIZE 31
// Link Policy Settings

View File

@ -141,6 +141,15 @@ extern "C" {
#endif
#endif
// packet header sizes
#define HCI_CMD_HEADER_SIZE 3
#define HCI_ACL_HEADER_SIZE 4
#define HCI_SCO_HEADER_SIZE 3
#define HCI_EVENT_HEADER_SIZE 2
#define HCI_EVENT_PAYLOAD_SIZE 255
#define HCI_CMD_PAYLOAD_SIZE 255
//
#define IS_COMMAND(packet, command) (little_endian_read_16(packet,0) == command.opcode)

View File

@ -55,6 +55,14 @@
extern "C" {
#endif
/**
* packet types - used in BTstack and over the H4 UART interface
*/
#define HCI_COMMAND_DATA_PACKET 0x01
#define HCI_ACL_DATA_PACKET 0x02
#define HCI_SCO_DATA_PACKET 0x03
#define HCI_EVENT_PACKET 0x04
/* API_START */
/* HCI packet types */