83#define BLE_UUID16_INIT(uuid16) \
86 .type = BLE_UUID_TYPE_16, \
91#define BLE_UUID32_INIT(uuid32) \
94 .type = BLE_UUID_TYPE_32, \
99#define BLE_UUID128_INIT(uuid128 ...) \
102 .type = BLE_UUID_TYPE_128, \
104 .value = { uuid128 }, \
107#define BLE_UUID16_DECLARE(uuid16) \
108 ((ble_uuid_t *) (&(ble_uuid16_t) BLE_UUID16_INIT(uuid16)))
110#define BLE_UUID32_DECLARE(uuid32) \
111 ((ble_uuid_t *) (&(ble_uuid32_t) BLE_UUID32_INIT(uuid32)))
113#define BLE_UUID128_DECLARE(uuid128...) \
114 ((ble_uuid_t *) (&(ble_uuid128_t) BLE_UUID128_INIT(uuid128)))
116#define BLE_UUID16(u) \
117 ((ble_uuid16_t *) (u))
119#define BLE_UUID32(u) \
120 ((ble_uuid32_t *) (u))
122#define BLE_UUID128(u) \
123 ((ble_uuid128_t *) (u))
128#define BLE_UUID_STR_LEN (37)
char * ble_uuid_to_str(const ble_uuid_t *uuid, char *dst)
Converts the specified UUID to its string representation.
Definition ble_uuid.c:110
int ble_uuid_cmp(const ble_uuid_t *uuid1, const ble_uuid_t *uuid2)
Compares two Bluetooth UUIDs.
Definition ble_uuid.c:65
int ble_uuid_init_from_buf(ble_uuid_any_t *uuid, const void *buf, size_t len)
Constructs a UUID object from a byte array.
Definition ble_uuid.c:44
uint16_t ble_uuid_u16(const ble_uuid_t *uuid)
Converts the specified 16-bit UUID to a uint16_t.
Definition ble_uuid.c:140
void ble_uuid_copy(ble_uuid_any_t *dst, const ble_uuid_t *src)
Copy Bluetooth UUID.
Definition ble_uuid.c:89
@ BLE_UUID_TYPE_128
Definition ble_uuid.h:48
@ BLE_UUID_TYPE_32
Definition ble_uuid.h:45
@ BLE_UUID_TYPE_16
Definition ble_uuid.h:42
uint8_t type
Definition ble_uuid.h:54