1 /* 2 * btstack.h 3 * 4 * Created by Matthias Ringwald on 7/1/09. 5 * 6 * BTstack client API 7 * 8 */ 9 10 #pragma once 11 #include "hci.h" 12 #include "l2cap.h" 13 14 // init BTstack library 15 int bt_open(); 16 17 // stop using BTstack library 18 int bt_close(); 19 20 // send hci cmd packet 21 int bt_send_cmd(hci_cmd_t *cmd, ...); 22 23 // send hci acl packet 24 int bt_send_acl_packet(uint8_t *packet, int size); 25 26 // TODO: temp 27 int bt_send_l2cap_signaling_packet(hci_con_handle_t handle, L2CAP_SIGNALING_COMMANDS cmd, uint8_t identifier, ...); 28 29 // register packet and event handler 30 void bt_register_event_packet_handler(void (*handler)(uint8_t *packet, int size)); 31 void bt_register_acl_packet_handler (void (*handler)(uint8_t *packet, int size)); 32 33