USB composite device example program, drag-and-drop flash writer.

Dependencies:   SWD USBDevice mbed BaseDAP

mydebug.h

Committer:
va009039
Date:
2013-09-17
Revision:
0:2385683c867a
Child:
1:ea8e179320d7

File content as of revision 0:2385683c867a:

// mydebug.h 2013/8/31
#pragma once

#define MY_DEBUG 1

#if MY_DEBUG
#include "mbed_debug.h"
extern void debug_hex(uint8_t* buf, int len);
#define DBG(x, ...) debug("[%s:%d]"x"\r\n", __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__);
#define DBG_HEX(A,B) do{debug("[%s:%d]\r\n",__PRETTY_FUNCTION__, __LINE__);debug_hex(A,B);}while(0);
#else
#define DBG(x, ...) while(0);
#define DBG_HEX(A,B) while(0);
#endif

#if 1
#include "mbed_debug.h"
#define TEST_ASSERT(A) while(!(A)){debug("\n\n%s@%d %s ASSERT!\n\n",__PRETTY_FUNCTION__,__LINE__,#A);exit(1);};
#else
#define TEST_ASSERT(A) while(0);
#endif