Skip to content

asynchronous/embassy: Introduce separate interrupt receiver struct#100

Open
RobertZ2011 wants to merge 2 commits intoOpenDevicePartnership:v0.2.0from
RobertZ2011:interrupt-receiver
Open

asynchronous/embassy: Introduce separate interrupt receiver struct#100
RobertZ2011 wants to merge 2 commits intoOpenDevicePartnership:v0.2.0from
RobertZ2011:interrupt-receiver

Conversation

@RobertZ2011
Copy link
Copy Markdown
Contributor

@RobertZ2011 RobertZ2011 commented Apr 14, 2026

Create a struct to allow waiting for interrupts without needing to block the core controller object. Move interrupt related code into its own module.

@RobertZ2011 RobertZ2011 self-assigned this Apr 14, 2026
Copilot AI review requested due to automatic review settings April 14, 2026 18:46
@RobertZ2011 RobertZ2011 force-pushed the interrupt-receiver branch 2 times, most recently from 6b4878d to 6957b14 Compare April 14, 2026 18:47
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 14, 2026

Cargo Vet Audit Passed

cargo vet has passed in this PR. No new unvetted dependencies were found.

@RobertZ2011 RobertZ2011 changed the title Interrupt receiver asynchronous/embassy: Introduce separate interrupt receiver struct Apr 14, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Refactors the Embassy async interrupt handling by splitting interrupt processing and interrupt waiting into dedicated types, and updates examples/MSRV accordingly.

Changes:

  • Extracted interrupt logic into a new src/asynchronous/embassy/interrupt.rs module with InterruptProcessor and InterruptReceiver.
  • Updated Embassy controller/task APIs and examples to use InterruptProcessor, and introduced create_interrupt_receiver() for waiting on interrupts.
  • Bumped MSRV to Rust 1.90, updated CI MSRV check, and added embassy-futures for yielding support.

Reviewed changes

Copilot reviewed 4 out of 8 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
src/asynchronous/embassy/task.rs Updates interrupt task to operate on InterruptProcessor instances.
src/asynchronous/embassy/mod.rs Replaces old Interrupt type with InterruptProcessor, adds create_interrupt_receiver(), and adjusts command waiting.
src/asynchronous/embassy/interrupt.rs New module containing interrupt processing, guarded interrupt enable, and interrupt receiving/waiting logic + tests.
examples/rt685s-evk/src/bin/plug_status.rs Uses InterruptProcessor for the IRQ task and InterruptReceiver for waiting on plug events.
examples/rt685s-evk/src/bin/fw_update.rs Updates IRQ task to accept InterruptProcessor.
examples/rt685s-evk/Cargo.lock Dependency lock updates (Embassy ecosystem + related crates).
examples/rt685s-evk/.cargo/config.toml Changes default DEFMT_LOG level to trace.
Cargo.toml Bumps rust-version to 1.90 and adds optional embassy-futures under the embassy feature.
Cargo.lock Adds embassy-futures to the lockfile.
.github/workflows/check.yml Updates the MSRV matrix to 1.90.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/asynchronous/embassy/mod.rs Outdated
Comment thread src/asynchronous/embassy/interrupt.rs Outdated
Comment thread src/asynchronous/embassy/interrupt.rs
Comment thread src/asynchronous/embassy/interrupt.rs Outdated
Comment thread src/asynchronous/embassy/interrupt.rs Outdated
Comment thread src/asynchronous/embassy/interrupt.rs Outdated
Comment thread src/asynchronous/embassy/interrupt.rs Outdated
Comment thread src/asynchronous/embassy/interrupt.rs
Copilot AI review requested due to automatic review settings April 14, 2026 20:29
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 8 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/asynchronous/embassy/mod.rs Outdated
Comment thread src/asynchronous/embassy/interrupt.rs Outdated
Copilot AI review requested due to automatic review settings April 14, 2026 20:40
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 6 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/asynchronous/embassy/interrupt.rs Outdated
Copilot AI review requested due to automatic review settings April 14, 2026 21:30
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 5 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/asynchronous/embassy/interrupt.rs
Comment thread src/asynchronous/embassy/mod.rs Outdated
Create a struct to allow waiting for interrupts without needing to block
the core controller object. Move interrupt related code into its own
module.
@RobertZ2011 RobertZ2011 changed the base branch from main to v0.2.0 April 14, 2026 22:05
@RobertZ2011 RobertZ2011 marked this pull request as ready for review April 14, 2026 22:11
@RobertZ2011 RobertZ2011 requested a review from a team as a code owner April 14, 2026 22:11
@RobertZ2011 RobertZ2011 requested review from asasine and gjpmsft April 14, 2026 22:11
jerrysxie
jerrysxie previously approved these changes Apr 16, 2026
Comment thread src/asynchronous/embassy/interrupt.rs Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants