pd_alloc_peripheral()

Allocates memory for a peripheral.

Synopsis:

#include <peripheral_discovery.h>
 
pd_peripheral_t* pd_alloc_peripheral(void)

Since:

BlackBerry 10.2.0

Arguments:

Library:

libperipheral_discovery (For the qcc command, use the -l peripheral_discovery option to link against this library)

Description:

This function must be called before calling pd_get_event(). You can pass the returned pointer to pd_get_event() multiple times without allocating another pd_peripheral_t. This memory must be freed by pd_free_peripheral() when finished.

Returns:

A pointer to a peripheral. Will be NULL on error.