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 12 #include <btstack/hci_cmds.h> 13 // #include "l2cap.h" 14 15 #include <stdint.h> 16 17 // init BTstack library 18 int bt_open(); 19 20 // stop using BTstack library 21 int bt_close(); 22 23 // send hci cmd packet 24 int bt_send_cmd(hci_cmd_t *cmd, ...); 25 26 // register packet and event handler 27 void bt_register_event_packet_handler(void (*handler)(uint8_t *packet, uint16_t size)); 28 void bt_register_data_packet_handler (void (*handler)(uint8_t *packet, uint16_t size)); 29 30 void bt_send_acl_packet(uint8_t * data, uint16_t len); 31 void l2cap_send(uint16_t source_cid, uint8_t *data, uint16_t len); 32