fix coverity CID 349303
[RRG-proxmark3.git] / armsrc / dbprint.h
blob993e062899cdacc64de289d7b12e9f8c9b0971a0
1 //-----------------------------------------------------------------------------
2 // Jonathan Westhues, Aug 2005
3 // Gerhard de Koning Gans, April 2008, May 2011
4 //
5 // This code is licensed to you under the terms of the GNU GPL, version 2 or,
6 // at your option, any later version. See the LICENSE.txt file for the text of
7 // the license.
8 //-----------------------------------------------------------------------------
9 // Definitions internal to the app source.
10 //-----------------------------------------------------------------------------
11 #ifndef __DBPRINT_H
12 #define __DBPRINT_H
14 #include "common.h"
15 #include "ansi.h"
17 #define Dbprintf_usb(...) {\
18 bool tmpfpc = g_reply_via_fpc;\
19 bool tmpusb = g_reply_via_usb;\
20 g_reply_via_fpc = false;\
21 g_reply_via_usb = true;\
22 Dbprintf(__VA_ARGS__);\
23 g_reply_via_fpc = tmpfpc;\
24 g_reply_via_usb = tmpusb;}
26 #define Dbprintf_fpc(...) {\
27 bool tmpfpc = g_reply_via_fpc;\
28 bool tmpusb = g_reply_via_usb;\
29 g_reply_via_fpc = true;\
30 g_reply_via_usb = false;\
31 Dbprintf(__VA_ARGS__);\
32 g_reply_via_fpc = tmpfpc;\
33 g_reply_via_usb = tmpusb;}
35 #define Dbprintf_all(...) {\
36 bool tmpfpc = g_reply_via_fpc;\
37 bool tmpusb = g_reply_via_usb;\
38 g_reply_via_fpc = true;\
39 g_reply_via_usb = true;\
40 Dbprintf(__VA_ARGS__);\
41 g_reply_via_fpc = tmpfpc;\
42 g_reply_via_usb = tmpusb;}
45 void DbpString(const char *str);
46 void DbpStringEx(uint32_t flags, const char *src, size_t srclen);
47 void Dbprintf(const char *fmt, ...);
48 void DbprintfEx(uint32_t flags, const char *fmt, ...);
49 void Dbhexdump(int len, uint8_t *d, bool bAsci);
50 void print_result(const char *name, uint8_t *buf, size_t len);
51 //void PrintToSendBuffer(void);
53 #endif