nfc-types.h   nfc-types.h 
skipping to change at line 161 skipping to change at line 161
NM_ISO14443B_106 = 0x03, NM_ISO14443B_106 = 0x03,
/** Jewel Topaz (Innovision Research & Development) */ /** Jewel Topaz (Innovision Research & Development) */
NM_JEWEL_106 = 0x04, NM_JEWEL_106 = 0x04,
/** Active DEP */ /** Active DEP */
NM_ACTIVE_DEP = 0x05, NM_ACTIVE_DEP = 0x05,
/** Passive DEP */ /** Passive DEP */
NM_PASSIVE_DEP = 0x06 NM_PASSIVE_DEP = 0x06
} nfc_modulation_t; } nfc_modulation_t;
/** /**
* @struct nfc_target_info_t_dep * @struct nfc_dep_info_t
* @brief NFC tag information in Data Exchange Protocol * @brief NFC tag information in Data Exchange Protocol
*/ */
typedef struct { typedef struct {
byte_t NFCID3i[10]; byte_t NFCID3i[10];
byte_t btDID; byte_t btDID;
byte_t btBSt; byte_t btBSt;
byte_t btBRt; byte_t btBRt;
} nfc_dep_info_t; } nfc_dep_info_t;
/** /**
* @struct nfc_target_info_t_iso14443a * @struct nfc_iso14443a_info_t
* @brief NFC ISO14443A tag (MIFARE) information * @brief NFC ISO14443A tag (MIFARE) information
*/ */
typedef struct { typedef struct {
byte_t abtAtqa[2]; byte_t abtAtqa[2];
byte_t btSak; byte_t btSak;
size_t szUidLen; size_t szUidLen;
byte_t abtUid[10]; byte_t abtUid[10];
size_t szAtsLen; size_t szAtsLen;
byte_t abtAts[36]; byte_t abtAts[36];
} nfc_iso14443a_info_t; } nfc_iso14443a_info_t;
/** /**
* @struct nfc_target_info_t_felica * @struct nfc_felica_info_t
* @brief NFC FeLiCa tag information * @brief NFC FeLiCa tag information
*/ */
typedef struct { typedef struct {
size_t szLen; size_t szLen;
byte_t btResCode; byte_t btResCode;
byte_t abtId[8]; byte_t abtId[8];
byte_t abtPad[8]; byte_t abtPad[8];
byte_t abtSysCode[2]; byte_t abtSysCode[2];
} nfc_felica_info_t; } nfc_felica_info_t;
/** /**
* @struct nfc_target_info_t_iso14443b * @struct nfc_iso14443b_info_t
* @brief NFC ISO14443B tag information * @brief NFC ISO14443B tag information
*/ */
typedef struct { typedef struct {
byte_t abtAtqb[12]; byte_t abtAtqb[12];
byte_t abtId[4]; byte_t abtId[4];
byte_t btParam1; byte_t btParam1;
byte_t btParam2; byte_t btParam2;
byte_t btParam3; byte_t btParam3;
byte_t btParam4; byte_t btParam4;
byte_t btCid; byte_t btCid;
size_t szInfLen; size_t szInfLen;
byte_t abtInf[64]; byte_t abtInf[64];
} nfc_iso14443b_info_t; } nfc_iso14443b_info_t;
/** /**
* @struct nfc_target_info_t_jewel * @struct nfc_jewel_info_t
* @brief NFC Jewel tag information * @brief NFC Jewel tag information
*/ */
typedef struct { typedef struct {
byte_t btSensRes[2]; byte_t btSensRes[2];
byte_t btId[4]; byte_t btId[4];
} nfc_jewel_info_t; } nfc_jewel_info_t;
/** /**
* @union nfc_target_info_t * @union nfc_target_info_t
* @brief Union between all kind of tags information structures. * @brief Union between all kind of tags information structures.
 End of changes. 5 change blocks. 
5 lines changed or deleted 5 lines changed or added


 nfc.h   nfc.h 
skipping to change at line 33 skipping to change at line 33
* *
* Provide all usefull functions (API) to handle NFC devices. * Provide all usefull functions (API) to handle NFC devices.
*/ */
#ifndef _LIBNFC_H_ #ifndef _LIBNFC_H_
#define _LIBNFC_H_ #define _LIBNFC_H_
#include <stdint.h> #include <stdint.h>
#include <stdbool.h> #include <stdbool.h>
#ifdef _WIN32
/* Windows platform */
#ifndef _WINDLL
/* CMake compilation */
#ifdef nfc_EXPORTS
#define NFC_EXPORT __declspec(dllexport)
#else /* nfc_EXPORTS */
#define NFC_EXPORT __declspec(dllimport)
#endif /* nfc_EXPORTS */
#else /* _WINDLL */
/* Manual makefile */
#define NFC_EXPORT
#endif /* _WINDLL */
#else /* _WIN32 */
#define NFC_EXPORT
#endif /* _WIN32 */
#include <nfc/nfc-types.h> #include <nfc/nfc-types.h>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif // __cplusplus #endif // __cplusplus
/* NFC Device/Hardware manipulation */ /* NFC Device/Hardware manipulation */
void nfc_list_devices(nfc_device_desc_t pnddDevices[], size_t szDevices, si NFC_EXPORT void nfc_list_devices(nfc_device_desc_t pnddDevices[], size_t sz
ze_t *pszDeviceFound); Devices, size_t *pszDeviceFound);
nfc_device_t* nfc_connect(nfc_device_desc_t* pndd); NFC_EXPORT nfc_device_t* nfc_connect(nfc_device_desc_t* pndd);
void nfc_disconnect(nfc_device_t* pnd); NFC_EXPORT void nfc_disconnect(nfc_device_t* pnd);
bool nfc_configure(nfc_device_t* pnd, const nfc_device_option_t ndo, const NFC_EXPORT bool nfc_configure(nfc_device_t* pnd, const nfc_device_option_t
bool bEnable); ndo, const bool bEnable);
/* NFC initiator: act as "reader" */ /* NFC initiator: act as "reader" */
bool nfc_initiator_init(const nfc_device_t* pnd); NFC_EXPORT bool nfc_initiator_init(const nfc_device_t* pnd);
bool nfc_initiator_select_tag(const nfc_device_t* pnd, const nfc_modulation NFC_EXPORT bool nfc_initiator_select_tag(const nfc_device_t* pnd, const nfc
_t nmInitModulation, const byte_t* pbtInitData, const size_t szInitDataLen, _modulation_t nmInitModulation, const byte_t* pbtInitData, const size_t szI
nfc_target_info_t* pti); nitDataLen, nfc_target_info_t* pti);
bool nfc_initiator_select_dep_target(const nfc_device_t* pnd, const nfc_mod NFC_EXPORT bool nfc_initiator_select_dep_target(const nfc_device_t* pnd, co
ulation_t nmInitModulation, const byte_t* pbtPidData, const size_t szPidDat nst nfc_modulation_t nmInitModulation, const byte_t* pbtPidData, const size
aLen, const byte_t* pbtNFCID3i, const size_t szNFCID3iDataLen, const byte_t _t szPidDataLen, const byte_t* pbtNFCID3i, const size_t szNFCID3iDataLen, c
*pbtGbData, const size_t szGbDataLen, nfc_target_info_t* pti); onst byte_t *pbtGbData, const size_t szGbDataLen, nfc_target_info_t* pti);
bool nfc_initiator_deselect_tag(const nfc_device_t* pnd); NFC_EXPORT bool nfc_initiator_deselect_tag(const nfc_device_t* pnd);
bool nfc_initiator_transceive_bits(const nfc_device_t* pnd, const byte_t* p NFC_EXPORT bool nfc_initiator_transceive_bits(const nfc_device_t* pnd, cons
btTx, const size_t szTxBits, const byte_t* pbtTxPar, byte_t* pbtRx, size_t* t byte_t* pbtTx, const size_t szTxBits, const byte_t* pbtTxPar, byte_t* pbt
pszRxBits, byte_t* pbtRxPar); Rx, size_t* pszRxBits, byte_t* pbtRxPar);
bool nfc_initiator_transceive_bytes(const nfc_device_t* pnd, const byte_t* NFC_EXPORT bool nfc_initiator_transceive_bytes(const nfc_device_t* pnd, con
pbtTx, const size_t szTxLen, byte_t* pbtRx, size_t* pszRxLen); st byte_t* pbtTx, const size_t szTxLen, byte_t* pbtRx, size_t* pszRxLen);
bool nfc_initiator_transceive_dep_bytes(const nfc_device_t* pnd, const byte NFC_EXPORT bool nfc_initiator_transceive_dep_bytes(const nfc_device_t* pnd,
_t* pbtTx, const size_t szTxLen, byte_t* pbtRx, size_t* pszRxLen); const byte_t* pbtTx, const size_t szTxLen, byte_t* pbtRx, size_t* pszRxLen
bool nfc_initiator_mifare_cmd(const nfc_device_t* pnd, const mifare_cmd mc, );
const uint8_t ui8Block, mifare_param* pmp); NFC_EXPORT bool nfc_initiator_mifare_cmd(const nfc_device_t* pnd, const mif
are_cmd mc, const uint8_t ui8Block, mifare_param* pmp);
/* NFC target: act as tag (i.e. MIFARE Classic) or NFC target device. */ /* NFC target: act as tag (i.e. MIFARE Classic) or NFC target device. */
bool nfc_target_init(const nfc_device_t* pnd, byte_t* pbtRx, size_t* pszRxB NFC_EXPORT bool nfc_target_init(const nfc_device_t* pnd, byte_t* pbtRx, siz
its); e_t* pszRxBits);
bool nfc_target_receive_bits(const nfc_device_t* pnd, byte_t* pbtRx, size_t NFC_EXPORT bool nfc_target_receive_bits(const nfc_device_t* pnd, byte_t* pb
* pszRxBits, byte_t* pbtRxPar); tRx, size_t* pszRxBits, byte_t* pbtRxPar);
bool nfc_target_receive_bytes(const nfc_device_t* pnd, byte_t* pbtRx, size_ NFC_EXPORT bool nfc_target_receive_bytes(const nfc_device_t* pnd, byte_t* p
t* pszRxLen); btRx, size_t* pszRxLen);
bool nfc_target_receive_dep_bytes(const nfc_device_t* pnd, byte_t* pbtRx, s NFC_EXPORT bool nfc_target_receive_dep_bytes(const nfc_device_t* pnd, byte_
ize_t* pszRxLen); t* pbtRx, size_t* pszRxLen);
bool nfc_target_send_bits(const nfc_device_t* pnd, const byte_t* pbtTx, con NFC_EXPORT bool nfc_target_send_bits(const nfc_device_t* pnd, const byte_t*
st size_t szTxBits, const byte_t* pbtTxPar); pbtTx, const size_t szTxBits, const byte_t* pbtTxPar);
bool nfc_target_send_bytes(const nfc_device_t* pnd, const byte_t* pbtTx, co NFC_EXPORT bool nfc_target_send_bytes(const nfc_device_t* pnd, const byte_t
nst size_t szTxLen); * pbtTx, const size_t szTxLen);
bool nfc_target_send_dep_bytes(const nfc_device_t* pnd, const byte_t* pbtTx NFC_EXPORT bool nfc_target_send_dep_bytes(const nfc_device_t* pnd, const by
, const size_t szTxLen); te_t* pbtTx, const size_t szTxLen);
/* Special data accessors */ /* Special data accessors */
const char* nfc_device_name(nfc_device_t* pnd); NFC_EXPORT const char* nfc_device_name(nfc_device_t* pnd);
/* Misc. functions */ /* Misc. functions */
const char* nfc_version(void); NFC_EXPORT void iso14443a_crc(byte_t* pbtData, size_t szLen, byte_t* pbtCrc
);
NFC_EXPORT const char* nfc_version(void);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif // __cplusplus #endif // __cplusplus
#endif // _LIBNFC_H_ #endif // _LIBNFC_H_
 End of changes. 6 change blocks. 
40 lines changed or deleted 60 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/