Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split AES API, make non-blocking #13

Merged
merged 4 commits into from Jul 19, 2019
Merged

Split AES API, make non-blocking #13

merged 4 commits into from Jul 19, 2019

Conversation

hannobraun
Copy link
Contributor

@hannobraun hannobraun commented Jul 9, 2019

This splits the AES API into two parts, one for reading, one for writing. This has two advantages:

  • The new API is non-blocking.
  • This paves the way for adding DMA support to the API.

I've kept the previous process method as a convenience wrapper around the new read/write methods.

I'm currently working on adding DMA support to the AES API. This is an in-progress snapshot, but it's already an improvements in itself, so I figured I submit it here, as smaller changes are easier to review and merge.

I have additional commits here, to test on the Tlera Corp Gnat: https://github.com/braun-embedded/stm32l0xx-hal/compare/aes-dma...braun-embedded:aes-gnat

cc @lthiery

hannobraun added 4 commits Jul 9, 2019
As per the discussion in #11[1], specifically this comment by the
maintainer:
#11 (comment)

[1] #11
Revert the AES module to my original formatting, as rustfmt is no longer
mandatory.
I'm currently working on adding DMA support to the AES API. To do that
effectively, I need different structs for AES input and output, but
those can only be available while the AES peripheral is active.

This commit prepares to add those input/output structs, by using a
different struct to represent an active AES peripheral, `CtrStream`.
The input/output structs can then be added to that.
This change is already beneficial on its own, as the new API is
non-blocking. In addition, it paves the way for adding DMA support to
the AES API.

The old blocking API is kept for convenience. It is now implemented as a
wrapper on top of the new API.
@arkorobotics arkorobotics merged commit 0b1f34e into stm32-rs:master Jul 19, 2019
@hannobraun hannobraun deleted the aes-dma branch Jul 22, 2019
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.

None yet

2 participants