diff options
| author | Hubert Denkmair <[email protected]> | 2023-03-12 15:51:07 +0100 |
|---|---|---|
| committer | Hubert Denkmair <[email protected]> | 2023-03-12 15:51:07 +0100 |
| commit | f8a21fff171aa272360c89dab5faca4f688a656a (patch) | |
| tree | d4ebe4bd6ab6c9658e9cfbd1118580721d8a6984 /src | |
| parent | af577d2b6dc9523dc348b36e9e753adc00aec974 (diff) | |
dcd_write_packet_memory: use volatile modifier for destination pointer
Diffstat (limited to 'src')
| -rw-r--r-- | src/portable/st/stm32_fsdev/dcd_stm32_fsdev.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/portable/st/stm32_fsdev/dcd_stm32_fsdev.c b/src/portable/st/stm32_fsdev/dcd_stm32_fsdev.c index 21ae8e6e8..e2e1cf484 100644 --- a/src/portable/st/stm32_fsdev/dcd_stm32_fsdev.c +++ b/src/portable/st/stm32_fsdev/dcd_stm32_fsdev.c @@ -1228,8 +1228,8 @@ void dcd_edpt_clear_stall (uint8_t rhport, uint8_t ep_addr) static bool dcd_write_packet_memory(uint16_t dst, const void *__restrict src, size_t wNBytes) { // FIXME original function uses byte-access to source memory (to support non-aligned buffers) - const uint32_t* src32 = (uint32_t*)(src); - uint32_t* dst32 = (uint32_t*)(USB_PMAADDR + dst); + const uint32_t* src32 = (const uint32_t*)(src); + volatile uint32_t* dst32 = (volatile uint32_t*)(USB_PMAADDR + dst); for (unsigned n=wNBytes/4; n>0; --n) { *dst32++ = *src32++; } |
