While here, rename the pn53x_transceive_callback() function to
pn53x_transceive_check_ack_frame_callback() to make it more obvious what it is
supposed to do.
- Define two sets of DE<FOOBAR> macros: the first one for 'generic' errors
which could be encountered regardless of the NFC device the library is acting
with (0xX000), and ont set for device-dependant errors (0x0X00).
- Make some more functions accept a nfc_device_t* as first argument to have
access to the iLastError;
- Reset errors when entering public API functions;
- Save errors when applicable;
- Distinguish system-level errors (e.g. I/O error) and operational errors (the
PCD returns an unexpected value);
- Minor tweaks.
Update issue 65
Status: Feedback
New review:
Owner: rconty@il4p.fr
Cc: rtartiere@il4p.fr
Summary: Review the error-handling code.
Branch: /branches/libnfc-error-handling
For this development, a strong emphasis has been set on making changes that
will not go through our way on the way to libnfc-1.6+. For this reason, some
constructs are not natural (e.g. error codes defined in two different places),
please keep this in mind when reviewing.
In r509, a direct call to pn53x_transceive() was changed into a call to nfc_initiator_transceive_dep_bytes() which is part of the public API. The command to send was updated accordingly, but the code that extracts the response have not.
Update issue 98
This should fix the problem: because the response was not the expected length, the actual card data was not copied to the buffer, so it was always the same 16 uninitialized bytes that where returned for any block.
PR: Issue 98
Submitted by: zamby.ing
Pointy hat to: me
Or maybe I would rather have removed the const and called strdup(3)?
New issue
Summary: Sync code and comments
Owner: rconty@il4p.fr
Status: New
Romuald, can you please review this changeset and fix the code if I corrected
the wrong way (i.e. the comment was Okay and the code bogus while I fixed the
comment thinking the cod was right).
Thanks!
New issue
Summary: Make sending ACK on message transmission skipable.
Owner: rtartiere@il4p.fr
Cc: rtartiere@il4p.fr
Status: New
I guess that for performance reasons, some advance users would prefer to skip
sending the non-mandatory ACK on data transmission. They may also perform a
quicker check of the ACK returned by the chip after sending the command and
before receiving the response (not sure about this one).
It will probably be a ./configure option disabled by default that allows some "shortcuts" to perform NFC hacking.