libnfc  1.7.0-rc7
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. More...
 
void nfc_init (nfc_context **context)
 Initialize libnfc. This function must be called before calling any other libnfc function. More...
 
void nfc_exit (nfc_context *context)
 Deinitialize libnfc. Should be called after closing all open devices and before your application terminates. More...
 

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 200 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 183 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 161 of file nfc.c.