mirror of
https://github.com/nfc-tools/libnfc.git
synced 2026-03-02 05:36:36 +00:00
Prevent from running polling on hardware that does not support it.
This commit is contained in:
@@ -111,6 +111,10 @@ int main(int argc, const char* argv[])
|
||||
nfc_target_t antTargets[2];
|
||||
size_t szTargetFound;
|
||||
|
||||
if(pnd->nc == NC_PN531) {
|
||||
// PN531 doesn't support hardware polling (InAutoPoll)
|
||||
continue;
|
||||
}
|
||||
printf("PN53x will poll during %ld ms\n", btPollNr * szTargetTypes * btPeriod * 150);
|
||||
bool res = nfc_initiator_poll_targets(pnd, &nttMifare, 1, btPollNr, btPeriod, antTargets, &szTargetFound);
|
||||
if( res ) {
|
||||
|
||||
Reference in New Issue
Block a user