Add FIXME to raise an E_NOTSUPPORTED error in future,

New issue
Summary: Catch unsupported command before sending to chip
Labels: Milestone-1.6.x
Actually, libnfc support PN531, PN532 and PN533 NFC chips, but the devices does not the same features. e.g. PN531 does not support ISO14443B modulation.
It should great to catch theses unsuported commands before sending to chip in order to prevent a chip error.
This commit is contained in:
Romuald Conty 2010-07-30 11:45:59 +00:00
parent 5ac580a241
commit 7113d1418b

View file

@ -298,6 +298,7 @@ pn53x_InListPassiveTarget(const nfc_device_t* pnd,
byte_t abtCmd[sizeof(pncmd_initiator_list_passive)]; byte_t abtCmd[sizeof(pncmd_initiator_list_passive)];
memcpy(abtCmd,pncmd_initiator_list_passive,sizeof(pncmd_initiator_list_passive)); memcpy(abtCmd,pncmd_initiator_list_passive,sizeof(pncmd_initiator_list_passive));
// FIXME PN531 doesn't support all available modulations
abtCmd[2] = szMaxTargets; // MaxTg abtCmd[2] = szMaxTargets; // MaxTg
abtCmd[3] = nmInitModulation; // BrTy, the type of init modulation used for polling a passive tag abtCmd[3] = nmInitModulation; // BrTy, the type of init modulation used for polling a passive tag