#include <bt_hci_api.h>
To initialize one example stack use: struct btstack stack; // The btstack is named stack (e.g.) struct bt_hci_uart uart; // The uart for the uart-layer (usb may follow) The above variables should be global! uart.hwdev = // Set the uart to the first serial port stack.transport = // And register the uart to the specified stack bt_hci_init(&stack); // Start new stack.
From now on the btstack is ready and you can register a higher layer (l2cap for example) or just start programming your own lowlevel functions (See bt_hci_l2cap.h for l2cap use and definitions)
For possible (callable) HCI-Functions hava a look at the bt_hci_cmds.h file!