X-Git-Url: http://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/4ab6281664b86264408b661038c050d0d5932fd7..a9bc033bdd5bad5dcba73c55ee337bade1540d6a:/armsrc/appmain.c diff --git a/armsrc/appmain.c b/armsrc/appmain.c index 11047b1c..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