mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-03-18 13:20:46 +00:00
use typedef for callback handler
This commit is contained in:
parent
f32b992e39
commit
452683d08c
@ -15,6 +15,10 @@
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
// packet handler
|
||||
typedef void (*btstack_packet_handler_t) (uint8_t packet_type, uint16_t channel, uint8_t *packet, uint16_t size);
|
||||
|
||||
|
||||
// init BTstack library
|
||||
int bt_open();
|
||||
|
||||
@ -25,7 +29,7 @@ int bt_close();
|
||||
int bt_send_cmd(hci_cmd_t *cmd, ...);
|
||||
|
||||
// register packet handler -- channel only valid for l2cap and rfcomm packets
|
||||
void bt_register_packet_handler (void (*handler)(uint8_t packet_type, uint16_t channel, uint8_t *packet, uint16_t size));
|
||||
btstack_packet_handler_t bt_register_packet_handler(btstack_packet_handler_t handler);
|
||||
|
||||
void bt_send_acl(uint8_t * data, uint16_t len);
|
||||
|
||||
|
@ -62,7 +62,7 @@ int btstack_packet_handler(connection_t *connection, uint16_t packet_type, uint1
|
||||
}
|
||||
|
||||
// register packet handler
|
||||
void bt_register_packet_handler(void (*handler)(uint8_t packet_type, uint16_t channel, uint8_t *packet, uint16_t size)){
|
||||
btstack_packet_handler_t bt_register_packet_handler(btstack_packet_handler_t handler){
|
||||
client_packet_handler = handler;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user