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

Async API #635

Merged
merged 4 commits into from
Nov 25, 2024
Merged

Async API #635

merged 4 commits into from
Nov 25, 2024

Conversation

jbeaurivage
Copy link
Contributor

@jbeaurivage jbeaurivage commented Oct 24, 2022

Provide APIs to use some peripherals using async/await.

Design summary can be seen here: https://gist.github.com/jbeaurivage/16955c5f002de4c09fdd6c26a30ef59e

HAL features

One new feature is added to the HAL: async

MSRV

This PR bumps the HAL MSRV to rustc 1.75. However everything compiles on stable.

Peripherals implemented

  • Timer/Counter (TC)
  • I2C
  • UART
  • SPI
  • DMAC
  • GPIO interrupts (EIC)

Todo

  • Document everything
  • Find best API for interrupt ownership
  • Convert to new peripheral-feature system, especially brand new modules

Examples

Some examples are provided for feather_m0 (and a few for metro_m4). Some more examples will be added in time, perhaps in a follow-up PR.

Breaking changes

  • The EIC drivers have a slightly new API.
  • Removed wakers for sync dmac::Transfers.

@jbeaurivage jbeaurivage force-pushed the async branch 3 times, most recently from 44e6126 to f6c11cf Compare October 25, 2022 17:00
@jbeaurivage jbeaurivage force-pushed the async branch 5 times, most recently from bf2dd1b to e576e7f Compare November 3, 2022 02:59
@jbeaurivage jbeaurivage force-pushed the async branch 2 times, most recently from 8b5faa7 to 6bf9569 Compare November 13, 2022 20:06
@jbeaurivage jbeaurivage force-pushed the async branch 3 times, most recently from 6d1d419 to 82d24dc Compare October 26, 2023 14:12
@jbeaurivage jbeaurivage marked this pull request as ready for review January 8, 2024 22:08
@jbeaurivage jbeaurivage force-pushed the async branch 4 times, most recently from a14220c to 299e6a9 Compare January 24, 2024 15:58
jbeaurivage added a commit to jbeaurivage/atsamd that referenced this pull request Nov 15, 2024
Adds support for async APIs for the following peripherals:

* SPI
* I2C
* UART
* DMAC
* EIC (external GPIO interrupts)
* Timer/counters

BREAKING CHANGE: Removes support for wakers in
sync `dmac::Transfers`.
jbeaurivage added a commit to jbeaurivage/atsamd that referenced this pull request Nov 15, 2024
jbeaurivage added a commit to jbeaurivage/atsamd that referenced this pull request Nov 15, 2024
Adds support for async APIs for the following peripherals:

* SPI
* I2C
* UART
* DMAC
* EIC (external GPIO interrupts)
* Timer/counters

BREAKING CHANGE: Removes support for wakers in
sync `dmac::Transfers`.
jbeaurivage added a commit to jbeaurivage/atsamd that referenced this pull request Nov 15, 2024
jbeaurivage added a commit to jbeaurivage/atsamd that referenced this pull request Nov 21, 2024
jbeaurivage added a commit to jbeaurivage/atsamd that referenced this pull request Nov 21, 2024
jbeaurivage added a commit to jbeaurivage/atsamd that referenced this pull request Nov 21, 2024
Adds support for async APIs for the following peripherals:

* SPI
* I2C
* UART
* DMAC
* EIC (external GPIO interrupts)
* Timer/counters

BREAKING CHANGE: Removes support for wakers in
sync `dmac::Transfers`.
jbeaurivage added a commit to jbeaurivage/atsamd that referenced this pull request Nov 21, 2024
jbeaurivage added a commit to jbeaurivage/atsamd that referenced this pull request Nov 21, 2024
jbeaurivage added a commit to jbeaurivage/atsamd that referenced this pull request Nov 21, 2024
jbeaurivage added a commit to jbeaurivage/atsamd that referenced this pull request Nov 21, 2024
Adds support for async APIs for the following peripherals:

* SPI
* I2C
* UART
* DMAC
* EIC (external GPIO interrupts)
* Timer/counters

BREAKING CHANGE: Removes support for wakers in
sync `dmac::Transfers`.
jbeaurivage added a commit to jbeaurivage/atsamd that referenced this pull request Nov 21, 2024
Adds support for async APIs for the following peripherals:

* SPI
* I2C
* UART
* DMAC
* EIC (external GPIO interrupts)
* Timer/counters

BREAKING CHANGE: Removes support for wakers in
sync `dmac::Transfers`.
@sajattack sajattack merged commit 47d06ac into atsamd-rs:master Nov 25, 2024
108 checks passed
sajattack pushed a commit that referenced this pull request Nov 25, 2024
sajattack pushed a commit that referenced this pull request Nov 25, 2024
Adds support for async APIs for the following peripherals:

* SPI
* I2C
* UART
* DMAC
* EIC (external GPIO interrupts)
* Timer/counters

BREAKING CHANGE: Removes support for wakers in
sync `dmac::Transfers`.
@github-actions github-actions bot mentioned this pull request Nov 25, 2024
@jbeaurivage jbeaurivage deleted the async branch November 25, 2024 02:02
@kaspar030
Copy link

🎉

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.

3 participants