PN532 NFC shield of Adafruit based on PN532 of Seeed.

Fork of PN532 by Seeed

Embed: (wiki syntax)

« Back to documentation index

SNEP Class Reference

SNEP Class Reference

The SNEP class. More...

#include <snep.h>

Public Member Functions

int8_t write (const uint8_t *buf, uint8_t len, uint16_t timeout=0)
 write a SNEP packet, the packet should be less than (255 - 2 - 3) bytes
int16_t read (uint8_t *buf, uint8_t len, uint16_t timeout=0)
 read a SNEP packet, the packet will be less than (255 - 2 - 3) bytes

Detailed Description

The SNEP class.

Definition at line 19 of file snep.h.


Member Function Documentation

int16_t read ( uint8_t *  buf,
uint8_t  len,
uint16_t  timeout = 0 
)

read a SNEP packet, the packet will be less than (255 - 2 - 3) bytes

Parameters:
bufthe buffer to contain the packet
lenlenght of the buffer
timeoutmax time to wait, 0 means no timeout
Returns:
>=0 length of the packet <0 failed

Definition at line 51 of file snep.cpp.

int8_t write ( const uint8_t *  buf,
uint8_t  len,
uint16_t  timeout = 0 
)

write a SNEP packet, the packet should be less than (255 - 2 - 3) bytes

Parameters:
bufthe buffer to contain the packet
lenlenght of the buffer
timeoutmax time to wait, 0 means no timeout
Returns:
>0 success =0 timeout <0 failed

Definition at line 5 of file snep.cpp.