Skip to content

Commit

Permalink
Remove InterruptNumber
Browse files Browse the repository at this point in the history
  • Loading branch information
bugadani committed Nov 5, 2024
1 parent fd5ac84 commit 48ccda9
Showing 1 changed file with 0 additions and 21 deletions.
21 changes: 0 additions & 21 deletions xtensa-lx/src/interrupt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,6 @@
use core::arch::asm;

/// Trait for enums of external interrupt numbers.
///
/// This trait should be implemented by a peripheral access crate (PAC)
/// on its enum of available external interrupts for a specific device.
/// Each variant must convert to a u16 of its interrupt number,
/// which is its exception number - 16.
///
/// # Safety
///
/// This trait must only be implemented on enums of device interrupts. Each
/// enum variant must represent a distinct value (no duplicates are permitted),
/// and must always return the same value (do not change at runtime).
///
/// These requirements ensure safe nesting of critical sections.
pub unsafe trait InterruptNumber: Copy {
/// Return the interrupt number associated with this variant.
///
/// See trait documentation for safety requirements.
fn number(self) -> u16;
}

/// Disables all interrupts and return the previous settings
#[inline]
pub fn disable() -> u32 {
Expand Down

0 comments on commit 48ccda9

Please sign in to comment.