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

Generate data checksum cleanly #24

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

ctag
Copy link

@ctag ctag commented Jun 6, 2016

Hi,

This pull request:

  • affects the data checksum generation for sending commands to the PN532.
  • has no limitations known to me.
  • should work with the provided examples.

In the PN532 User Manual (http://www.nxp.com/documents/user_manual/141520.pdf), section 6.2.1, the data checksum (DCS) is defined as:

TFI + PD0 + PD1 + ... + PDn + DCS = 0x00.

The removed lines conveniently had no net effect on the checksum outcome due to the values represented by preamble and startcode (0x00 and 0xFF). Removing it simply improves readability to those following along with the code.

Thanks,
Christopher Bero

In the PN532 User Manual (http://www.nxp.com/documents/user_manual/141520.pdf), section 6.2.1, the data checksum (DCS) is defined as:

TFI + PD0 + PD1 + ... + PDn + DCS = 0x00.

The removed line conveniently had no net affect on the checksum outcome due to the values represented by the preamble and startcode (0x00 and 0xFF). Removing it simply improves readability.
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.

1 participant