summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorhathach <[email protected]>2021-08-27 12:38:41 +0700
committerhathach <[email protected]>2021-08-27 12:38:41 +0700
commit9394de6ae74cf01ba8c8f1dab57dbbdfad6d6407 (patch)
tree991d73039f501f92607df28334b91c5177aae02c /src/common
parent629da937f84854d76cd8da20daa4a80dd02e56e2 (diff)
update msc driver to pass MSC BOT error recovery compliant test
Diffstat (limited to 'src/common')
-rw-r--r--src/common/tusb_common.h7
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