isReady method

  1. @override
bool isReady(
  1. int attemptCount
)
override

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) {
  int ready = i2c.readByte(pn532I2CAddress);
  return ready == pn532I2CReady;
}