Add few Doxygen comments.
This commit is contained in:
parent
56a2f4283a
commit
9205db8599
3 changed files with 27 additions and 1 deletions
|
@ -453,7 +453,7 @@ bool nfc_initiator_select_dep_target(const dev_info* pdi, const init_modulation
|
|||
|
||||
bool nfc_initiator_select_tag(const dev_info* pdi, const init_modulation im, const byte_t* pbtInitData, const uint32_t uiInitDataLen, tag_info* pti)
|
||||
{
|
||||
// Make sure we are dealing with a active device
|
||||
// Make sure we are dealing with a active device
|
||||
if (!pdi->bActive) return false;
|
||||
|
||||
pncmd_reader_list_passive[2] = 1; // MaxTg, we only want to select 1 tag at the time
|
||||
|
|
|
@ -89,6 +89,8 @@ LIBNFC_EXPORT bool nfc_initiator_init(const dev_info* pdi);
|
|||
* @return Returns true if action was successfully performed; otherwise returns false.
|
||||
* @param pdi dev_info struct pointer that represent currently used device
|
||||
* @param im Desired modulation
|
||||
* @param pbtInitData Optional initiator data used for Felica, ISO14443B, Topaz Polling or for ISO14443A selecting a specific UID.
|
||||
* @param uiInitDataLen Length of initiator data \a pbtInitData.
|
||||
*
|
||||
* The NFC device will try to find the available passive tags. Some NFC devices are capable to emulate passive tags. The standards (ISO18092 and ECMA-340) describe the modulation that can be used for reader to passive communications. The chip needs to know with what kind of tag it is dealing with, therefore the initial modulation and speed (106, 212 or 424 kbps) should be supplied.
|
||||
* @note For every initial modulation type there is a different collection of information returned (in tag_info pointer pti) They all fit in the data-type which is called tag_info. This is a union which contains the tag information that belongs to the according initial modulation type.
|
||||
|
|
24
src/types.h
24
src/types.h
|
@ -146,6 +146,10 @@ typedef enum {
|
|||
IM_PASSIVE_DEP = 0x06,
|
||||
}init_modulation;
|
||||
|
||||
/**
|
||||
* @struct tag_info_dep
|
||||
* @brief NFC tag information in Data Exchange Protocol
|
||||
*/
|
||||
typedef struct {
|
||||
byte_t NFCID3i[10];
|
||||
byte_t btDID;
|
||||
|
@ -153,6 +157,10 @@ typedef struct {
|
|||
byte_t btBRt;
|
||||
}tag_info_dep;
|
||||
|
||||
/**
|
||||
* @struct tag_info_iso14443a
|
||||
* @brief NFC ISO14443A tag (MIFARE) information
|
||||
*/
|
||||
typedef struct {
|
||||
byte_t abtAtqa[2];
|
||||
byte_t btSak;
|
||||
|
@ -162,6 +170,10 @@ typedef struct {
|
|||
byte_t abtAts[36];
|
||||
}tag_info_iso14443a;
|
||||
|
||||
/**
|
||||
* @struct tag_info_felica
|
||||
* @brief NFC FeLiCa tag information
|
||||
*/
|
||||
typedef struct {
|
||||
uint32_t uiLen;
|
||||
byte_t btResCode;
|
||||
|
@ -170,6 +182,10 @@ typedef struct {
|
|||
byte_t abtSysCode[2];
|
||||
}tag_info_felica;
|
||||
|
||||
/**
|
||||
* @struct tag_info_iso14443b
|
||||
* @brief NFC ISO14443B tag information
|
||||
*/
|
||||
typedef struct {
|
||||
byte_t abtAtqb[12];
|
||||
byte_t abtId[4];
|
||||
|
@ -182,11 +198,19 @@ typedef struct {
|
|||
byte_t abtInf[64];
|
||||
}tag_info_iso14443b;
|
||||
|
||||
/**
|
||||
* @struct tag_info_jewel
|
||||
* @brief NFC Jewel tag information
|
||||
*/
|
||||
typedef struct {
|
||||
byte_t btSensRes[2];
|
||||
byte_t btId[4];
|
||||
}tag_info_jewel;
|
||||
|
||||
/**
|
||||
* @union tag_info
|
||||
* @brief Union between all kind of tags information structures.
|
||||
*/
|
||||
typedef union {
|
||||
tag_info_iso14443a tia;
|
||||
tag_info_felica tif;
|
||||
|
|
Loading…
Reference in a new issue