return old packet handler

This commit is contained in:
matthias.ringwald 2009-10-22 20:01:51 +00:00
parent 452683d08c
commit c0557808b3
2 changed files with 3 additions and 0 deletions

View File

@ -29,6 +29,7 @@ int bt_close();
int bt_send_cmd(hci_cmd_t *cmd, ...);
// register packet handler -- channel only valid for l2cap and rfcomm packets
// @returns old packet handler
btstack_packet_handler_t bt_register_packet_handler(btstack_packet_handler_t handler);
void bt_send_acl(uint8_t * data, uint16_t len);

View File

@ -63,7 +63,9 @@ int btstack_packet_handler(connection_t *connection, uint16_t packet_type, uint1
// register packet handler
btstack_packet_handler_t bt_register_packet_handler(btstack_packet_handler_t handler){
btstack_packet_handler_t old_handler = client_packet_handler;
client_packet_handler = handler;
return old_handler;
}
void bt_send_l2cap(uint16_t source_cid, uint8_t *data, uint16_t len){