diff options
| author | sakimisu <[email protected]> | 2023-05-26 19:33:30 +0800 |
|---|---|---|
| committer | sakimisu <[email protected]> | 2023-05-26 19:33:30 +0800 |
| commit | c1fbb4ae5641bc1318d67834522fd202074fdb04 (patch) | |
| tree | 4be6e3ccab8706cf76f3f9882400ad312a4a6d90 | |
| parent | e77657e723b09c0a193845f6491848bd5a205a95 (diff) | |
copy desc into nocache ram
| -rw-r--r-- | core/usbd_core.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/core/usbd_core.c b/core/usbd_core.c index 4d1701cb..48723df9 100644 --- a/core/usbd_core.c +++ b/core/usbd_core.c @@ -289,7 +289,8 @@ static bool usbd_get_descriptor(uint16_t type_index, uint8_t **data, uint32_t *l return false; } - *data = (uint8_t *)msosv1_desc->string; + //*data = (uint8_t *)msosv1_desc->string; + memcpy(*data, (uint8_t *)msosv1_desc->string, msosv1_desc->string_len); *len = msosv1_desc->string_len; return true; @@ -300,7 +301,8 @@ static bool usbd_get_descriptor(uint16_t type_index, uint8_t **data, uint32_t *l return false; } - *data = bos_desc->string; + //*data = bos_desc->string; + memcpy(*data, (uint8_t *)bos_desc->string, bos_desc->string_len); *len = bos_desc->string_len; return true; } |
