rdif_def/
irq.rs

1custom_type!(
2    #[doc = "Hardware Interrupt ID"],
3    IrqId, usize, "{:#x}");
4
5/// The trigger configuration for an interrupt.
6#[derive(Copy, Clone, Debug, Eq, PartialEq)]
7pub enum Trigger {
8    EdgeBoth,
9    EdgeRising,
10    EdgeFailling,
11    LevelHigh,
12    LevelLow,
13}
14
15/// The configuration for setup an interrupt.
16#[derive(Debug, Clone)]
17pub struct IrqConfig {
18    pub irq: IrqId,
19    pub trigger: Trigger,
20}