diff options
| author | HiFiPhile <[email protected]> | 2025-10-30 19:50:47 +0100 |
|---|---|---|
| committer | HiFiPhile <[email protected]> | 2025-10-30 19:50:47 +0100 |
| commit | aa739c946d0258be4f07914bcb48288e2c977145 (patch) | |
| tree | 9ac52bd6a4d38c7b88c0158ac79a8525c14d58e4 /src/common/tusb_debug.h | |
| parent | 9f1a86c0cbf2974775687848a95a126c6503c1cf (diff) | |
| parent | fc3857eb1abefff3cf19816e231e549bf75b9dc3 (diff) | |
Merge branch 'master' into uac1
Signed-off-by: HiFiPhile <[email protected]>
Diffstat (limited to 'src/common/tusb_debug.h')
| -rw-r--r-- | src/common/tusb_debug.h | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/common/tusb_debug.h b/src/common/tusb_debug.h index 1d0c6f1ad..e3f9d3f18 100644 --- a/src/common/tusb_debug.h +++ b/src/common/tusb_debug.h @@ -24,8 +24,8 @@ * This file is part of the TinyUSB stack. */ -#ifndef _TUSB_DEBUG_H_ -#define _TUSB_DEBUG_H_ +#ifndef TUSB_DEBUG_H_ +#define TUSB_DEBUG_H_ #ifdef __cplusplus extern "C" { @@ -58,8 +58,10 @@ void tu_print_mem(void const *buf, uint32_t count, uint8_t indent); #define tu_printf printf #endif -static inline void tu_print_buf(uint8_t const* buf, uint32_t bufsize) { - for(uint32_t i=0; i<bufsize; i++) tu_printf("%02X ", buf[i]); +TU_ATTR_ALWAYS_INLINE static inline void tu_print_buf(uint8_t const* buf, uint32_t bufsize) { + for(uint32_t i=0; i<bufsize; i++) { + tu_printf("%02X ", buf[i]); + } tu_printf("\r\n"); } @@ -109,7 +111,9 @@ typedef struct { static inline const char* tu_lookup_find(tu_lookup_table_t const* p_table, uint32_t key) { for(uint16_t i=0; i<p_table->count; i++) { - if (p_table->items[i].key == key) { return p_table->items[i].data; } + if (p_table->items[i].key == key) { + return p_table->items[i].data; + } } // not found return the key value in hex @@ -130,8 +134,6 @@ static inline const char* tu_lookup_find(tu_lookup_table_t const* p_table, uint3 #define TU_LOG_FAILED() #endif -// TODO replace all TU_LOGn with TU_LOG(n) - #define TU_LOG0(...) #define TU_LOG0_MEM(...) #define TU_LOG0_BUF(...) @@ -166,4 +168,4 @@ static inline const char* tu_lookup_find(tu_lookup_table_t const* p_table, uint3 } #endif -#endif /* _TUSB_DEBUG_H_ */ +#endif |
