PN532 NFC library for Seeed Studio's NFC Shield

Fork of PN532 by Yihui Xiong

Embed: (wiki syntax)

« Back to documentation index

LLCP Class Reference

LLCP Class Reference

The LLCP class. More...

#include <llcp.h>

Public Member Functions

int8_t activate (uint16_t timeout=0)
 Actiave PN532 as a target.
bool write (const uint8_t *header, uint8_t hlen, const uint8_t *body=0, uint8_t blen=0)
 write a packet, the packet should be less than (255 - 2) bytes
int16_t read (uint8_t *buf, uint8_t len)
 read a packet, the packet will be less than (255 - 2) bytes

Detailed Description

The LLCP class.

Definition at line 14 of file llcp.h.


Member Function Documentation

int8_t activate ( uint16_t  timeout = 0 )

Actiave PN532 as a target.

Parameters:
timeoutmax time to wait, 0 means no timeout
Returns:
> 0 success = 0 timeout < 0 failed

Definition at line 32 of file llcp.cpp.

int16_t read ( uint8_t *  buf,
uint8_t  len 
)

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

Parameters:
bufthe buffer to contain the packet
lenlenght of the buffer
Returns:
>=0 length of the packet <0 failed

Definition at line 264 of file llcp.cpp.

bool write ( const uint8_t *  header,
uint8_t  hlen,
const uint8_t *  body = 0,
uint8_t  blen = 0 
)

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

Parameters:
headerpacket header
hlenlength of header
bodypacket body
blenlength of body
Returns:
true success false failed

Definition at line 210 of file llcp.cpp.