add utils used by sdp

This commit is contained in:
matthias.ringwald 2010-06-09 17:32:07 +00:00
parent 58de561001
commit c840b07bfe
2 changed files with 7 additions and 0 deletions

View File

@ -91,6 +91,7 @@ void net_store_16(uint8_t *buffer, uint16_t pos, uint16_t value);
void net_store_32(uint8_t *buffer, uint16_t pos, uint32_t value);
void hexdump(void *data, int size);
void printUUID(uint8_t *uuid);
void print_bd_addr(bd_addr_t addr);
int sscan_bd_addr(uint8_t * addr_string, bd_addr_t addr);

View File

@ -82,6 +82,12 @@ void hexdump(void *data, int size){
printf("\n");
}
void printUUID(uint8_t *uuid) {
printf("%02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-%02x%02x%02x%02x%02x%02x",
uuid[0], uuid[1], uuid[2], uuid[3], uuid[4], uuid[5], uuid[6], uuid[7],
uuid[8], uuid[9], uuid[10], uuid[11], uuid[12], uuid[13], uuid[14], uuid[15]);
}
void print_bd_addr( bd_addr_t addr){
int i;
for (i=0; i<BD_ADDR_LEN-1;i++){