Bluetooth: host: Add BT_BUF_SIZE to include HCI reserve for buf size

Add helper define BT_BUF_SIZE which considers the BT_BUF_RESERVE when
declaring Bluetooth HCI buffers.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
This commit is contained in:
Joakim Andersson 2020-01-10 09:23:09 +01:00 committed by Carles Cufí
commit 87812c9633

View file

@ -43,8 +43,10 @@ enum bt_buf_type {
#define BT_BUF_RESERVE CONFIG_BT_HCI_RESERVE
#endif
#define BT_BUF_SIZE(size) (BT_BUF_RESERVE + (size))
/** Data size neeed for HCI RX buffers */
#define BT_BUF_RX_SIZE (BT_BUF_RESERVE + CONFIG_BT_RX_BUF_LEN)
#define BT_BUF_RX_SIZE (BT_BUF_SIZE(CONFIG_BT_RX_BUF_LEN))
/** Allocate a buffer for incoming data
*