61 switch (req.rid.btCmd) {
63 nLenReq =
sizeof(jewel_req_rid);
64 nLenRes =
sizeof(jewel_res_rid);
67 nLenReq =
sizeof(jewel_req_rall);
68 nLenRes =
sizeof(jewel_res_rall);
71 nLenReq =
sizeof(jewel_req_read);
72 nLenRes =
sizeof(jewel_res_read);
75 nLenReq =
sizeof(jewel_req_writee);
76 nLenRes =
sizeof(jewel_res_writee);
79 nLenReq =
sizeof(jewel_req_writene);
80 nLenRes =
sizeof(jewel_res_writene);
83 nLenReq =
sizeof(jewel_req_rseg);
84 nLenRes =
sizeof(jewel_res_rseg);
87 nLenReq =
sizeof(jewel_req_read8);
88 nLenRes =
sizeof(jewel_res_read8);
91 nLenReq =
sizeof(jewel_req_writee8);
92 nLenRes =
sizeof(jewel_res_writee8);
95 nLenReq =
sizeof(jewel_req_writene8);
96 nLenRes =
sizeof(jewel_res_writene8);
103 nfc_perror(pnd,
"nfc_initiator_transceive_bytes");
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.
bool nfc_initiator_jewel_cmd(nfc_device *pnd, const jewel_req req, jewel_res *pres)
Execute a Jewel Topaz Command.
provide samples structs and functions to manipulate Jewel Topaz tags using libnfc