diff options
| author | hathach <[email protected]> | 2013-03-04 00:46:40 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2013-03-04 00:46:40 +0700 |
| commit | d644eaeb5c32af3704cd7494981881c28a2064c1 (patch) | |
| tree | b2a921d24fdd5ca06d17d313118feb28ca3be606 /tinyusb/common/assertion.h | |
| parent | 74e6b545e1f188ba9639e6208f2c252f93554306 (diff) | |
add test for hcd/host init
- TT control
- usb cmd
complete hcd/host initialization code
Diffstat (limited to 'tinyusb/common/assertion.h')
| -rw-r--r-- | tinyusb/common/assertion.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/tinyusb/common/assertion.h b/tinyusb/common/assertion.h index 180d046aa..dba812959 100644 --- a/tinyusb/common/assertion.h +++ b/tinyusb/common/assertion.h @@ -61,12 +61,14 @@ extern "C" //--------------------------------------------------------------------+ // Compile-time Assert //--------------------------------------------------------------------+ -#ifdef __COUNTER__ - #define STATIC_ASSSERT(const_expr) enum { XSTRING_CONCAT(static_assert_, __COUNTER__) = 1/(!!(const_expr)) } +#if defined __COUNTER__ && __COUNTER__ != __COUNTER__ + #define _ASSERT_COUNTER __COUNTER__ #else - #define STATIC_ASSSERT(const_expr) enum { XSTRING_CONCAT(static_assert_, __LINE__) = 1/(!!(const_expr)) } + #define _ASSERT_COUNTER __LINE__ #endif +#define STATIC_ASSSERT(const_expr) enum { XSTRING_CONCAT(static_assert_, _ASSERT_COUNTER) = 1/(!!(const_expr)) } + //#if ( defined CFG_PRINTF_UART || defined CFG_PRINTF_USBCDC || defined CFG_PRINTF_DEBUG ) #if TUSB_CFG_DEBUG == 3 #define _PRINTF(...) printf(__VA_ARGS__) |
