add initialization and deinitialization.

This commit is contained in:
Audrey Diacre 2012-01-18 09:53:45 +00:00
parent 38bdfe3281
commit d1b0e93e8e
2 changed files with 24 additions and 0 deletions

View file

@ -62,6 +62,10 @@
extern "C" { extern "C" {
# endif // __cplusplus # endif // __cplusplus
/* Library initialization/deinitialization */
NFC_EXPORT void nfc_init();
NFC_EXPORT void nfc_exit();
/* NFC Device/Hardware manipulation */ /* NFC Device/Hardware manipulation */
NFC_EXPORT bool nfc_get_default_device (nfc_connstring *connstring); NFC_EXPORT bool nfc_get_default_device (nfc_connstring *connstring);
NFC_EXPORT nfc_device *nfc_open (const nfc_connstring connstring); NFC_EXPORT nfc_device *nfc_open (const nfc_connstring connstring);

View file

@ -61,6 +61,26 @@ const struct nfc_driver *nfc_drivers[] = {
NULL NULL
}; };
/**
* @brief Initialize libnfc.
*
*/
void
nfc_init()
{
log_init ();
}
/**
* @brief Deinitialize libnfc.
*
*/
void
nfc_exit()
{
log_fini ();
}
/** /**
* @brief Get the defaut NFC device * @brief Get the defaut NFC device
* @param connstring \a nfc_connstring pointer where the default connection string will be stored * @param connstring \a nfc_connstring pointer where the default connection string will be stored