PN532 NFC shield of Adafruit based on PN532 of Seeed.

Fork of PN532 by Seeed

Embed: (wiki syntax)

« Back to documentation index

PN532Interface Class Reference

PN532Interface Class Reference

The PN532Interface class. More...

#include <PN532Interface.h>

Inherited by PN532_SPI.

Public Member Functions

virtual int8_t writeCommand (const uint8_t *header, uint8_t hlen, const uint8_t *body=0, uint8_t blen=0)=0
 write a command and check ack
virtual int16_t readResponse (uint8_t buf[], uint8_t len, uint16_t timeout=1000)=0
 read the response of a command, strip prefix and suffix

Detailed Description

The PN532Interface class.

Definition at line 30 of file PN532Interface.h.


Member Function Documentation

virtual int16_t readResponse ( uint8_t  buf[],
uint8_t  len,
uint16_t  timeout = 1000 
) [pure virtual]

read the response of a command, strip prefix and suffix

Parameters:
bufto contain the response data
lenlenght to read
timeoutmax time to wait, 0 means no timeout
Returns:
>=0 length of response without prefix and suffix <0 failed to read response
virtual int8_t writeCommand ( const uint8_t *  header,
uint8_t  hlen,
const uint8_t *  body = 0,
uint8_t  blen = 0 
) [pure virtual]

write a command and check ack

Parameters:
headerpacket header
hlenlength of header
bodypacket body
blenlength of body
Returns:
0 success not 0 failed