isReady method
The implementation is protocol based. Just check if the PN532 is ready
based on the used protocol (if an irqPin
) was specified
the PN532BaseProtocol
will use the irqPin
instead of this funciton!
The parameter attemptCount
will provide you with a count that refelcts
how often this function was already called in this waitReady
cyclus.
Starting with 0!
Implementation
@override
bool isReady(int attemptCount) {
if (attemptCount == 0) {
pn532StatusList = [pn532SpiStartRead, 0x00];
}
pn532StatusList = readWriteHelper(pn532StatusList);
return pn532StatusList[1] == pn532SpiReady;
}