diff options
| author | HiFiPhile <[email protected]> | 2025-04-18 14:54:20 +0200 |
|---|---|---|
| committer | HiFiPhile <[email protected]> | 2025-04-18 14:54:20 +0200 |
| commit | 4c6736c2779b990e5f97aef7dd1480bf196fede1 (patch) | |
| tree | e8684c56dad5753e1e94cd2c0727f04d0c4cba2c /src/common/tusb_debug.h | |
| parent | 2064ee470d6c7b434d6b3aafe017ed60c3b17ab5 (diff) | |
| parent | e44f556a951451fd9123cb822683faac324e0450 (diff) | |
Merge branch 'master' into dwc2-proper-attach-debouncing
Signed-off-by: HiFiPhile <[email protected]>
Diffstat (limited to 'src/common/tusb_debug.h')
| -rw-r--r-- | src/common/tusb_debug.h | 6 |
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; } |
