NciNfcController
High-level NFC controller coordinating both NFC Reader/Writer mode (NfcTagReaderNci) and NFC Card/Tag Emulation mode (NfcApduRouterBackend) over an NciPacketIo transport (such as an NXP PN7160 connected via I2C + GPIO on a Raspberry Pi).
When start is called:
The controller initializes the NCI 2.0 state machine via NciEngine.
If registerWithMultipaz is
true(the default), reader is registered with NfcTagReader.registerReader (so NfcTagReader.getReaders returns it automatically) and this controller is registered with NfcApduRouter.registerBackend (so starting an NfcApduRouter automatically enables Listen Mode card emulation).Whenever reader.scan is invoked, the controller temporarily switches from Listen Mode to Poll Mode for the duration of the scan (plus tag-removal tracking via waitUntilRemoved), and automatically resumes Listen Mode once the scan session ends.
Constructors
Functions
Non-suspending close that immediately tears down the NCI engine and NciPacketIo.
Initializes the NCI controller hardware and registers with NfcTagReader and NfcApduRouter.
Stops the NCI controller, unregisters from NfcTagReader and NfcApduRouter, and closes the underlying NciPacketIo.