setSamConfiguration method

void setSamConfiguration({
  1. int mode = 1,
  2. int timeout = 20,
  3. int irqPin = 1,
})

Send SAM configuration command with configuration for: mode is default = 1, normal mode timeout is default = 20, timeout 50ms * 20 = 1 second (PN532 timeout calculation) irqPin is default = 1, use IRQ pin if possible (not listened to in this driver)

Implementation

void setSamConfiguration({int mode = 1, int timeout = 20, int irqPin = 1}) {
  // Note that no other verification is necessary as call_function will
  // check the command was executed as expected.
  List<int> parameters = [
    Uint8(mode).value,
    Uint8(timeout).value,
    Uint8(irqPin).value
  ];
  callPN532Function(pn532CommandSamConfiguration, parameters: parameters);
}