util.h: rename swapX into reverse_x

This commit is contained in:
Matthias Ringwald 2016-02-11 14:33:35 +01:00
parent 73988a59ce
commit 0ca398bf08

View File

@ -197,7 +197,7 @@ static void extract_service(le_service_t * service, uint8_t * packet){
service->start_group_handle = little_endian_read_16(packet, 4);
service->end_group_handle = little_endian_read_16(packet, 6);
service->uuid16 = 0;
swap128(&packet[8], service->uuid128);
reverse_128(&packet[8], service->uuid128);
if (uuid_has_bluetooth_prefix(service->uuid128)){
service->uuid16 = big_endian_read_32(service->uuid128, 0);
}
@ -209,7 +209,7 @@ static void extract_characteristic(le_characteristic_t * characteristic, uint8_t
characteristic->end_handle = little_endian_read_16(packet, 8);
characteristic->properties = little_endian_read_16(packet, 10);
characteristic->uuid16 = 0;
swap128(&packet[12], characteristic->uuid128);
reverse_128(&packet[12], characteristic->uuid128);
if (uuid_has_bluetooth_prefix(characteristic->uuid128)){
characteristic->uuid16 = big_endian_read_32(characteristic->uuid128, 0);
}