summaryrefslogtreecommitdiff
path: root/tinyusb/common/errors.c
diff options
context:
space:
mode:
authorhathach <[email protected]>2013-01-11 16:28:57 +0700
committerhathach <[email protected]>2013-01-11 16:28:57 +0700
commita6e5197b58f38e031c29f57780e8b495c3e7d6ee (patch)
tree53a63826741309020c8c1adb033753403b2b9830 /tinyusb/common/errors.c
parent83bb44510a63be178b2c40bcf02d3cda97dabc8b (diff)
use X Macros to remove #undef in errors.
Diffstat (limited to 'tinyusb/common/errors.c')
-rw-r--r--tinyusb/common/errors.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/tinyusb/common/errors.c b/tinyusb/common/errors.c
index 65e4c4e28..58b9e6b8d 100644
--- a/tinyusb/common/errors.c
+++ b/tinyusb/common/errors.c
@@ -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