mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-01-29 03:32:49 +00:00
att_server: add flags to att_service_handler_t
This commit is contained in:
parent
f76e733a84
commit
85878f9d1f
@ -166,11 +166,12 @@ typedef int (*att_write_callback_t)(hci_con_handle_t con_handle, uint16_t attrib
|
|||||||
// Read & Write Callbacks for handle range
|
// Read & Write Callbacks for handle range
|
||||||
typedef struct att_service_handler {
|
typedef struct att_service_handler {
|
||||||
btstack_linked_item_t * item;
|
btstack_linked_item_t * item;
|
||||||
uint16_t start_handle;
|
|
||||||
uint16_t end_handle;
|
|
||||||
att_read_callback_t read_callback;
|
att_read_callback_t read_callback;
|
||||||
att_write_callback_t write_callback;
|
att_write_callback_t write_callback;
|
||||||
btstack_packet_handler_t packet_handler;
|
btstack_packet_handler_t packet_handler;
|
||||||
|
uint16_t start_handle;
|
||||||
|
uint16_t end_handle;
|
||||||
|
uint8_t flags;
|
||||||
} att_service_handler_t;
|
} att_service_handler_t;
|
||||||
|
|
||||||
// MARK: ATT Operations
|
// MARK: ATT Operations
|
||||||
|
@ -1263,6 +1263,8 @@ void att_server_register_service_handler(att_service_handler_t * handler){
|
|||||||
log_error("handler for range 0x%04x-0x%04x already registered", handler->start_handle, handler->end_handle);
|
log_error("handler for range 0x%04x-0x%04x already registered", handler->start_handle, handler->end_handle);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
handler->flags = 0;
|
||||||
btstack_linked_list_add(&service_handlers, (btstack_linked_item_t*) handler);
|
btstack_linked_list_add(&service_handlers, (btstack_linked_item_t*) handler);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user