drivers: pn532_i2c: Clarify preamble and start byte

The pn532 documentation differs slightly from the included ascii art
documentation on how a packet looks like. The preamble was omitted
however the postamble is mentioned. This patch adds the Preamble to the
ascii frame documentation.

The code later refers incorrectly to the start byte as the preamble.
This variable was renamed to more descriptively state that it is the
preambe and the start bytes.

Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
This commit is contained in:
Olliver Schinagl
2016-10-20 17:36:04 +02:00
parent 659f5f407f
commit b953002f8f
2 changed files with 34 additions and 25 deletions

View File

@@ -81,32 +81,38 @@
#define TgGetTargetStatus 0x8A
/** @note PN53x's normal frame:
* See the PN532 (firmware) user manual, section 6.2.1.1: Normal information
* frame, figure 13. Normal information frame, page 28 rev. 02 - 2007-11-07.
*
* .-- Start
* | .-- Packet length
* | | .-- Length checksum
* | | | .-- Direction (D4 Host to PN, D5 PN to Host)
* | | | | .-- Code
* | | | | | .-- Packet checksum
* | | | | | | .-- Postamble
* V | | | | | |
* ----- V V V V V V
* 00 FF 02 FE D4 02 2A 00
* .-- Preamble
* | .-- Start
* | | .-- Packet length
* | | | .-- Length checksum
* | | | | .-- Direction (D4 Host to PN, D5 PN to Host)
* | | | | | .-- Code
* | | | | | | .-- Packet checksum
* | | | | | | | .-- Postamble
* | V | | | | | |
* V ----- V V V V V V
* 00 00 FF 02 FE D4 02 2A 00
*/
/** @note PN53x's extended frame:
* See the PN532 (firmware) user manual, section 6.2.1.2: Extended information
* frame, figure 14. Normal information frame, page 29 rev. 02 - 2007-11-07.
*
* .-- Start
* | .-- Fixed to FF to enable extended frame
* | | .-- Packet length
* | | | .-- Length checksum
* | | | | .-- Direction (D4 Host to PN, D5 PN to Host)
* | | | | | .-- Code
* | | | | | | .-- Packet checksum
* | | | | | | | .-- Postamble
* V V V | | | | |
* ----- ----- ----- V V V V V
* 00 FF FF FF 00 02 FE D4 02 2A 00
* .-- Preamble
* | .-- Start
* | | .-- Fixed to FF to enable extended frame
* | | | .-- Packet length
* | | | | .-- Length checksum
* | | | | | .-- Direction (D4 Host to PN, D5 PN to Host)
* | | | | | | .-- Code
* | | | | | | | .-- Packet checksum
* | | | | | | | | .-- Postamble
* | V V V | | | | |
* V ----- ----- ----- V V V V V
* 00 00 FF FF FF 00 02 FE D4 02 2A 00
*/
/**