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

Dependencies:   SWD USBDevice mbed BaseDAP

Committer:
va009039
Date:
Tue Sep 17 04:33:44 2013 +0000
Revision:
0:2385683c867a
Child:
1:ea8e179320d7
first commit

Who changed what in which revision?

UserRevisionLine numberNew contents of line
va009039 0:2385683c867a 1 // mydebug.h 2013/8/31
va009039 0:2385683c867a 2 #pragma once
va009039 0:2385683c867a 3
va009039 0:2385683c867a 4 #define MY_DEBUG 1
va009039 0:2385683c867a 5
va009039 0:2385683c867a 6 #if MY_DEBUG
va009039 0:2385683c867a 7 #include "mbed_debug.h"
va009039 0:2385683c867a 8 extern void debug_hex(uint8_t* buf, int len);
va009039 0:2385683c867a 9 #define DBG(x, ...) debug("[%s:%d]"x"\r\n", __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__);
va009039 0:2385683c867a 10 #define DBG_HEX(A,B) do{debug("[%s:%d]\r\n",__PRETTY_FUNCTION__, __LINE__);debug_hex(A,B);}while(0);
va009039 0:2385683c867a 11 #else
va009039 0:2385683c867a 12 #define DBG(x, ...) while(0);
va009039 0:2385683c867a 13 #define DBG_HEX(A,B) while(0);
va009039 0:2385683c867a 14 #endif
va009039 0:2385683c867a 15
va009039 0:2385683c867a 16 #if 1
va009039 0:2385683c867a 17 #include "mbed_debug.h"
va009039 0:2385683c867a 18 #define TEST_ASSERT(A) while(!(A)){debug("\n\n%s@%d %s ASSERT!\n\n",__PRETTY_FUNCTION__,__LINE__,#A);exit(1);};
va009039 0:2385683c867a 19 #else
va009039 0:2385683c867a 20 #define TEST_ASSERT(A) while(0);
va009039 0:2385683c867a 21 #endif