X-Git-Url: http://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/1d99b0df4a0c1a2f42fe23ae32cc8f3d090bc985..a9bc033bdd5bad5dcba73c55ee337bade1540d6a:/armsrc/appmain.c diff --git a/armsrc/appmain.c b/armsrc/appmain.c index 9026f721..8d6c1812 100644 --- a/armsrc/appmain.c +++ b/armsrc/appmain.c @@ -14,6 +14,12 @@ #include "LCD.h" #endif +#define va_list __builtin_va_list +#define va_start __builtin_va_start +#define va_arg __builtin_va_arg +#define va_end __builtin_va_end +int kvsprintf(char const *fmt, void *arg, int radix, va_list ap); + //============================================================================= // A buffer where we can queue things up to be sent through the FPGA, for // any purpose (fake tag, as reader, whatever). We go MSB first, since that @@ -94,6 +100,18 @@ void DbpIntegers(int x1, int x2, int x3) SpinDelay(50); } +void Dbprintf(const char *fmt, ...) { +// should probably limit size here; oh well, let's just use a big buffer + char output_string[128]; + va_list ap; + + va_start(ap, fmt); + kvsprintf(fmt, output_string, 10, ap); + va_end(ap); + + DbpString(output_string); +} + //----------------------------------------------------------------------------- // 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 @@ -593,6 +611,12 @@ void UsbPacketReceived(BYTE *packet, int len) break; #endif +#ifdef WITH_ISO14443a + case CMD_READER_MIFARE: + ReaderMifare(c->arg[0]); + break; +#endif + #ifdef WITH_ISO14443b case CMD_SNOOP_ISO_14443: SnoopIso14443();