xmos / lib_xua

XMOS USB Audio
Other
17 stars 15 forks source link

Strings in USB audio descriptots do not update at runtime #406

Open maxter-m opened 4 months ago

maxter-m commented 4 months ago

If I try to update the Serial Number string at runtime using the API void XUA_Endpoint0_setSerialStr(char* serial_str) from _xuaendpoint0.c the corresponding string is NOT updated.

By looking at the code I found that g_serial_str is used only when creating the descriptor and not used at runtime, and the following change solves the issue

388c392
<     concatenateAndCopyStrings(serial_str, "", g_serial_str);
---
>     concatenateAndCopyStrings(serial_str, "", g_strTable.serialStr);

I think the same issue applies to other USB strings that can be populated at runtime via the XUA_Endpoint0_set*Str functions.