RFAL notification when card no longer available
Greetings,
I've got a simple application wherein I'm exchanging ISO-DEP data using RFAL on a ST25R3916. I'm only interested in handling the data read from the card once (of course) and then only process read-data again from either a new card OR the same card again *if* the card has been removed and re-presented (i.e. the card re-appears with a new UID). I fully expected that the rfal state machine would have a "disconnected" (or equivalent) state, or, at least, would auto-deactivate which would be observable via a notification (i.e. within the discParam.notifyCb). This does not appear to be the case.
My working (and feels dirty) solution is, once read, throw in a vTaskDelay (freeRTOS) so lower priority tasks can run while waiting on the card presenter to leave, and keep reading the tag (but ignore the data) till I get a read error. Once I get a read error, I know the next tag is a "new" one, so I can deactivate and re-enter discovery.
Given my desires to stay at the rfal_nfc API level and use the rfal code as-is, what is the *right* way to obtain this behavior?
And, for completeness, note that my reader never sleeps.
Thanks,
Steve Stearns
