diff options
| author | Ha Thach <[email protected]> | 2021-06-02 00:39:53 +0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-06-02 00:39:53 +0700 |
| commit | ff1a1122edb9479f6e178512944dbb824d9e3d77 (patch) | |
| tree | 3a29318ed458ff12c37b9f5f5b648bc93e901dee /src/common | |
| parent | a6b5e207b22fc3476168c2a5e9a349d4b942aeab (diff) | |
| parent | 54107100bbc32756324070a6a06146b958f653d6 (diff) | |
Merge pull request #868 from hathach/host-hcd
Clean up Host HCD API
Diffstat (limited to 'src/common')
| -rw-r--r-- | src/common/tusb_common.h | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/src/common/tusb_common.h b/src/common/tusb_common.h index 6f2905697..3350ed86c 100644 --- a/src/common/tusb_common.h +++ b/src/common/tusb_common.h @@ -24,10 +24,6 @@ * This file is part of the TinyUSB stack. */ -/** \ingroup Group_Common - * \defgroup Group_CommonH common.h - * @{ */ - #ifndef _TUSB_COMMON_H_ #define _TUSB_COMMON_H_ @@ -288,8 +284,9 @@ TU_ATTR_ALWAYS_INLINE static inline void tu_unaligned_write16 (void* mem, ui // CFG_TUSB_DEBUG for debugging // 0 : no debug -// 1 : print when there is error -// 2 : print out log +// 1 : print error +// 2 : print warning +// 3 : print info #if CFG_TUSB_DEBUG void tu_print_mem(void const *buf, uint32_t count, uint8_t indent); @@ -316,7 +313,6 @@ void tu_print_var(uint8_t const* buf, uint32_t bufsize) #define TU_LOG_LOCATION() tu_printf("%s: %d:\r\n", __PRETTY_FUNCTION__, __LINE__) #define TU_LOG_FAILED() tu_printf("%s: %d: Failed\r\n", __PRETTY_FUNCTION__, __LINE__) - // Log Level 1: Error #define TU_LOG1 tu_printf #define TU_LOG1_MEM tu_print_mem @@ -366,14 +362,23 @@ static inline const char* tu_lookup_find(tu_lookup_table_t const* p_table, uint3 #endif // CFG_TUSB_DEBUG +#ifndef TU_LOG +#define TU_LOG(n, ...) +#define TU_LOG_MEM(n, ...) +#define TU_LOG_VAR(n, ...) +#define TU_LOG_INT(n, ...) +#define TU_LOG_HEX(n, ...) +#define TU_LOG_LOCATION() +#define TU_LOG_FAILED() +#endif + +// TODO replace all TU_LOGn with TU_LOG(n) #ifndef TU_LOG1 #define TU_LOG1(...) #define TU_LOG1_MEM(...) #define TU_LOG1_VAR(...) #define TU_LOG1_INT(...) #define TU_LOG1_HEX(...) - #define TU_LOG1_LOCATION() - #define TU_LOG1_FAILED() #endif #ifndef TU_LOG2 @@ -382,7 +387,6 @@ static inline const char* tu_lookup_find(tu_lookup_table_t const* p_table, uint3 #define TU_LOG2_VAR(...) #define TU_LOG2_INT(...) #define TU_LOG2_HEX(...) - #define TU_LOG2_LOCATION() #endif #ifndef TU_LOG3 @@ -391,7 +395,6 @@ static inline const char* tu_lookup_find(tu_lookup_table_t const* p_table, uint3 #define TU_LOG3_VAR(...) #define TU_LOG3_INT(...) #define TU_LOG3_HEX(...) - #define TU_LOG3_LOCATION() #endif #ifdef __cplusplus @@ -399,5 +402,3 @@ static inline const char* tu_lookup_find(tu_lookup_table_t const* p_table, uint3 #endif #endif /* _TUSB_COMMON_H_ */ - -/** @} */ |
