diff options
| author | hathach <[email protected]> | 2022-04-27 20:52:56 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2022-04-27 20:52:56 +0700 |
| commit | ae5490e5a5cd8650a45578b4ac70dbe89b002fb1 (patch) | |
| tree | e8aa3de0a30163bff20ae5d4079270ed00e5e3fc /src/common/tusb_debug.h | |
| parent | 4a661dead0899cb154325a8257d19281f2536af3 (diff) | |
clean up
Diffstat (limited to 'src/common/tusb_debug.h')
| -rw-r--r-- | src/common/tusb_debug.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/common/tusb_debug.h b/src/common/tusb_debug.h index 1ea2c19f5..ac5bee6ec 100644 --- a/src/common/tusb_debug.h +++ b/src/common/tusb_debug.h @@ -57,7 +57,7 @@ void tu_print_mem(void const *buf, uint32_t count, uint8_t indent); #define tu_printf printf #endif -static inline void tu_print_var(uint8_t const* buf, uint32_t bufsize) +static inline void tu_print_arr(uint8_t const* buf, uint32_t bufsize) { for(uint32_t i=0; i<bufsize; i++) tu_printf("%02X ", buf[i]); } @@ -75,8 +75,8 @@ static inline void tu_print_var(uint8_t const* buf, uint32_t bufsize) // Log Level 1: Error #define TU_LOG1 tu_printf #define TU_LOG1_MEM tu_print_mem -#define TU_LOG1_ARR(_x, _n) tu_print_var((uint8_t const*)(_x), _n) -#define TU_LOG1_VAR(_x) tu_print_var((uint8_t const*)(_x), sizeof(*(_x))) +#define TU_LOG1_ARR(_x, _n) tu_print_arr((uint8_t const*)(_x), _n) +#define TU_LOG1_VAR(_x) tu_print_arr((uint8_t const*)(_x), sizeof(*(_x))) #define TU_LOG1_INT(_x) tu_printf(#_x " = %ld\r\n", (unsigned long) (_x) ) #define TU_LOG1_HEX(_x) tu_printf(#_x " = %lX\r\n", (unsigned long) (_x) ) |
