xwrust::xwds::soc

Trait Eirq

source
pub trait Eirq {
    // Required methods
    fn eirq_req(
        &self,
        port: GpioPort,
        pinmsk: XwSq,
        eirq: XwId,
        flag: EirqFlag,
        isr: fn(_: &Self, _: XwId),
    ) -> XwEr;
    fn eirq_rls(&self, port: GpioPort, pinmsk: XwSq, eirq: XwId) -> XwEr;
}
Expand description

SOC的特性:外部GPIO中断

Required Methods§

source

fn eirq_req( &self, port: GpioPort, pinmsk: XwSq, eirq: XwId, flag: EirqFlag, isr: fn(_: &Self, _: XwId), ) -> XwEr

申请外部中断

§参数说明
  • port: GPIO端口,取值 GpioPort
  • pinmsk: GPIO引脚掩码,每一位代表一个引脚,可通过 pin!() 宏生成
  • eirq: 外部中断号
  • flag: 外部中断标志,取值 EirqFlag 的常量组合
  • isr: 中断函数
§错误码
source

fn eirq_rls(&self, port: GpioPort, pinmsk: XwSq, eirq: XwId) -> XwEr

释放外部中断

§参数说明
  • port: GPIO端口,取值 GpioPort
  • pinmsk: GPIO引脚掩码,每一位代表一个引脚,可通过 pin!() 宏生成
  • eirq: 外部中断号
§错误码

Object Safety§

This trait is not object safe.

Implementors§

source§

impl Eirq for Soc