Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
412: Add is_done and try_wait methods to i2s::Transfer r=jonas-schievink a=nospam2678 Wouldn't it be useful if being able to determine whether an I²S transfer has completed without busy looping? The changes is this PR appears to be working for both `wait()` and `try_wait()`, but I must admit that the compiler fencing part flies a bit above my head even after refreshing myself on the topic. I'm actually preplexed of why it is needed in the first place. Is it to prevent buffer from being fetched for return prior to the loop being finished? An implementation detail which might be questioned is whether `is_done()` is at all desired. My reasoning is that it reduces the code duplication slightly, and that adding it to the public api might be useful for someone. One could argue an extra function call adds overhead, but I am imagining the compiler would inline and optimize away such a tiny function. Co-authored-by: Martin <[email protected]>
- Loading branch information