Skip to content
Commit ecf06deb authored by Radosław Koppel's avatar Radosław Koppel Committed by Johan Hedberg
Browse files

Bluetooth: UUID: Implement UUID 128 encoder



This commit adds an macro to allow UUID 128
to be written in more user-friendly form.
UUID in 128 bit form requires an array creation.
To complicate the whole thing - it requires the array to start from LSB,
so using the readable form, we have to write it down backwards.

Old way to declare example UUID 6E400001-B5A3-F393-E0A9-E50E24DCCA9E:
 0x9E, 0xCA, 0xDC, 0x24, 0x0E, 0xE5, 0xA9, 0xE0,
 0x93, 0xF3, 0xA3, 0xB5, 0x01, 0x00, 0x40, 0x6E

A form provided by this commit:
 BT_UUID_128_ENCODE(0x6E400001, 0xB5A3, 0xF393, 0xE0A9, 0xE50E24DCCA9E)

Signed-off-by: default avatarRadoslaw Koppel <radoslaw.koppel@nordicsemi.no>
parent ceffca2c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment