embassy icon indicating copy to clipboard operation
embassy copied to clipboard

feat: nrf52/pdm: Add zero-copy, dynamic double buffered continuous sampling

Open trueb2 opened this issue 2 years ago • 0 comments

This adds a pdm_continuous_zero_copy example and fixes documentation in the pdm_continuous example. I left the existing interface because it is easier to use and looks safer despite the timing issues.

I use this with embedded-alloc TlfsHeap to do math that may take longer than the amount of time to fill a buffer. With the Vec interface, I can zero-copy send the owned data to a channel and receive the owned data on a lowest priority executor task.

I could add the embedded-alloc crate and dynamic allocation to this example, but static buffers are sufficient to use the API.

trueb2 avatar Jan 27 '24 15:01 trueb2