1 /* 2 * hci_h4_transport.c 3 * 4 * Created by Matthias Ringwald on 4/29/09. 5 * 6 */ 7 8 #include "hci_transport_h4.h" 9 10 // prototypes 11 static int open(void *transport_config){ 12 return 0; 13 } 14 15 static int close(){ 16 return 0; 17 } 18 19 static int send_cmd_packet(void *packet, int size){ 20 return 0; 21 } 22 23 static int send_acl_packet(void *packet, int size){ 24 return 0; 25 } 26 27 static void register_event_packet_handler(void (*handler)(void *packet, int size)){ 28 } 29 30 static void register_acl_packet_handler (void (*handler)(void *packet, int size)){ 31 } 32 33 static int get_fd() { 34 return -1; 35 } 36 37 static int handle_data() { 38 return 0; 39 } 40 41 static const char * get_transport_name(){ 42 return "H4"; 43 } 44 45 // private data 46 47 typedef struct { 48 hci_uart_config_t *config; 49 void (*event_packet_handle)(void *packet, int size); 50 void (*acl_packet_handle)(void *packet, int size); 51 } hci_h4_transport_private_t; 52 53 // single instance 54 hci_transport_t hci_h4_transport = { 55 open, 56 close, 57 send_cmd_packet, 58 send_acl_packet, 59 register_acl_packet_handler, 60 register_event_packet_handler, 61 get_fd, 62 handle_data, 63 get_transport_name 64 }; 65