strengthen include policy. Only limited headers are allowed to included from a header file. Missing needed to be included in *.c

This commit is contained in:
hathach
2013-02-28 15:03:18 +07:00
parent f56f6b6749
commit d6548d0063
9 changed files with 10 additions and 25 deletions

View File

@@ -62,12 +62,13 @@ extern "C"
// Compile-time Assert
//--------------------------------------------------------------------+
#ifdef __COUNTER__
#define STATIC_ASSSERT(const_expr) enum { XSTRING_CONCAT(static_assert_, __COUNTER__) = 1/(!!(const_expr)) }
#define STATIC_ASSSERT(const_expr) enum { XSTRING_CONCAT(static_assert_, __COUNTER__) = 1/(!!(const_expr)) }
#else
#define STATIC_ASSSERT(const_expr) enum { XSTRING_CONCAT(static_assert_, __LINE__) = 1/(!!(const_expr)) }
#define STATIC_ASSSERT(const_expr) enum { XSTRING_CONCAT(static_assert_, __LINE__) = 1/(!!(const_expr)) }
#endif
//#if ( defined CFG_PRINTF_UART || defined CFG_PRINTF_USBCDC || defined CFG_PRINTF_DEBUG )
#if TUSB_CFG_DEBUG
#if TUSB_CFG_DEBUG == 3
#define _PRINTF(...) printf(__VA_ARGS__)
#else
#define _PRINTF(...)