diff options
author | Lasse Dalegaard <dalegaard@gmail.com> | 2021-10-27 11:02:10 +0100 |
---|---|---|
committer | KevinOConnor <kevin@koconnor.net> | 2021-10-27 11:10:17 -0400 |
commit | de331802365020f3a13ab6ffa97a3c96609af161 (patch) | |
tree | feb397ea53070da6eb82e7f7c5a60359fc44e90c /klippy/util.py | |
parent | aa481fd9c3fc915537a51966320773fcf7008e7b (diff) | |
download | kutter-de331802365020f3a13ab6ffa97a3c96609af161.tar.gz kutter-de331802365020f3a13ab6ffa97a3c96609af161.tar.xz kutter-de331802365020f3a13ab6ffa97a3c96609af161.zip |
rp2040: add barrier in usb_read_ep0_setup
Some versions of gcc, in some cases, decide that it is OK to move the
read to `INTR` to right after clearing the `SETUP_REC` bit of
`SIE_STATUS`, instead of after the `memcpy`.
The rp2040 datasheet doesn't appear to say anything about how quickly
the `SETUP_REC` bit will be cleared in `INTR`, but regardless the
compiler should not be re-ordering the read like this.
Here we force the correct ordering using a memory barrier.
Signed-off-by: Lasse Dalegaard <dalegaard@gmail.com>
Diffstat (limited to 'klippy/util.py')
0 files changed, 0 insertions, 0 deletions