use X Macros to remove #undef in errors.

This commit is contained in:
hathach
2013-01-11 16:28:57 +07:00
parent 83bb44510a
commit a6e5197b58
4 changed files with 14 additions and 52 deletions

View File

@@ -39,12 +39,10 @@
#if TUSB_CFG_DEBUG == 3
// TODO X macro to remove define/undefine
char const* const TUSB_ErrorStr[] = {
# define ERROR_ENUM(x) #x,
# include "errors_def"
# undef ERROR_ENUM
0
char const* const TUSB_ErrorStr[] =
{
ERROR_TABLE(ERROR_STRING)
0
};
#endif