Added support for extended frames, fixes #38 #39
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds support for extended frames, as described on page 10 of the PN532C106 Application Note.
https://cdn-shop.adafruit.com/datasheets/PN532C106_Application+Note_v1.2.pdf#page=10
I changed the length variable mentioned in issue #38 to be a uint16_t, along with the n and responseLength parameters of readdata and inDataExchange methods to allow a bigger response to be read.
In order to actually be able to read large responses, the PN532_BUFFSIZ define must be changed to a bigger value by the user (I tested with a value of 280). It would be nice if this value could be set from the outside, with a public method but this is out of the scope of this pull request.
Also, implemented the length and length checksum calculations.
https://github.com/BrightSoul/Adafruit-PN532/blob/08eb36b832f1e69b132e9af6eadefd92c8ff5e04/Adafruit_PN532.cpp#L686
Tests were performed using my application library:
https://github.com/BrightSoul/cie-PN532