pub trait Chip: Sized {
type Data: PointerWrapper;
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 PointerWrapper>::Borrowed<'_>,
irq_data: &IrqData
);
fn mask(
data: <Self::Data as PointerWrapper>::Borrowed<'_>,
irq_data: &IrqData
);
fn unmask(
_data: <Self::Data as PointerWrapper>::Borrowed<'_>,
irq_data: &IrqData
);
fn set_type(
_data: <Self::Data as PointerWrapper>::Borrowed<'_>,
_irq_data: &mut LockedIrqData,
_flow_type: u32
) -> Result<ExtraResult> { ... }
fn set_wake(
_data: <Self::Data as PointerWrapper>::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
type Data: PointerWrapper
type Data: PointerWrapper
The type of the context data stored in the irq chip and made available on each callback.
Required Associated Constants
const 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
const HAS_UNMASK: bool = false
const HAS_UNMASK: bool = false
Indicates if the unmask
method is overridden by the implementor.
const HAS_SET_TYPE: bool = false
const HAS_SET_TYPE: bool = false
Indicates if the set_type
method is overridden by the implementor.
const HAS_SET_WAKE: bool = false
const HAS_SET_WAKE: bool = false
Indicates if the set_wake
method is overridden by the implementor.
Required Methods
Called at the start of a new interrupt.
Masks an interrupt source.
Provided Methods
fn set_type(
_data: <Self::Data as PointerWrapper>::Borrowed<'_>,
_irq_data: &mut LockedIrqData,
_flow_type: u32
) -> Result<ExtraResult>
fn set_type(
_data: <Self::Data as PointerWrapper>::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
.