diff options
| author | hathach <[email protected]> | 2020-05-08 12:56:32 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2020-05-08 12:56:32 +0700 |
| commit | eeb076454b8e9b91654f0de3ce565e4f1c1967af (patch) | |
| tree | 43e6d8a9dc2459bc582dcb48224503d6bd069dbf /src/common | |
| parent | f9f0873b72f26c39a2322a02929ca92833959eca (diff) | |
add CFG_TUSB_DEBUG_PRINTF() for log retargeting
Diffstat (limited to 'src/common')
| -rw-r--r-- | src/common/tusb_common.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/common/tusb_common.h b/src/common/tusb_common.h index 052caef21..2389bfcd4 100644 --- a/src/common/tusb_common.h +++ b/src/common/tusb_common.h @@ -215,8 +215,11 @@ static inline bool tu_bit_test (uint32_t value, uint8_t pos) { return (value void tu_print_mem(void const *buf, uint16_t count, uint8_t indent); -#ifndef tu_printf - #define tu_printf printf +#ifdef CFG_TUSB_DEBUG_PRINTF + extern int CFG_TUSB_DEBUG_PRINTF(const char *format, ...); + #define tu_printf CFG_TUSB_DEBUG_PRINTF +#else + #define tu_printf printf #endif static inline |
