-15-
v7.0
Libelium’s library
8.1. Library constructor
It is the class constructor. It is only executed inside the API’s function
init().
•
Public functions:
The following functions are public and therefore they can be executed in the
loop()
or
setup()
functions. They provide
the tools to perform all the features of the RFID/NFC module.
Function
Brief description
OFF()
switches the module off
ON(socket)
switches the module on, in one of the 2 sockets
init(*UID, *ATQ)
inits the module, configures it and searches for new cards
authenticate(*UID, ad, *key)
authenticates one card’s sector
bool getFirmware(void)
The PN532 sends back the version of the embedded firmware.
read(ad ,*data)
reads one card’s block
readWithAuth(*UID, *key, *data, ad)
authenticates one card's sector and reads one block
write(ad, *data)
writes one card’s block
writeWithAuth(*UID, *key, *data, ad)
authenticates one card's sector and writes one block
writeAndCheck(*data, ad)
writes one card's block and checks that
writeAndCheckWithAuth(*UID, *key,
*data, ad)
authenticates one card's sector, writes one block and checks that
uint8_t powerDown(void)
put the module into Power Down mode
wakeUp(void)
wake up from power dowm mode.
print( *data, length)
print data stored in vectors
setKeys(*UID, *keyOld, *keyA, *keyB,
*cfg, *data, ad)
changes both keys and access conditions to one card's sector
equalUIDs(*UID1, *UID2)
compares 2 UIDs
searchUID(*vCards, *UID, nCards)
searches one UID inside one group of UIDs
string2vector(*inp, *outp)
converts from a string to a uint8_t vector
vector2int(*inp)
converts from a uint8_t vector to a integer