80 szParamLen =
sizeof(
struct mifare_param_auth);
85 szParamLen =
sizeof(
struct mifare_param_data);
92 szParamLen =
sizeof(
struct mifare_param_value);
102 memcpy(abtCmd + 2, (uint8_t *) pmp, szParamLen);
107 nfc_perror(pnd,
"nfc_device_set_property_bool");
119 nfc_perror(pnd,
"nfc_initiator_transceive_bytes");
135 if (res == 16 || res == (16 + 2)) {
136 memcpy(pmp->mpd.abtData, abtRx, 16);
void nfc_perror(const nfc_device *pnd, const char *pcString)
Display the last error occured on a nfc_device.
int nfc_initiator_transceive_bytes(nfc_device *pnd, const uint8_t *pbtTx, const size_t szTx, uint8_t *pbtRx, const size_t szRx, int timeout)
Send data to target then retrieve data from target.
int nfc_device_set_property_bool(nfc_device *pnd, const nfc_property property, const bool bEnable)
Set a device's boolean-property value.
bool nfc_initiator_mifare_cmd(nfc_device *pnd, const mifare_cmd mc, const uint8_t ui8Block, mifare_param *pmp)
Execute a MIFARE Classic Command.
provide samples structs and functions to manipulate MIFARE Classic and Ultralight tags using libnfc