pub trait Chip: Sized {
type Data: ForeignOwnable;
const USE_VTABLE_ATTR: ();
const HAS_ACK: bool = false;
const HAS_MASK: bool = false;
const HAS_UNMASK: bool = false;
const HAS_SET_TYPE: bool = false;
const HAS_SET_WAKE: bool = false;
fn ack(
data: <Self::Data as ForeignOwnable>::Borrowed<'_>,
irq_data: &IrqData
);
fn mask(
data: <Self::Data as ForeignOwnable>::Borrowed<'_>,
irq_data: &IrqData
);
fn unmask(
_data: <Self::Data as ForeignOwnable>::Borrowed<'_>,
irq_data: &IrqData
);
fn set_type(
_data: <Self::Data as ForeignOwnable>::Borrowed<'_>,
_irq_data: &mut LockedIrqData,
_flow_type: u32
) -> Result<ExtraResult> { ... }
fn set_wake(
_data: <Self::Data as ForeignOwnable>::Borrowed<'_>,
_irq_data: &IrqData,
_on: bool
) -> Result { ... }
}
Expand description
An irq chip.
It is a trait for the functions defined in struct irq_chip
.
Required Associated Types
sourcetype Data: ForeignOwnable
type Data: ForeignOwnable
The type of the context data stored in the irq chip and made available on each callback.
Required Associated Constants
sourceconst USE_VTABLE_ATTR: ()
const USE_VTABLE_ATTR: ()
A marker to prevent implementors from forgetting to use #[vtable]
attribute when implementing this trait.
Provided Associated Constants
sourceconst HAS_UNMASK: bool = false
const HAS_UNMASK: bool = false
Indicates if the unmask
method is overridden by the implementor.
sourceconst HAS_SET_TYPE: bool = false
const HAS_SET_TYPE: bool = false
Indicates if the set_type
method is overridden by the implementor.
sourceconst HAS_SET_WAKE: bool = false
const HAS_SET_WAKE: bool = false
Indicates if the set_wake
method is overridden by the implementor.
Required Methods
sourcefn ack(data: <Self::Data as ForeignOwnable>::Borrowed<'_>, irq_data: &IrqData)
fn ack(data: <Self::Data as ForeignOwnable>::Borrowed<'_>, irq_data: &IrqData)
Called at the start of a new interrupt.
Provided Methods
sourcefn set_type(
_data: <Self::Data as ForeignOwnable>::Borrowed<'_>,
_irq_data: &mut LockedIrqData,
_flow_type: u32
) -> Result<ExtraResult>
fn set_type(
_data: <Self::Data as ForeignOwnable>::Borrowed<'_>,
_irq_data: &mut LockedIrqData,
_flow_type: u32
) -> Result<ExtraResult>
Sets the flow type of an interrupt.
The flow type is a combination of the constants in Type
.