summaryrefslogtreecommitdiff
path: root/src/common/tusb_debug.h
diff options
context:
space:
mode:
authorhathach <[email protected]>2025-07-04 09:49:28 +0700
committerhathach <[email protected]>2025-07-04 09:49:28 +0700
commit1b5f97ff23776279a011e2ab14a85f29e1aa6c10 (patch)
tree0328289336a2b135cd8455dab70dd9bd77737590 /src/common/tusb_debug.h
parentcd2b3a53217857930bd8519d074b355ae8933982 (diff)
parent9d872d529ffa0aa53e735b24543c26156798fc64 (diff)
Merge branch 'refs/heads/master' into fork/verylowfreq/pr-ch32v-usbfs-host
Diffstat (limited to 'src/common/tusb_debug.h')
-rw-r--r--src/common/tusb_debug.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/common/tusb_debug.h b/src/common/tusb_debug.h
index 2e9f1d9cd..1d0c6f1ad 100644
--- a/src/common/tusb_debug.h
+++ b/src/common/tusb_debug.h
@@ -108,15 +108,13 @@ typedef struct {
} tu_lookup_table_t;
static inline const char* tu_lookup_find(tu_lookup_table_t const* p_table, uint32_t key) {
- tu_static char not_found[11];
-
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
+ static char not_found[11];
snprintf(not_found, sizeof(not_found), "0x%08lX", (unsigned long) key);
-
return not_found;
}