![]() |
S115 SoftDevice for nRF54LS05 API documentation 10.0.0
|
| uint32_t sd_ble_uuid_vs_add | ( | ble_uuid128_t const * | p_vs_uuid, |
| uint8_t * | p_uuid_type ) |
#include <ble.h>
Add a Vendor Specific base UUID.
This call enables the application to add a Vendor Specific base UUID to the BLE stack's table, for later use with all other modules and APIs. This then allows the application to use the shorter, 24-bit ble_uuid_t format when dealing with both 16-bit and 128-bit UUIDs without having to check for lengths and having split code paths. This is accomplished by extending the grouping mechanism that the Bluetooth SIG standard base UUID uses for all other 128-bit UUIDs. The type field in the ble_uuid_t structure is an index (relative to BLE_UUID_TYPE_VENDOR_BEGIN) to the table populated by multiple calls to this function, and the UUID field in the same structure contains the 2 bytes at indexes 12 and 13. The number of possible 128-bit UUIDs available to the application is therefore the number of Vendor Specific UUIDs added with the help of this function times 65536, although restricted to modifying bytes 12 and 13 for each of the entries in the supplied array.
| [in] | p_vs_uuid | Pointer to a 16-octet (128-bit) little endian Vendor Specific base UUID disregarding bytes 12 and 13. |
| [out] | p_uuid_type | Pointer to a uint8_t where the type field in ble_uuid_t corresponding to this UUID will be stored. |
| NRF_SUCCESS | Successfully added the Vendor Specific base UUID. |
| NRF_ERROR_INVALID_ADDR | If p_vs_uuid or p_uuid_type is NULL or invalid. |
| NRF_ERROR_NO_MEM | If there are no more free slots for VS UUIDs. |