DbpString(output_string);
}
+// prints HEX & ASCII
+void Dbhexdump(int len, uint8_t *d) {
+ int l=0,i;
+ char ascii[9];
+
+ while (len>0) {
+ if (len>8) l=8;
+ else l=len;
+
+ memcpy(ascii,d,l);
+ ascii[l]=0;
+
+ // filter safe ascii
+ for (i=0;i<l;i++)
+ if (ascii[i]<32 || ascii[i]>126) ascii[i]='.';
+
+ Dbprintf("%-8s %*D",ascii,l,d," ");
+
+ len-=8;
+ d+=8;
+ }
+}
+
//-----------------------------------------------------------------------------
// Read an ADC channel and block till it completes, then return the result
// in ADC units (0 to 1023). Also a routine to average 32 samples and
return d;
}
-static int AvgAdc(int ch)
+int AvgAdc(int ch) // was static - merlok
{
int i;
int a = 0;
break;
#endif
+#ifdef WITH_ISO15693
+ case CMD_RECORD_RAW_ADC_SAMPLES_ISO_15693:
+ RecordRawAdcSamplesIso15693();
+ break;
+
+ case CMD_ISO_15693_COMMAND:
+ DirectTag15693Command(c->arg[0],c->arg[1],c->arg[2],c->d.asBytes);
+ break;
+
+ case CMD_ISO_15693_FIND_AFI:
+ BruteforceIso15693Afi(c->arg[0]);
+ break;
+
+ case CMD_ISO_15693_DEBUG:
+ SetDebugIso15693(c->arg[0]);
+ break;
+
+#endif
case CMD_BUFF_CLEAR:
BufferClear();
break;
break;
#endif
+#ifdef WITH_ISO14443a
+ case CMD_MIFARE_READBL:
+ MifareReadBlock(c->arg[0], c->arg[1], c->arg[2], c->d.asBytes);
+ break;
+ case CMD_MIFARE_READSC:
+ MifareReadSector(c->arg[0], c->arg[1], c->arg[2], c->d.asBytes);
+ break;
+ case CMD_MIFARE_WRITEBL:
+ MifareWriteBlock(c->arg[0], c->arg[1], c->arg[2], c->d.asBytes);
+ break;
+ case CMD_MIFARE_NESTED:
+ MifareNested(c->arg[0], c->arg[1], c->arg[2], c->d.asBytes);
+ break;
+ case CMD_MIFARE_CHKKEYS:
+ MifareChkKeys(c->arg[0], c->arg[1], c->arg[2], c->d.asBytes);
+ break;
+ case CMD_SIMULATE_MIFARE_CARD:
+ Mifare1ksim(c->arg[0], c->arg[1], c->arg[2], c->d.asBytes);
+ break;
+
+ // emulator
+ case CMD_MIFARE_SET_DBGMODE:
+ MifareSetDbgLvl(c->arg[0], c->arg[1], c->arg[2], c->d.asBytes);
+ break;
+ case CMD_MIFARE_EML_MEMCLR:
+ MifareEMemClr(c->arg[0], c->arg[1], c->arg[2], c->d.asBytes);
+ break;
+ case CMD_MIFARE_EML_MEMSET:
+ MifareEMemSet(c->arg[0], c->arg[1], c->arg[2], c->d.asBytes);
+ break;
+ case CMD_MIFARE_EML_MEMGET:
+ MifareEMemGet(c->arg[0], c->arg[1], c->arg[2], c->d.asBytes);
+ break;
+ case CMD_MIFARE_EML_CARDLOAD:
+ MifareECardLoad(c->arg[0], c->arg[1], c->arg[2], c->d.asBytes);
+ break;
+
+#endif
+
#ifdef WITH_ISO14443b
case CMD_SNOOP_ISO_14443:
SnoopIso14443();
break;
#endif
+#ifdef WITH_ISO14443a
+ // Makes use of ISO14443a FPGA Firmware
+ case CMD_SNOOP_ICLASS:
+ SnoopIClass();
+ break;
+#endif
+
case CMD_SIMULATE_TAG_HF_LISTEN:
SimulateTagHfListen();
break;
// Load the FPGA image, which we have stored in our flash.
FpgaDownloadAndGo();
+ StartTickCount();
+
#ifdef WITH_LCD
LCDInit();