mirror of
https://github.com/espressif/esp-nimble.git
synced 2026-08-03 16:47:52 +00:00
nimble/host: Make BLE_UUIDxx_INIT macros C++ compatible
Allows to use `ble_uuid.h` with C++ by changing the BLE_UUIDy_INIT macros. Build environment: ninja 1.9.0 cmake 3.16 xtensa-esp32-elf-gcc.exe (crosstool-NG esp-2021r2-patch3) 8.4.0 (based on GCC 8.4.0)
This commit is contained in:
committed by
Rahul Tank
parent
d7aa88a1f9
commit
63b114e944
@@ -82,19 +82,25 @@ typedef union {
|
||||
|
||||
#define BLE_UUID16_INIT(uuid16) \
|
||||
{ \
|
||||
.u.type = BLE_UUID_TYPE_16, \
|
||||
.u = { \
|
||||
.type = BLE_UUID_TYPE_16, \
|
||||
}, \
|
||||
.value = (uuid16), \
|
||||
}
|
||||
|
||||
#define BLE_UUID32_INIT(uuid32) \
|
||||
{ \
|
||||
.u.type = BLE_UUID_TYPE_32, \
|
||||
.u = { \
|
||||
.type = BLE_UUID_TYPE_32, \
|
||||
}, \
|
||||
.value = (uuid32), \
|
||||
}
|
||||
|
||||
#define BLE_UUID128_INIT(uuid128...) \
|
||||
#define BLE_UUID128_INIT(uuid128 ...) \
|
||||
{ \
|
||||
.u.type = BLE_UUID_TYPE_128, \
|
||||
.u = { \
|
||||
.type = BLE_UUID_TYPE_128, \
|
||||
}, \
|
||||
.value = { uuid128 }, \
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user