Revision 1547
found one bug and changed some debug prints
dragonfly_defs.h | ||
---|---|---|
90 | 90 |
#define RELEASE_LOCK(LOCK) do { LOCK=0; } while (0) |
91 | 91 |
|
92 | 92 |
|
93 |
#define __TO_STR_(s) #s |
|
94 |
#define __TO_STR(s) __TO_STR_(s) |
|
95 |
|
|
93 | 96 |
#ifdef DRAGONFLY_DEBUG |
94 |
#define DRAGONFLY_DEBUG_PRINT(s) usb_puts(s)
|
|
95 |
#define DRAGONFLY_DEBUG_PRINTLN(s) usb_puts(__FILE__ ":" __LINE__ ">>" s "\r\n")
|
|
97 |
#define DRAGONFLY_DEBUG_PRINT(s) usb_puts(__FILE__ ":" __TO_STR(__LINE__) ">" s )
|
|
98 |
#define DRAGONFLY_DEBUG_PRINT_STR(s) usb_puts(s)
|
|
96 | 99 |
#define DRAGONFLY_DEBUG_PRINT_INT(i) usb_puti(i) |
97 | 100 |
#else |
98 | 101 |
#define DRAGONFLY_DEBUG_PRINT(s) |
99 |
#define DRAGONFLY_DEBUG_PRINTLN(s)
|
|
102 |
#define DRAGONFLY_DEBUG_PRINT_STR(s)
|
|
100 | 103 |
#define DRAGONFLY_DEBUG_PRINT_INT(i) |
101 | 104 |
#endif |
102 | 105 |
|
106 |
//TODO: write a STR_ERROR function which returns strings for the error codes |
|
107 |
|
|
103 | 108 |
#endif |
Also available in: Unified diff