mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-04-07 16:20:19 +00:00
att_server: add de-init
This commit is contained in:
parent
f508b0b10e
commit
35d7f2df0b
@ -100,7 +100,7 @@ typedef struct {
|
||||
// global
|
||||
static btstack_packet_callback_registration_t hci_event_callback_registration;
|
||||
static btstack_packet_callback_registration_t sm_event_callback_registration;
|
||||
static btstack_packet_handler_t att_client_packet_handler = NULL;
|
||||
static btstack_packet_handler_t att_client_packet_handler;
|
||||
static btstack_linked_list_t service_handlers;
|
||||
static btstack_context_callback_registration_t att_client_waiting_for_can_send_registration;
|
||||
|
||||
@ -1280,3 +1280,10 @@ uint16_t att_server_get_mtu(hci_con_handle_t con_handle){
|
||||
att_connection_t * att_connection = &hci_connection->att_connection;
|
||||
return att_connection->mtu;
|
||||
}
|
||||
|
||||
void att_server_deinit(void){
|
||||
att_server_client_read_callback = NULL;
|
||||
att_server_client_write_callback = NULL;
|
||||
att_client_packet_handler = NULL;
|
||||
service_handlers = NULL;
|
||||
}
|
||||
|
@ -110,7 +110,7 @@ uint8_t att_server_request_to_send_notification(btstack_context_callback_registr
|
||||
*/
|
||||
uint8_t att_server_request_to_send_indication(btstack_context_callback_registration_t * callback_registration, hci_con_handle_t con_handle);
|
||||
|
||||
/*
|
||||
/**
|
||||
* @brief notify client about attribute value change
|
||||
* @param con_handle
|
||||
* @param attribute_handle
|
||||
@ -120,7 +120,7 @@ uint8_t att_server_request_to_send_indication(btstack_context_callback_registrat
|
||||
*/
|
||||
uint8_t att_server_notify(hci_con_handle_t con_handle, uint16_t attribute_handle, const uint8_t *value, uint16_t value_len);
|
||||
|
||||
/*
|
||||
/**
|
||||
* @brief indicate value change to client. client is supposed to reply with an indication_response
|
||||
* @param con_handle
|
||||
* @param attribute_handle
|
||||
@ -131,7 +131,7 @@ uint8_t att_server_notify(hci_con_handle_t con_handle, uint16_t attribute_handle
|
||||
uint8_t att_server_indicate(hci_con_handle_t con_handle, uint16_t attribute_handle, const uint8_t *value, uint16_t value_len);
|
||||
|
||||
#ifdef ENABLE_ATT_DELAYED_RESPONSE
|
||||
/*
|
||||
/**
|
||||
* @brief response ready - called after returning ATT_READ__RESPONSE_PENDING in an att_read_callback or
|
||||
* ATT_ERROR_WRITE_REQUEST_PENDING IN att_write_callback before to trigger callback again and complete the transaction
|
||||
* @nore The ATT Server will retry handling the current ATT request
|
||||
@ -141,9 +141,14 @@ uint8_t att_server_indicate(hci_con_handle_t con_handle, uint16_t attribute_hand
|
||||
uint8_t att_server_response_ready(hci_con_handle_t con_handle);
|
||||
#endif
|
||||
|
||||
/**
|
||||
* De-Init ATT Server
|
||||
*/
|
||||
void att_server_deinit(void);
|
||||
|
||||
// the following functions will be removed soon
|
||||
|
||||
/*
|
||||
/**
|
||||
* @brief tests if a notification or indication can be send right now
|
||||
* @param con_handle
|
||||
* @return 1, if packet can be sent
|
||||
|
Loading…
x
Reference in New Issue
Block a user