mock.c (ec4690afd10fec8b375d4122b81902e9c9a379a0) mock.c (8f4649e3ba0a9d21085f42b688929492b3ab33b7)
1#include <stdint.h>
2#include <stdio.h>
3#include <string.h>
4
5#include "hci.h"
6#include "hci_dump.h"
7#include "l2cap.h"
8

--- 151 unchanged lines hidden (view full) ---

160void l2cap_register_fixed_channel(btstack_packet_handler_t packet_handler, uint16_t channel_id) {
161 att_packet_handler = packet_handler;
162}
163
164void hci_add_event_handler(btstack_packet_callback_registration_t * callback_handler){
165 registered_hci_event_handler = callback_handler->callback;
166}
167
1#include <stdint.h>
2#include <stdio.h>
3#include <string.h>
4
5#include "hci.h"
6#include "hci_dump.h"
7#include "l2cap.h"
8

--- 151 unchanged lines hidden (view full) ---

160void l2cap_register_fixed_channel(btstack_packet_handler_t packet_handler, uint16_t channel_id) {
161 att_packet_handler = packet_handler;
162}
163
164void hci_add_event_handler(btstack_packet_callback_registration_t * callback_handler){
165 registered_hci_event_handler = callback_handler->callback;
166}
167
168bool l2cap_reserve_packet_buffer(void){
169 return true;
170}
168void l2cap_reserve_packet_buffer(void){}
171
172bool l2cap_can_send_fixed_channel_packet_now(uint16_t handle, uint16_t channel_id){
173 return true;
174}
175
176void l2cap_request_can_send_fix_channel_now_event(uint16_t handle, uint16_t channel_id){
177 uint8_t event[] = { L2CAP_EVENT_CAN_SEND_NOW, 2, 1, 0};
178 att_packet_handler(HCI_EVENT_PACKET, 0, (uint8_t*)event, sizeof(event));

--- 98 unchanged lines hidden ---
169
170bool l2cap_can_send_fixed_channel_packet_now(uint16_t handle, uint16_t channel_id){
171 return true;
172}
173
174void l2cap_request_can_send_fix_channel_now_event(uint16_t handle, uint16_t channel_id){
175 uint8_t event[] = { L2CAP_EVENT_CAN_SEND_NOW, 2, 1, 0};
176 att_packet_handler(HCI_EVENT_PACKET, 0, (uint8_t*)event, sizeof(event));

--- 98 unchanged lines hidden ---