setting the type of external interrupt!!!!!

本文介绍了intset_irq_type函数用于设置IRQ中断类型的方法。探讨了包括无边沿、上升沿、下降沿、双边沿、低电平及高电平等IRQ类型,并针对非法类型给出了错误提示。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

int set_irq_type(unsigned int irq, unsigned int type) ;

.....................

.....................

..................

.....................

....................

  case IRQT_NOEDGE://type
   

  case IRQT_RISING:
 

  case IRQT_FALLING:
   

  case IRQT_BOTHEDGE:
   

  case IRQT_LOW:
 

  case IRQT_HIGH:

  default:
   printk(KERN_ERR "No such irq type %d", type);
   return -1;

The eCAP module represents one complete capture channel that can be instantiated multiple times, depending on the target device. In the context of this guide, one eCAP channel has the following independent key resources: • Capture inputs can be connected using the Input X-BAR • 256:1 input multiplexer • Output X-BAR is used to configure output in APWM mode • 32-bit time base (counter) • 4 x 32-bit time-stamp capture registers (CAP1-CAP4) • Four-stage sequencer (modulo4 counter) that is synchronized to external events, eCAP pin rising/falling edges. • Modulo counter status register (MODCNTRSTS) to indicate sequencer state • Independent edge polarity (rising/falling edge) selection for all four events • Input capture signal prescaling (from 2-62 or bypass) • One-shot compare register (two bits) to freeze captures after 1-4 time-stamp events • Control for continuous time-stamp captures using a four-deep circular buffer (CAP1-CAP4) scheme • Interrupt capabilities on any of the four capture events • Separate DMA trigger • EALLOW protection to control registers • Signal monitoring capability for edge, pulse width, and period • DMA event generation capability in APWM mode • ADC SOC event generation capability, to trigger ADC conversion 21.3 Configuring Device Pins for the eCAP The Input X-BAR connects the device pins to the module as input. Any GPIO on the device can be configured as an input. The GPIO input qualification can be set to synchronous or asynchronous mode by setting the GPxQSELn register bits. Using synchronized inputs can help with noise immunity but affects the eCAP accuracy by ±2 cycles. The internal pull-ups can be configured in the GPyPUD register. Since the GPIO mode is used, the GPyINV register can invert the signals. New to the Type 1 eCAP module, a 128:1 input multiplexer must also be configured (see Figure 21-3). This multiplexer can select a variety of inputs detailed in Table 21-1 by configuring ECCTL0.INPUTSEL.
最新发布
06-10
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值