uFCoder 2.62
|
Functions for getting common card data, not specific to card type. More...
Functions | |
UFR_STATUS DL_API | COMTransceive (IN uint8_t *cmd, uint32_t cmd_length, IN uint8_t *cmd_ext, uint32_t cmd_ext_length, OUT uint8_t *rsp, VAR uint32_t *rsp_length, OUT uint8_t *rsp_ext, VAR uint32_t *rsp_ext_length) |
As of uFCoder library v5.0.71 users can use COM protocol via uFCoder library by calling this method. It handles transmission of CMD and CMD_EXT commands and it handles RSP and RSP_EXT packets that are a response to the COM protocol commands. | |
UFR_STATUS DL_API | GetCardId (VAR uint8_t *lpucCardType, OUT uint32_t *lpulCardSerial) |
Returns card UID as a 4-byte array. This function is deprecated and used only for backward compatibility with older firmware versions (before v2.0). | |
UFR_STATUS DL_API | GetCardIdEx (VAR uint8_t *lpucSak, OUT uint8_t *aucUid, VAR uint8_t *lpucUidSize) |
This function returns UID of card actually present in RF field of reader. It can handle all three known types : 4, 7 and 10 byte long UIDs. | |
UFR_STATUS DL_API | GetCardSize (VAR uint32_t *lpulLinearSize, VAR uint32_t *lpulRawSize) |
Function returns size of user data space on the card (LinearSize), and size of total data space on the card (RawSize). | |
UFR_STATUS DL_API | GetDlogicCardType (VAR uint8_t *lpucCardType) |
This function returns card type according to DlogicCardType enumeration. | |
UFR_STATUS DL_API | GetLastCardIdEx (VAR uint8_t *lpucSak, OUT uint8_t *aucUid, VAR uint8_t *lpucUidSize) |
This function returns UID of last card which was present in RF field of reader. | |
Functions for getting common card data, not specific to card type.
UFR_STATUS DL_API COMTransceive | ( | IN uint8_t * | cmd, |
uint32_t | cmd_length, | ||
IN uint8_t * | cmd_ext, | ||
uint32_t | cmd_ext_length, | ||
OUT uint8_t * | rsp, | ||
VAR uint32_t * | rsp_length, | ||
OUT uint8_t * | rsp_ext, | ||
VAR uint32_t * | rsp_ext_length ) |
As of uFCoder library v5.0.71 users can use COM protocol via uFCoder library by calling this method. It handles transmission of CMD and CMD_EXT commands and it handles RSP and RSP_EXT packets that are a response to the COM protocol commands.
cmd | Pointer to array of CMD bytes for transmission. Last byte is the checksum. |
cmd_length | Length of the CMD array, always set it to 7. |
cmd_ext | Pointer to array of CMD_EXT bytes for transmission. Last byte is the checksum. |
cmd_ext_length | If the length is greater than 0, CMD_EXT bytes will be transmitted. Otherwise they will not. This is the size of CMD_EXT array that will be sent to the reader. |
rsp | Pointer to array of bytes containing RSP bytes. |
rsp_length | Pointer to a variable holding how many RSP bytes have been received. |
rsp_ext | Pointer to array of bytes containing RSP bytes. If greater than zero, RSP_EXT exists. |
rsp_ext_length | Pointer to a variable holding how many RSP_EXT byte have been received. |
UFR_STATUS DL_API GetCardId | ( | VAR uint8_t * | lpucCardType, |
OUT uint32_t * | lpulCardSerial ) |
Returns card UID as a 4-byte array. This function is deprecated and used only for backward compatibility with older firmware versions (before v2.0).
We strongly discourage use of this function. This function can’t successfully handle 7 byte UIDS.
lpucCardType | returns pointer to variable which holds card type according to SAK lpulCardSerial returns pointer to array of card UID bytes, 4 bytes long ONLY |
lpulCardSerial | returns pointer to array of card UID bytes, 4 bytes long ONLY |
UFR_STATUS DL_API GetCardIdEx | ( | VAR uint8_t * | lpucSak, |
OUT uint8_t * | aucUid, | ||
VAR uint8_t * | lpucUidSize ) |
This function returns UID of card actually present in RF field of reader. It can handle all three known types : 4, 7 and 10 byte long UIDs.
This function is recommended for use instead of GetCardId.
lpucSak | returns pointer to variable which holds card type according to SAK |
aucUid | returns pointer to array of card UID bytes, variable length |
lpucUidSize | returns pointer to variable holding information about UID length |
UFR_STATUS DL_API GetCardSize | ( | VAR uint32_t * | lpulLinearSize, |
VAR uint32_t * | lpulRawSize ) |
Function returns size of user data space on the card (LinearSize), and size of total data space on the card (RawSize).
The user data space is accessed via functions LinearWrite and LinearRead. Total data space is accessed via functions LinRowWrite and LinRowRead. For example Mifare Classic 1K card have 752 bytes of user data space (sector trailers and block 0 are not included), and 1024 bytes of total data space.
lpulLinearSize | pointer to variable which contain size of user data space lpulRawSize pointer to variable which contain size of total data space |
lpulRawSize | pointer to variable which contain size of total data space |
UFR_STATUS DL_API GetDlogicCardType | ( | VAR uint8_t * | lpucCardType | ) |
This function returns card type according to DlogicCardType enumeration.
For details, please refer to Appendix: DLogic CardType enumeration. If the card type is not supported, function return the lpucCardType value equal to zero : TAG_UNKNOWN = 0x00
lpucCardType | pointer to lpucCardType variable. Variable lpucCardType holds returned value of actual card type present in RF field. |
UFR_STATUS DL_API GetLastCardIdEx | ( | VAR uint8_t * | lpucSak, |
OUT uint8_t * | aucUid, | ||
VAR uint8_t * | lpucUidSize ) |
This function returns UID of last card which was present in RF field of reader.
It can handle all three known types : 4, 7 and 10 byte long UIDs. Difference with GetCardIdEx is that card does not be in RF field mandatory, UID value is stored in temporary memory area.
lpucSak | returns pointer to variable which holds card type according to SAK |
aucUid | returns pointer to array of card UID bytes, variable length |
lpucUidSize | returns pointer to variable holding information about UID length |