![]() |
S145 SoftDevice for nRF54LS05 API documentation 10.0.0
|
| uint32_t sd_ble_uuid_decode | ( | uint8_t | uuid_le_len, |
| uint8_t const * | p_uuid_le, | ||
| ble_uuid_t * | p_uuid ) |
#include <ble.h>
Decode little endian raw UUID bytes (16-bit or 128-bit) into a 24 bit ble_uuid_t structure.
The raw UUID bytes excluding bytes 12 and 13 (i.e. bytes 0-11 and 14-15) of p_uuid_le are compared to the corresponding ones in each entry of the table of Vendor Specific base UUIDs to look for a match. If there is such a match, bytes 12 and 13 are returned as p_uuid->uuid and the index relative to BLE_UUID_TYPE_VENDOR_BEGIN as p_uuid->type.
| [in] | uuid_le_len | Length in bytes of the buffer pointed to by p_uuid_le (must be 2 or 16 bytes). |
| [in] | p_uuid_le | Pointer pointing to little endian raw UUID bytes. |
| [out] | p_uuid | Pointer to a ble_uuid_t structure to be filled in. |
| NRF_SUCCESS | Successfully decoded into the ble_uuid_t structure. |
| NRF_ERROR_INVALID_ADDR | Invalid pointer supplied. |
| NRF_ERROR_INVALID_LENGTH | Invalid UUID length. |
| NRF_ERROR_NOT_FOUND | For a 128-bit UUID, no match in the populated table of UUIDs. |