You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What I don't understand is why pop returns a usize if it's always the same as data? Was pop meant to also work when the data buf is more than the available data?
The text was updated successfully, but these errors were encountered:
The current naive approach is that pop will always pop the buffer of one descriptor exactly.
I think for the fix we also would need to change available: Currently available will overwrite read_buffer_start and available.
Also pop would need to adjust read_buffer_start . We would need to also take wrapping into account
I think push is already working like that and probably it would be good to have them working similar
If the API works like this, we won't need the DmaError::Exhausted
esp-hal/esp-hal/src/dma/mod.rs
Lines 740 to 756 in 822bef1
Found this while I was writing the camera driver, if
pop
is called withdata
of size less thanavailable
:My proposed fix for this is.
What I don't understand is why
pop
returns ausize
if it's always the same asdata
? Was pop meant to also work when the data buf is more than the available data?The text was updated successfully, but these errors were encountered: