Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support for extended frames, fixes #38 #39

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

BrightSoul
Copy link

@BrightSoul BrightSoul commented Nov 4, 2017

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

@alranel
Copy link

alranel commented Nov 4, 2017

Great job @BrightSoul! I hope this gets merged soon.

solhuebner added a commit to solhuebner/Adafruit-PN532 that referenced this pull request Aug 21, 2020
solhuebner added a commit to solhuebner/Adafruit-PN532 that referenced this pull request Aug 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants