diff options
| author | Ha Thach <[email protected]> | 2021-08-30 17:31:50 +0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-08-30 17:31:50 +0700 |
| commit | 38f5aee9c31299874dcda1758cb98e4404c6ad9d (patch) | |
| tree | 3d29d52b6305d32e4c7960ad358a3cfe289b5ec8 /src/common | |
| parent | 36dc25a22d05cf9826944e363dd9ca4eb3416661 (diff) | |
| parent | fdf1ff545f41c23f63e86d6debaa852e731d7644 (diff) | |
Merge pull request #1058 from hathach/usbcv-compliant-test
nrf5x USB Compliance Verification Test suite
Diffstat (limited to 'src/common')
| -rw-r--r-- | src/common/tusb_common.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/common/tusb_common.h b/src/common/tusb_common.h index c2356ffee..1452e0105 100644 --- a/src/common/tusb_common.h +++ b/src/common/tusb_common.h @@ -369,12 +369,17 @@ typedef struct static inline const char* tu_lookup_find(tu_lookup_table_t const* p_table, uint32_t key) { + static char not_found[10]; + for(uint16_t i=0; i<p_table->count; i++) { if (p_table->items[i].key == key) return p_table->items[i].data; } - return NULL; + // not found return the key value in hex + sprintf(not_found, "0x%08lX", key); + + return not_found; } #endif // CFG_TUSB_DEBUG |
