- if (tb1 && card.ats_len > pos) {
- PrintAndLog(" - TB1 : SFGI = %d, FWI = %d",
- (card.ats[pos] & 0x08),
- (card.ats[pos] & 0x80) >> 4);
+ if (tb1) {
+ uint32_t sfgi = card.ats[pos] & 0x0F;
+ uint32_t fwi = card.ats[pos] >> 4;
+ PrintAndLog(" - TB1 : SFGI = %d (SFGT = %s%ld/fc), FWI = %d (FWT = %ld/fc)",
+ (sfgi),
+ sfgi ? "" : "(not needed) ",
+ sfgi ? (1 << 12) << sfgi : 0,
+ fwi,
+ (1 << 12) << fwi
+ );