Commit b52308d0 authored by Philippe Teuwen's avatar Philippe Teuwen

TypeB ProtocolInfo: limit mask for ISO14443-4 support flag

parent f1b4c8e7
...@@ -544,7 +544,9 @@ snprint_nfc_iso14443b_info(char *dst, size_t size, const nfc_iso14443b_info *pnb ...@@ -544,7 +544,9 @@ snprint_nfc_iso14443b_info(char *dst, size_t size, const nfc_iso14443b_info *pnb
const int iMaxFrameSizes[] = { 16, 24, 32, 40, 48, 64, 96, 128, 256 }; const int iMaxFrameSizes[] = { 16, 24, 32, 40, 48, 64, 96, 128, 256 };
off += snprintf(dst + off, size - off, "* Maximum frame sizes: %d bytes\n", iMaxFrameSizes[((pnbi->abtProtocolInfo[1] & 0xf0) >> 4)]); off += snprintf(dst + off, size - off, "* Maximum frame sizes: %d bytes\n", iMaxFrameSizes[((pnbi->abtProtocolInfo[1] & 0xf0) >> 4)]);
} }
if ((pnbi->abtProtocolInfo[1] & 0x0f) == PI_ISO14443_4_SUPPORTED) { if ((pnbi->abtProtocolInfo[1] & 0x01) == PI_ISO14443_4_SUPPORTED) {
// in principle low nibble could only be 0000 or 0001 and other values are RFU
// but in practice we found 0011 so let's use only last bit for -4 compatibility
off += snprintf(dst + off, size - off, "* Protocol types supported: ISO/IEC 14443-4\n"); off += snprintf(dst + off, size - off, "* Protocol types supported: ISO/IEC 14443-4\n");
} }
off += snprintf(dst + off, size - off, "* Frame Waiting Time: %.4g ms\n", 256.0 * 16.0 * (1 << ((pnbi->abtProtocolInfo[2] & 0xf0) >> 4)) / 13560.0); off += snprintf(dst + off, size - off, "* Frame Waiting Time: %.4g ms\n", 256.0 * 16.0 * (1 << ((pnbi->abtProtocolInfo[2] & 0xf0) >> 4)) / 13560.0);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment