diff --git a/src/bluetooth.h b/src/bluetooth.h index d40f71b05..6e135bf06 100644 --- a/src/bluetooth.h +++ b/src/bluetooth.h @@ -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 diff --git a/src/hci.h b/src/hci.h index c1ca50cc6..953f3fa8c 100644 --- a/src/hci.h +++ b/src/hci.h @@ -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) diff --git a/src/hci_transport.h b/src/hci_transport.h index 7d2676486..2a6e93b85 100644 --- a/src/hci_transport.h +++ b/src/hci_transport.h @@ -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 */