gatt_client: drop gatt_client_pts_suppress_mtu_exchange function, replaced by gatt_client_mtu_enable_auto_negotiation(0)

This commit is contained in:
Matthias Ringwald 2018-01-30 19:11:23 +01:00
parent 5cf6c43447
commit 838e632c8e
2 changed files with 1 additions and 12 deletions

View File

@ -65,7 +65,6 @@
static btstack_linked_list_t gatt_client_connections;
static btstack_linked_list_t gatt_client_value_listeners;
static btstack_packet_callback_registration_t hci_event_callback_registration;
static uint8_t pts_suppress_mtu_exchange;
static uint8_t mtu_exchange_enabled;
@ -87,7 +86,6 @@ static uint16_t peripheral_mtu(gatt_client_t *peripheral){
void gatt_client_init(void){
gatt_client_connections = NULL;
pts_suppress_mtu_exchange = 0;
mtu_exchange_enabled = 1;
// regsister for HCI Events
hci_event_callback_registration.callback = &gatt_client_hci_event_packet_handler;
@ -160,11 +158,6 @@ static gatt_client_t * provide_context_for_conn_handle(hci_con_handle_t con_hand
}
context->gatt_client_state = P_READY;
btstack_linked_list_add(&gatt_client_connections, (btstack_linked_item_t*)context);
// skip mtu exchange for testing sm with pts
if (pts_suppress_mtu_exchange){
context->mtu_state = MTU_EXCHANGED;
}
return context;
}
@ -1879,10 +1872,6 @@ uint8_t gatt_client_cancel_write(btstack_packet_handler_t callback, hci_con_hand
return 0;
}
void gatt_client_pts_suppress_mtu_exchange(void){
pts_suppress_mtu_exchange = 1;
}
void gatt_client_deserialize_service(const uint8_t *packet, int offset, gatt_client_service_t *service){
service->start_group_handle = little_endian_read_16(packet, offset);
service->end_group_handle = little_endian_read_16(packet, offset + 2);

View File

@ -220,7 +220,7 @@ void gatt_client_init(void);
uint8_t gatt_client_get_mtu(hci_con_handle_t con_handle, uint16_t * mtu);
/**
* @brief Sets whether a MTU Exchange Request shall be automatically send before the first attribute read request is send.
* @brief Sets whether a MTU Exchange Request shall be automatically send before the first attribute read request is send. Default is enable.d
*/
void gatt_client_mtu_enable_auto_negotiation(uint8_t enabled);