mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-01-26 21:35:16 +00:00
h5: provide 2 byte post buffer for outgoing packets - used for 16-bit data integrity check
This commit is contained in:
parent
7c2aa31e5c
commit
e9c151bc12
@ -92,8 +92,11 @@ extern "C" {
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// additional pre-buffer space for packets to Bluetooth module, for now, used for HCI Transport H4 DMA
|
// additional pre- and post-packet buffer for packets to Bluetooth module
|
||||||
|
// - pre-buffer used for HCI Transport H4 variants
|
||||||
|
// - post-buffer used for HCI Transport H5
|
||||||
#define HCI_OUTGOING_PRE_BUFFER_SIZE 1
|
#define HCI_OUTGOING_PRE_BUFFER_SIZE 1
|
||||||
|
#define HCI_OUTGOING_POST_BUFFER_SIZE 2
|
||||||
|
|
||||||
// BNEP may uncompress the IP Header by 16 bytes
|
// BNEP may uncompress the IP Header by 16 bytes
|
||||||
#ifndef HCI_INCOMING_PRE_BUFFER_SIZE
|
#ifndef HCI_INCOMING_PRE_BUFFER_SIZE
|
||||||
@ -646,7 +649,7 @@ typedef struct {
|
|||||||
|
|
||||||
// single buffer for HCI packet assembly + additional prebuffer for H4 drivers
|
// single buffer for HCI packet assembly + additional prebuffer for H4 drivers
|
||||||
uint8_t * hci_packet_buffer;
|
uint8_t * hci_packet_buffer;
|
||||||
uint8_t hci_packet_buffer_data[HCI_OUTGOING_PRE_BUFFER_SIZE + HCI_PACKET_BUFFER_SIZE];
|
uint8_t hci_packet_buffer_data[HCI_OUTGOING_PRE_BUFFER_SIZE + HCI_PACKET_BUFFER_SIZE + HCI_OUTGOING_POST_BUFFER_SIZE];
|
||||||
uint8_t hci_packet_buffer_reserved;
|
uint8_t hci_packet_buffer_reserved;
|
||||||
uint16_t acl_fragmentation_pos;
|
uint16_t acl_fragmentation_pos;
|
||||||
uint16_t acl_fragmentation_total_size;
|
uint16_t acl_fragmentation_total_size;
|
||||||
|
@ -49,6 +49,11 @@
|
|||||||
#include "hci_transport.h"
|
#include "hci_transport.h"
|
||||||
#include "btstack_uart_block.h"
|
#include "btstack_uart_block.h"
|
||||||
|
|
||||||
|
// assert post-buffer for 16-bit data integrity check is available
|
||||||
|
#if !defined(HCI_OUTGOING_POST_BUFFER_SIZE) || (HCI_OUTGOING_POST_BUFFER_SIZE < 2)
|
||||||
|
#error HCI_OUTGOING_POST_BUFFER_SIZE not defined. Please update hci.h
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
LINK_UNINITIALIZED,
|
LINK_UNINITIALIZED,
|
||||||
LINK_INITIALIZED,
|
LINK_INITIALIZED,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user