In order to manage incoming and outgoing HCI data (events, commands & ACL data packets) we need to have some way of storing this into buffers. This patch implements a 'pool' of buffers with the help of the nano_fifo API. The pool is initially populated with all available buffers. After this code can on demand request buffers from the pool with the help of bt_buf_get() and return buffers back into the pool with bt_buf_put(). Since we don't always know the execution context from where the API is operated on, this patch also adds convenience fifo_get/fifo_put wrappers that look up the exact context before calling the correct nano_fifo API. Change-Id: Ie7f6d450de865273171e21a000d5a14274d27d32 Co-authored-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> |
||
---|---|---|
.. | ||
bluetooth.h | ||
hci.h |