1*f45e14b1S[email protected] #include <stdint.h> 2*f45e14b1S[email protected] #include <stdio.h> 3*f45e14b1S[email protected] #include <stdlib.h> 4*f45e14b1S[email protected] #include <string.h> 5*f45e14b1S[email protected] 6*f45e14b1S[email protected] #include <btstack/btstack.h> 7*f45e14b1S[email protected] #include "hci.h" 8*f45e14b1S[email protected] #include "hci_dump.h" 9*f45e14b1S[email protected] #include "l2cap.h" 10*f45e14b1S[email protected] 11*f45e14b1S[email protected] int hci_can_send_packet_now_using_packet_buffer(uint8_t packet_type){ 12*f45e14b1S[email protected] printf("hci_can_send_packet_now_using_packet_buffer \n"); 13*f45e14b1S[email protected] return 1; 14*f45e14b1S[email protected] } 15*f45e14b1S[email protected] 16*f45e14b1S[email protected] void hci_disconnect_security_block(hci_con_handle_t con_handle){ 17*f45e14b1S[email protected] printf("hci_disconnect_security_block \n"); 18*f45e14b1S[email protected] } 19*f45e14b1S[email protected] 20*f45e14b1S[email protected] void hci_dump_log(const char * format, ...){ 21*f45e14b1S[email protected] printf("hci_disconnect_security_block \n"); 22*f45e14b1S[email protected] } 23*f45e14b1S[email protected] 24*f45e14b1S[email protected] int hci_send_cmd(const hci_cmd_t *cmd, ...){ 25*f45e14b1S[email protected] printf("hci_send_cmd \n"); 26*f45e14b1S[email protected] return 0; 27*f45e14b1S[email protected] } 28*f45e14b1S[email protected] 29*f45e14b1S[email protected] 30*f45e14b1S[email protected] int l2cap_can_send_connectionless_packet_now(void){ 31*f45e14b1S[email protected] printf("l2cap_can_send_connectionless_packet_now \n"); 32*f45e14b1S[email protected] return 1; 33*f45e14b1S[email protected] } 34*f45e14b1S[email protected] 35*f45e14b1S[email protected] static uint8_t l2cap_stack_buffer[20]; 36*f45e14b1S[email protected] static uint16_t max_l2cap_data_packet_length = 20; 37*f45e14b1S[email protected] 38*f45e14b1S[email protected] 39*f45e14b1S[email protected] uint8_t *l2cap_get_outgoing_buffer(void){ 40*f45e14b1S[email protected] printf("l2cap_get_outgoing_buffer \n"); 41*f45e14b1S[email protected] return (uint8_t *)&l2cap_stack_buffer; // 8 bytes 42*f45e14b1S[email protected] } 43*f45e14b1S[email protected] 44*f45e14b1S[email protected] 45*f45e14b1S[email protected] 46*f45e14b1S[email protected] uint16_t l2cap_max_mtu(void){ 47*f45e14b1S[email protected] printf("l2cap_max_mtu \n"); 48*f45e14b1S[email protected] return max_l2cap_data_packet_length; 49*f45e14b1S[email protected] } 50*f45e14b1S[email protected] 51*f45e14b1S[email protected] 52*f45e14b1S[email protected] void l2cap_register_fixed_channel(btstack_packet_handler_t packet_handler, uint16_t channel_id) { 53*f45e14b1S[email protected] printf("l2cap_register_fixed_channel \n"); 54*f45e14b1S[email protected] } 55*f45e14b1S[email protected] 56*f45e14b1S[email protected] void l2cap_register_packet_handler(void (*handler)(void * connection, uint8_t packet_type, uint16_t channel, uint8_t *packet, uint16_t size)){ 57*f45e14b1S[email protected] printf("l2cap_register_packet_handler \n"); 58*f45e14b1S[email protected] } 59*f45e14b1S[email protected] 60*f45e14b1S[email protected] int hci_reserve_packet_buffer(void){ 61*f45e14b1S[email protected] printf("hci_reserve_packet_buffer \n"); 62*f45e14b1S[email protected] return 1; 63*f45e14b1S[email protected] } 64*f45e14b1S[email protected] 65*f45e14b1S[email protected] int l2cap_reserve_packet_buffer(void){ 66*f45e14b1S[email protected] printf("l2cap_reserve_packet_buffer \n"); 67*f45e14b1S[email protected] return hci_reserve_packet_buffer(); 68*f45e14b1S[email protected] } 69*f45e14b1S[email protected] 70*f45e14b1S[email protected] int l2cap_send_prepared_connectionless(uint16_t handle, uint16_t cid, uint16_t len){ 71*f45e14b1S[email protected] printf("l2cap_send_prepared_connectionless \n"); 72*f45e14b1S[email protected] return 0; 73*f45e14b1S[email protected] } 74*f45e14b1S[email protected] 75*f45e14b1S[email protected] 76*f45e14b1S[email protected] void l2cap_run(void){ 77*f45e14b1S[email protected] } 78