libnfc  1.7.1
Functions
Library initialization/deinitialization

Functions

int nfc_register_driver (const struct nfc_driver *ndr)
 Register an NFC device driver with libnfc. This function registers a driver with libnfc, the caller is responsible of managing the lifetime of the driver and make sure that any resources associated with the driver are available after registration.
void nfc_init (nfc_context **context)
 Initialize libnfc. This function must be called before calling any other libnfc function.
void nfc_exit (nfc_context *context)
 Deinitialize libnfc. Should be called after closing all open devices and before your application terminates.

Detailed Description

This page details how to initialize and deinitialize libnfc. Initialization must be performed before using any libnfc functionality, and similarly you must not call any libnfc functions after deinitialization.


Function Documentation

void nfc_exit ( nfc_context context)

Deinitialize libnfc. Should be called after closing all open devices and before your application terminates.

Parameters:
contextThe context to deinitialize

Definition at line 209 of file nfc.c.

void nfc_init ( nfc_context **  context)

Initialize libnfc. This function must be called before calling any other libnfc function.

Parameters:
contextOutput location for nfc_context

Definition at line 192 of file nfc.c.

int nfc_register_driver ( const struct nfc_driver ndr)

Register an NFC device driver with libnfc. This function registers a driver with libnfc, the caller is responsible of managing the lifetime of the driver and make sure that any resources associated with the driver are available after registration.

Parameters:
pndPointer to an NFC device driver to be registered.
Return values:
NFC_SUCCESSIf the driver registration succeeds.

Definition at line 170 of file nfc.c.