Skip to content

Conversation

@xoviat
Copy link
Contributor

@xoviat xoviat commented Nov 3, 2025

So #4583 has teardown but not setup. It seems that teardown should not be pub, since once it's called, it's not possible to use the dma again. Then there is dma stop, which clears the dma buffer. My proposed interface is:

  • start: controls aden; does not affect dma
  • clear: clears the dma buffer
  • stop: controls aden; does not affect dma but waits until adc is read.
  • teardown: called on drop

@xoviat xoviat changed the title stm32/adc: update v2 iface to match v3 stm32/adc: merge v2 and v3 ringbuffers Nov 3, 2025
@xoviat
Copy link
Contributor Author

xoviat commented Nov 3, 2025

ping @Jacke-debug

@xoviat xoviat marked this pull request as ready for review November 4, 2025 00:56
@xoviat xoviat added this pull request to the merge queue Nov 4, 2025
Merged via the queue into embassy-rs:main with commit a60768c Nov 4, 2025
8 checks passed
@xoviat xoviat deleted the adc branch November 4, 2025 01:58
@Jacke-debug
Copy link
Contributor

Good that you started working on this @xoviat! I'm mainly waiting for feedback on my own two PRs: #4243 and #4786. The second one includes all changes from the first also but it may be preferable to merge in parts. The second one also has an example that highlights how to use the new contributions from both of them so that example may be a good staring point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants