UVC host library

Dependents:   LifeCam WebcamServer

Committer:
va009039
Date:
Wed Aug 15 13:52:53 2012 +0000
Revision:
3:3eb41d749f9a
Parent:
0:b0f04c137829
add USB_USE_MALLOC

Who changed what in which revision?

UserRevisionLine numberNew contents of line
va009039 0:b0f04c137829 1 #ifndef _MYDBG_H_
va009039 0:b0f04c137829 2 #define _MYDBG_H_
va009039 0:b0f04c137829 3 #ifdef __DEBUG
va009039 0:b0f04c137829 4 #include "Utils.h"
va009039 0:b0f04c137829 5 #define DBG(...) do{fprintf(stderr,"[%s@%d] ",__PRETTY_FUNCTION__,__LINE__);fprintf(stderr,__VA_ARGS__);} while(0);
va009039 0:b0f04c137829 6 #define DBG2(...) do{fprintf(stderr,"[%d] ",__LINE__);fprintf(stderr,__VA_ARGS__);} while(0);
va009039 0:b0f04c137829 7 #define DBG_BYTES(A,B,C) do{printf("[%s@%d] ",__PRETTY_FUNCTION__,__LINE__);printfBytes(A,B,C);}while(0);
va009039 0:b0f04c137829 8 #define DBG_HEX(A,B) do{printf("[%s@%d]\n",__PRETTY_FUNCTION__,__LINE__);printHex(A,B);}while(0);
va009039 0:b0f04c137829 9 #define DBG_LED4(A) led4.write(A)
va009039 0:b0f04c137829 10 #define DBG_PRINTF(...) do{fprintf(stderr,__VA_ARGS__);} while(0);
va009039 0:b0f04c137829 11 #else //__DEBUG
va009039 0:b0f04c137829 12 #define DBG(...) while(0);
va009039 0:b0f04c137829 13 #define DBG2(...) while(0);
va009039 0:b0f04c137829 14 #define DBG_BYTES(A,B,C) while(0);
va009039 0:b0f04c137829 15 #define DBG_HEX(A,B) while(0);
va009039 0:b0f04c137829 16 #define DBG_LED4(A) while(0);
va009039 0:b0f04c137829 17 #define DBG_PRINTF(...) while(0);
va009039 0:b0f04c137829 18 #endif //__DEBUG
va009039 0:b0f04c137829 19 #ifdef __DEBUG3
va009039 0:b0f04c137829 20 #define DBG3(...) do{fprintf(stderr,"[%s@%d] ",__PRETTY_FUNCTION__,__LINE__);fprintf(stderr,__VA_ARGS__);} while(0);
va009039 0:b0f04c137829 21
va009039 0:b0f04c137829 22 #else //__DEBUG3
va009039 0:b0f04c137829 23 #define DBG3(...) while(0);
va009039 0:b0f04c137829 24 #endif //__DEBUG3
va009039 0:b0f04c137829 25
va009039 0:b0f04c137829 26 #ifndef __NODEBUG
va009039 0:b0f04c137829 27 #define DBG_ASSERT(A) while(!(A)){fprintf(stderr,"\n\n%s@%d %s ASSERT!\n\n",__PRETTY_FUNCTION__,__LINE__,#A);exit(1);};
va009039 0:b0f04c137829 28 #else
va009039 0:b0f04c137829 29 #define DBG_ASSERT(A) while(0);
va009039 0:b0f04c137829 30 #endif
va009039 0:b0f04c137829 31
va009039 0:b0f04c137829 32 #define VERBOSE(...) do{printf(__VA_ARGS__);} while(0);
va009039 0:b0f04c137829 33
va009039 0:b0f04c137829 34 #endif //_MYDBG_H_