gatt_client.c (26166ecfac60587fd6e435485026820c4a4be90b) | gatt_client.c (36e79bd03e5e29d1ad86f14c3d2408bbfc035a2f) |
---|---|
1/* 2 * Copyright (C) 2014 BlueKitchen GmbH 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions 6 * are met: 7 * 8 * 1. Redistributions of source code must retain the above copyright --- 1475 unchanged lines hidden (view full) --- 1484 reverse_128(&packet[1], uuid128); 1485 report_gatt_included_service_uuid128(gatt_client, gatt_client->start_group_handle, uuid128); 1486 } 1487 trigger_next_included_service_query(gatt_client, gatt_client->start_group_handle); 1488 // GATT_EVENT_QUERY_COMPLETE is emitted by trigger_next_xxx when done 1489 break; 1490 1491 case P_W4_READ_CHARACTERISTIC_VALUE_RESULT: | 1/* 2 * Copyright (C) 2014 BlueKitchen GmbH 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions 6 * are met: 7 * 8 * 1. Redistributions of source code must retain the above copyright --- 1475 unchanged lines hidden (view full) --- 1484 reverse_128(&packet[1], uuid128); 1485 report_gatt_included_service_uuid128(gatt_client, gatt_client->start_group_handle, uuid128); 1486 } 1487 trigger_next_included_service_query(gatt_client, gatt_client->start_group_handle); 1488 // GATT_EVENT_QUERY_COMPLETE is emitted by trigger_next_xxx when done 1489 break; 1490 1491 case P_W4_READ_CHARACTERISTIC_VALUE_RESULT: |
1492 gatt_client_handle_transaction_complete(gatt_client); | |
1493 report_gatt_characteristic_value(gatt_client, gatt_client->attribute_handle, &packet[1], size - 1u); | 1492 report_gatt_characteristic_value(gatt_client, gatt_client->attribute_handle, &packet[1], size - 1u); |
1493 gatt_client_handle_transaction_complete(gatt_client); |
|
1494 emit_gatt_complete_event(gatt_client, ATT_ERROR_SUCCESS); 1495 break; 1496 1497 case P_W4_READ_CHARACTERISTIC_DESCRIPTOR_RESULT: | 1494 emit_gatt_complete_event(gatt_client, ATT_ERROR_SUCCESS); 1495 break; 1496 1497 case P_W4_READ_CHARACTERISTIC_DESCRIPTOR_RESULT: |
1498 gatt_client_handle_transaction_complete(gatt_client); | |
1499 report_gatt_characteristic_descriptor(gatt_client, gatt_client->attribute_handle, &packet[1], 1500 size - 1u, 0u); | 1498 report_gatt_characteristic_descriptor(gatt_client, gatt_client->attribute_handle, &packet[1], 1499 size - 1u, 0u); |
1500 gatt_client_handle_transaction_complete(gatt_client); |
|
1501 emit_gatt_complete_event(gatt_client, ATT_ERROR_SUCCESS); 1502 break; 1503 1504 // Use ATT_READ_REQUEST for first blob of Read Long Characteristic 1505 case P_W4_READ_BLOB_RESULT: 1506 report_gatt_long_characteristic_value_blob(gatt_client, gatt_client->attribute_handle, &packet[1], 1507 size - 1u, gatt_client->attribute_offset); 1508 trigger_next_blob_query(gatt_client, P_W2_SEND_READ_BLOB_QUERY, size - 1u); --- 1491 unchanged lines hidden --- | 1501 emit_gatt_complete_event(gatt_client, ATT_ERROR_SUCCESS); 1502 break; 1503 1504 // Use ATT_READ_REQUEST for first blob of Read Long Characteristic 1505 case P_W4_READ_BLOB_RESULT: 1506 report_gatt_long_characteristic_value_blob(gatt_client, gatt_client->attribute_handle, &packet[1], 1507 size - 1u, gatt_client->attribute_offset); 1508 trigger_next_blob_query(gatt_client, P_W2_SEND_READ_BLOB_QUERY, size - 1u); --- 1491 unchanged lines hidden --- |