mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-01-29 12:32:54 +00:00
util.h: remove printUUID128
This commit is contained in:
parent
aa4d01c707
commit
1b0524c477
@ -171,7 +171,7 @@ static void dump_advertisement_data(uint8_t * adv_data, uint8_t adv_size){
|
||||
case 0x06: // Incomplete List of 128-bit Service Class UUIDs
|
||||
case 0x07: // Complete List of 128-bit Service Class UUIDs
|
||||
case 0x15: // List of 128-bit Service Solicitation UUIDs
|
||||
printUUID128(data);
|
||||
printf("%s", uuid128_to_str(data));
|
||||
break;
|
||||
case 0x08: // Shortened Local Name
|
||||
case 0x09: // Complete Local Name
|
||||
|
@ -97,7 +97,7 @@ static void printUUID(uint8_t * uuid128, uint16_t uuid16){
|
||||
if (uuid16){
|
||||
printf("%04x",uuid16);
|
||||
} else {
|
||||
printUUID128(uuid128);
|
||||
printf("%s", uuid128_to_str(uuid128));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -136,7 +136,7 @@ static void printUUID(uint8_t * uuid128, uint16_t uuid16){
|
||||
if (uuid16){
|
||||
printf("%04x",uuid16);
|
||||
} else {
|
||||
printUUID128(uuid128);
|
||||
printf("%s", uuid128_to_str(uuid128));
|
||||
}
|
||||
}
|
||||
|
||||
@ -279,18 +279,15 @@ void handle_gatt_client_event(uint8_t packet_type, uint16_t channel, uint8_t *pa
|
||||
if (search_services){
|
||||
// GATT_EVENT_QUERY_COMPLETE of search services
|
||||
service_index = 0;
|
||||
printf("\nGATT browser - CHARACTERISTIC for SERVICE ");
|
||||
printUUID128(service.uuid128); printf("\n");
|
||||
printf("\nGATT browser - CHARACTERISTIC for SERVICE %s\n", uuid128_to_str(service.uuid128));
|
||||
search_services = 0;
|
||||
gatt_client_discover_characteristics_for_service(gc_id, gc_handle, &services[service_index]);
|
||||
} else {
|
||||
// GATT_EVENT_QUERY_COMPLETE of search characteristics
|
||||
if (service_index < service_count) {
|
||||
service = services[service_index++];
|
||||
printf("\nGATT browser - CHARACTERISTIC for SERVICE ");
|
||||
printUUID128(service.uuid128);
|
||||
printf(", [0x%04x-0x%04x]\n", service.start_group_handle, service.end_group_handle);
|
||||
|
||||
printf("\nGATT browser - CHARACTERISTIC for SERVICE %s, [0x%04x-0x%04x]\n",
|
||||
uuid128_to_str(service.uuid128), service.start_group_handle, service.end_group_handle);
|
||||
gatt_client_discover_characteristics_for_service(gc_id, gc_handle, &service);
|
||||
break;
|
||||
}
|
||||
|
@ -205,9 +205,6 @@ char * uuid128_to_str(uint8_t * uuid){
|
||||
uuid[8], uuid[9], uuid[10], uuid[11], uuid[12], uuid[13], uuid[14], uuid[15]);
|
||||
return uuid128_to_str_buffer;
|
||||
}
|
||||
void printUUID128(uint8_t *uuid) {
|
||||
printf("%s", uuid128_to_str(uuid));
|
||||
}
|
||||
|
||||
static char bd_addr_to_str_buffer[6*3]; // 12:45:78:01:34:67\0
|
||||
char * bd_addr_to_str(bd_addr_t addr){
|
||||
|
@ -138,12 +138,6 @@ void hexdumpf(const void *data, int size);
|
||||
*/
|
||||
char * uuid128_to_str(uint8_t * uuid);
|
||||
|
||||
/**
|
||||
* @brief Print UUID128
|
||||
* @note uses fixed global buffer
|
||||
*/
|
||||
void printUUID128(uint8_t *uuid);
|
||||
|
||||
/**
|
||||
* @brief Create human readable represenationt of Bluetooth address
|
||||
* @note uses fixed global buffer
|
||||
|
@ -627,9 +627,7 @@ static int de_traversal_dump_data(uint8_t * element, de_type_t de_type, de_size_
|
||||
indent++;
|
||||
de_traverse_sequence(element, de_traversal_dump_data, (void *)&indent);
|
||||
} else if (de_type == DE_UUID && de_size == DE_SIZE_128) {
|
||||
printf(", value: ");
|
||||
printUUID128(element+1);
|
||||
printf("\n");
|
||||
printf(", value: %s\n", uuid128_to_str(element+1));
|
||||
} else if (de_type == DE_STRING) {
|
||||
int len = 0;
|
||||
switch (de_size){
|
||||
|
@ -208,7 +208,7 @@ static void printUUID(uint8_t * uuid128, uint16_t uuid16){
|
||||
if (uuid16){
|
||||
printf("%04x",uuid16);
|
||||
} else {
|
||||
printUUID128(uuid128);
|
||||
printf("%s", uuid128_to_str(uuid128));
|
||||
}
|
||||
}
|
||||
|
||||
@ -519,9 +519,7 @@ static void handle_gatt_client_event(uint8_t packet_type, uint8_t *packet, uint1
|
||||
if (sdp_has_blueooth_base_uuid(uuid128)){
|
||||
printf("Characteristic descriptor at 0x%04x with UUID %04x\n", descriptor_handle, bit_endian_read_32(uuid128, 0));
|
||||
} else {
|
||||
printf("Characteristic descriptor at 0x%04x with UUID ", descriptor_handle);
|
||||
printUUID128(uuid128);
|
||||
printf("\n");
|
||||
printf("Characteristic descriptor at 0x%04x with UUID %s\n", descriptor_handle, uuid128_to_str(uuid128));
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -1219,15 +1217,11 @@ static int ui_process_uuid128_request(char buffer){
|
||||
printf("\n");
|
||||
switch (central_state){
|
||||
case CENTRAL_W4_PRIMARY_SERVICES:
|
||||
printf("Discover Primary Services with UUID128 ");
|
||||
printUUID128(ui_uuid128);
|
||||
printf("\n");
|
||||
printf("Discover Primary Services with UUID128 %s\n", uuid128_to_str(ui_uuid128));
|
||||
gatt_client_discover_primary_services_by_uuid128(gc_id, handle, ui_uuid128);
|
||||
return 0;
|
||||
case CENTRAL_W4_READ_CHARACTERISTIC_VALUE_BY_UUID:
|
||||
printf("Read Characteristic Value with UUID128 ");
|
||||
printUUID128(ui_uuid128);
|
||||
printf("\n");
|
||||
printf("Read Characteristic Value with UUID128 %s\n", uuid128_to_str(ui_uuid128));
|
||||
gatt_client_read_value_of_characteristics_by_uuid128(gc_id, handle, 0x0001, 0xffff, ui_uuid128);
|
||||
return 0;
|
||||
default:
|
||||
|
Loading…
x
Reference in New Issue
Block a user