mirror of
https://github.com/nfc-tools/libnfc.git
synced 2026-02-27 04:06:38 +00:00
Add function to return library version at execute time. Fix Issue 39. Thanks to Zuck for his contribution.
Remove compilation warning due to missing includes in examples.
This commit is contained in:
@@ -31,7 +31,9 @@
|
||||
#include <ctype.h>
|
||||
|
||||
#include "libnfc.h"
|
||||
|
||||
#include "mifaretag.h"
|
||||
#include "bitutils.h"
|
||||
|
||||
static dev_info* pdi;
|
||||
static tag_info ti;
|
||||
|
||||
@@ -32,6 +32,8 @@
|
||||
#include "bitutils.h"
|
||||
#include "messages.h"
|
||||
|
||||
#include "../config.h"
|
||||
|
||||
// Registers and symbols masks used to covers parts within a register
|
||||
#define REG_CIU_TX_MODE 0x6302
|
||||
#define SYMBOL_TX_CRC_ENABLE 0x80
|
||||
@@ -996,3 +998,9 @@ bool nfc_target_send_dep_bytes(const dev_info* pdi, const byte_t* pbtTx, const s
|
||||
return true;
|
||||
}
|
||||
|
||||
const char* nfc_version(void)
|
||||
{
|
||||
return PACKAGE_VERSION;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -235,6 +235,13 @@ bool nfc_target_send_bytes(const dev_info* pdi, const byte_t* pbtTx, const size_
|
||||
*/
|
||||
bool nfc_target_send_dep_bytes(const dev_info* pdi, const byte_t* pbtTx, const size_t szTxLen);
|
||||
|
||||
/**
|
||||
* @fn const char* nfc_version(void)
|
||||
* @brief Returns the library version
|
||||
* @return Returns a string with the library version
|
||||
*/
|
||||
const char* nfc_version(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif // __cplusplus
|
||||
|
||||
Reference in New Issue
Block a user