Utility functions for mesh users.
More...
Utility functions for mesh users.
◆ BLE_GAP_ADDR_TYPE_RANDOM_INVALID
#define BLE_GAP_ADDR_TYPE_RANDOM_INVALID 0x04 |
◆ nrf_mesh_rand_get()
uint32_t nrf_mesh_rand_get |
( |
uint8_t * |
p_output, |
|
|
uint8_t |
size |
|
) |
| |
Obtains a random number from the random number generator.
- Parameters
-
[out] | p_output | Pointer to a buffer where the output is written. |
[in] | size | Size of the output buffer. |
- Return values
-
NRF_SUCCESS | The specified buffer was filled with the requested amount of random data. |
NRF_ERROR_NULL | The parameter p_output is a NULL pointer. |
◆ nrf_mesh_address_type_get()
Get the address type of little endian 16-bit mesh addresses.
- Parameters
-
[in] | address | Little endian 16bit mesh address to get the type of. |
- Returns
- Address type of the given address.
◆ nrf_mesh_gap_address_type_get()
uint8_t nrf_mesh_gap_address_type_get |
( |
const uint8_t * |
p_address, |
|
|
uint8_t |
txadd_bit |
|
) |
| |
Get the GAP address type of a given device address.
- Parameters
-
[in] | p_address | Pointer to the 6 byte address array. |
[in] | txadd_bit | The value of the TxAdd bit in the advertisement packet pdu header. |
- Returns
- One of see BLE_GAP_ADDR_TYPES in ble_gap.h, if the given address has a valid type, otherwise BLE_GAP_ADDR_TYPE_RANDOM_INVALID.
◆ nrf_mesh_beacon_secmat_from_info()