Trait Interface

Source
pub trait Interface: DriverGeneric {
    // Required methods
    fn irq_enable(&mut self, irq: IrqId) -> Result<(), IntcError>;
    fn irq_disable(&mut self, irq: IrqId) -> Result<(), IntcError>;
    fn set_priority(
        &mut self,
        irq: IrqId,
        priority: usize,
    ) -> Result<(), IntcError>;
    fn set_trigger(
        &mut self,
        irq: IrqId,
        trigger: Trigger,
    ) -> Result<(), IntcError>;
    fn set_target_cpu(
        &mut self,
        irq: IrqId,
        cpu: CpuId,
    ) -> Result<(), IntcError>;
    fn cpu_local(&self) -> Option<Boxed>;

    // Provided method
    fn parse_dtb_fn(&self) -> Option<FuncFdtParseConfig> { ... }
}

Required Methods§

Source

fn irq_enable(&mut self, irq: IrqId) -> Result<(), IntcError>

Source

fn irq_disable(&mut self, irq: IrqId) -> Result<(), IntcError>

Source

fn set_priority(&mut self, irq: IrqId, priority: usize) -> Result<(), IntcError>

Source

fn set_trigger(&mut self, irq: IrqId, trigger: Trigger) -> Result<(), IntcError>

Source

fn set_target_cpu(&mut self, irq: IrqId, cpu: CpuId) -> Result<(), IntcError>

Source

fn cpu_local(&self) -> Option<Boxed>

Get CPU local interrupt controller, return None if not supported

Provided Methods§

Source

fn parse_dtb_fn(&self) -> Option<FuncFdtParseConfig>

If not supported, returns None

Implementors§