diff options
Diffstat (limited to 'common/usb_log.h')
| -rw-r--r-- | common/usb_log.h | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/common/usb_log.h b/common/usb_log.h index ca03af5b..a1bc501c 100644 --- a/common/usb_log.h +++ b/common/usb_log.h @@ -95,8 +95,21 @@ } \ } while (false) #else -#define USB_ASSERT(f) {} -#define USB_ASSERT_MSG(f, fmt, ...) {} +#define USB_ASSERT(f) \ + do { \ + if (!(f)) { \ + while (1) { \ + } \ + } \ + } while (false) + +#define USB_ASSERT_MSG(f, fmt, ...) \ + do { \ + if (!(f)) { \ + while (1) { \ + } \ + } \ + } while (false) #endif #define ___is_print(ch) ((unsigned int)((ch) - ' ') < 127u - ' ') |
