Skip to content

Use NotificationBits in Idol#2233

Merged
mkeeter merged 1 commit into
masterfrom
mkeeter/notification-bits-idol
Sep 19, 2025
Merged

Use NotificationBits in Idol#2233
mkeeter merged 1 commit into
masterfrom
mkeeter/notification-bits-idol

Conversation

@mkeeter

@mkeeter mkeeter commented Sep 17, 2025

Copy link
Copy Markdown
Collaborator

This is mostly mechanical, with one logical change: I removed the timer from medusa-seq-server, because it wasn't doing anything.

Requires oxidecomputer/idolatry#69 and staged on top of #2232

Comment thread Cargo.toml Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates the NotificationHandler trait implementations across the codebase to use the new NotificationBits type instead of raw u32 values. The change provides type safety and better APIs for notification handling.

  • Replaces raw u32 notification bits with userlib::NotificationBits type
  • Updates notification bit checking to use new type-safe methods like is_timer_set() and is_set_unconditional()
  • Removes unused timer functionality from medusa-seq-server

Reviewed Changes

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

Show a summary per file
File Description
Multiple task/drv files Update handle_notification method signatures to use NotificationBits
sys/userlib/src/lib.rs Add new methods to NotificationBits type for convenient bit checking
drv/medusa-seq-server/src/main.rs Remove timer-related code that wasn't being used
task/host-sp-comms/src/main.rs Mix of new API usage and raw bits access for timer handling
Cargo.toml Update idolatry dependencies to use feature branch

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread drv/transceivers-server/src/main.rs Outdated
Comment thread drv/stm32h7-fmc-demo-server/src/main.rs Outdated
Comment thread drv/cosmo-seq-server/src/main.rs Outdated
Comment thread task/dump-agent/src/main.rs
@mkeeter
mkeeter force-pushed the mkeeter/notification-bits-idol branch 2 times, most recently from 879286c to e572a5a Compare September 17, 2025 15:23
@mkeeter
mkeeter force-pushed the mkeeter/notification-bits-type branch from 0e2977a to db707eb Compare September 17, 2025 18:01
@mkeeter
mkeeter force-pushed the mkeeter/notification-bits-idol branch from e572a5a to 846641d Compare September 17, 2025 18:04
@mkeeter
mkeeter force-pushed the mkeeter/notification-bits-type branch from db707eb to 5f2cd34 Compare September 17, 2025 18:04
@mkeeter
mkeeter force-pushed the mkeeter/notification-bits-idol branch from 846641d to 70d84fe Compare September 17, 2025 18:06
@mkeeter
mkeeter force-pushed the mkeeter/notification-bits-type branch 2 times, most recently from 4dae22b to d618c40 Compare September 17, 2025 18:08
@mkeeter
mkeeter force-pushed the mkeeter/notification-bits-idol branch from 70d84fe to 1ab0600 Compare September 17, 2025 18:12
@mkeeter
mkeeter force-pushed the mkeeter/notification-bits-type branch from d618c40 to 737af5f Compare September 17, 2025 18:12
@mkeeter
mkeeter force-pushed the mkeeter/notification-bits-idol branch from 1ab0600 to 1649070 Compare September 17, 2025 18:20
@mkeeter
mkeeter force-pushed the mkeeter/notification-bits-type branch from 737af5f to fb69232 Compare September 17, 2025 18:20
@mkeeter
mkeeter force-pushed the mkeeter/notification-bits-idol branch from 1649070 to 9e5e7ef Compare September 17, 2025 18:22
@mkeeter
mkeeter force-pushed the mkeeter/notification-bits-type branch from 3f913aa to e86c0c1 Compare September 17, 2025 19:36
@mkeeter
mkeeter force-pushed the mkeeter/notification-bits-idol branch 2 times, most recently from 3cfc21b to eaedd40 Compare September 17, 2025 19:55
@mkeeter
mkeeter force-pushed the mkeeter/notification-bits-type branch from e86c0c1 to b0cc370 Compare September 19, 2025 12:23
Base automatically changed from mkeeter/notification-bits-type to master September 19, 2025 12:34
@mkeeter
mkeeter force-pushed the mkeeter/notification-bits-idol branch 3 times, most recently from b91ad4a to c2dcd77 Compare September 19, 2025 13:13

@cbiffle cbiffle left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks good!

Comment thread Cargo.toml Outdated
Comment thread drv/lpc55-swd/src/main.rs
}

if (bits & notifications::TIMER_MASK) != 0 {
if bits.has_timer_fired(notifications::TIMER_MASK) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This is technically a functionality change, since it looks like I missed this code when adding the timer checks. But I think the result is correct.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

IIRC you intentionally skipped it because I was also messing with stuff in #2228 😄

@mkeeter
mkeeter force-pushed the mkeeter/notification-bits-idol branch from c2dcd77 to bc60ff2 Compare September 19, 2025 17:13
@mkeeter
mkeeter marked this pull request as ready for review September 19, 2025 17:15
@mkeeter
mkeeter enabled auto-merge (squash) September 19, 2025 17:15
@mkeeter
mkeeter merged commit caf0cd8 into master Sep 19, 2025
135 checks passed
@mkeeter
mkeeter deleted the mkeeter/notification-bits-idol branch September 19, 2025 17:23
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