ptp_attach()
Attach device to use ptp_*() functions and allocate the context structure
Synopsis:
#include <qnx/ptp/ptp_mod.h>
int ptp_attach(device_t dev,
struct ptp_ctx **ctx,
const char *name,
uint64_t max)
Arguments:
- dev
- A driver's
device_t
structure, obtained via device_attach(). - ctx
- Pointer to return a pointer to the PTP context.
- name
- A string that describes the device.
- max
- The maximum number of seconds the clock can hold before wrapping.
Library:
ptpDescription:
Stores a pointer to dev and allocates the PTP context. It also sets up the taskqueue, mutexes, and calls PTP_WRITE_TIME().
Returns:
EOK on success; otherwise, one of the following:
- ENOMEM - Unable to allocate memory for the specified ctx.
Page updated: