Adds support for HSU interface, aka Serial, aka UART.
Only Hardware Serial support at this point.
Other notes:
Removed "wait for a card" loop in readPassiveTargetID. Should be OK to just read the response frame and rely on readDetectedPassiveTargetID which checks the number of targets detected in the response frame and just returns if 0. This could have been part of a previous PR. Adding UART just exposed it.
Fixed a couple of off-by-one in reading response length. SPI and I2C were tolerant of this as each's "stop" would throw away any unread data. The unread data was the meaningless end of frame 0x00 postamble, so also was not critical information being lost. For UART, unread data remains in buffer which throws off the next read, since that left over data is not expected. (may be others?)
Tested with updated readMifare example on Feather M4 using the new constructor:
Adds support for HSU interface, aka Serial, aka UART.
Only Hardware Serial support at this point.
Other notes:
readPassiveTargetID
. Should be OK to just read the response frame and rely onreadDetectedPassiveTargetID
which checks the number of targets detected in the response frame and just returns if 0. This could have been part of a previous PR. Adding UART just exposed it.Tested with updated
readMifare
example on Feather M4 using the new constructor:Also retested SPI:
Also retested I2C: