uclinux-2008R1-RC8(bf561)到VDSP5的移植(40):中断优先级

本文介绍了在嵌入式系统中如何通过定义特定宏来配置不同类型的中断优先级,涉及SPI、DMA、定时器等多种中断源。
 
  
在内核中,对64个外部中断的优先级的控制是通过CONFIG_IRQ_*这样的宏来控制的,因此我们需要在config.h中加上对这些宏的定义,60-63这四个中断保留,因而没有定义。
// 中断优先级控制
 
#define CONFIG_IRQ_SPI_ERROR 7
#define CONFIG_IRQ_DMA1_ERROR 7
#define CONFIG_IRQ_DMA2_ERROR 7
#define CONFIG_IRQ_PPI0_ERROR 7
#define CONFIG_IRQ_PPI1_ERROR 7
#define CONFIG_IRQ_UART_ERROR 7
#define CONFIG_IRQ_RESERVED_ERROR 7
#define CONFIG_IRQ_IMDMA_ERROR 7
#define CONFIG_IRQ_SPORT0_ERROR 7
#define CONFIG_IRQ_SPORT1_ERROR 7
#define CONFIG_IRQ_PLL_WAKEUP 7
 
#define CONFIG_IRQ_DMA1_WRRD0 8
#define CONFIG_IRQ_DMA1_WRRD1 8
#define CONFIG_IRQ_DMA1_0 8
#define CONFIG_IRQ_DMA1_1 8
#define CONFIG_IRQ_DMA1_2 8
#define CONFIG_IRQ_DMA1_3 8
#define CONFIG_IRQ_DMA1_4 8
#define CONFIG_IRQ_DMA1_5 8
#define CONFIG_IRQ_DMA1_6 8
#define CONFIG_IRQ_DMA1_7 8
#define CONFIG_IRQ_DMA1_8 8
#define CONFIG_IRQ_DMA1_9 8
#define CONFIG_IRQ_DMA1_10 8
#define CONFIG_IRQ_DMA1_11 8
 
#define CONFIG_IRQ_DMA2_WRRD0 9
#define CONFIG_IRQ_DMA2_WRRD1 9
#define CONFIG_IRQ_DMA2_0 9
#define CONFIG_IRQ_DMA2_1 9
#define CONFIG_IRQ_DMA2_2 9
#define CONFIG_IRQ_DMA2_3 9
#define CONFIG_IRQ_DMA2_4 9
#define CONFIG_IRQ_DMA2_5 9
#define CONFIG_IRQ_DMA2_6 9
#define CONFIG_IRQ_DMA2_7 9
#define CONFIG_IRQ_DMA2_8 9
#define CONFIG_IRQ_DMA2_9 9
#define CONFIG_IRQ_DMA2_10 9
#define CONFIG_IRQ_DMA2_11 9
 
#define CONFIG_IRQ_TIMER0 10
#define CONFIG_IRQ_TIMER1 10
#define CONFIG_IRQ_TIMER2 10
#define CONFIG_IRQ_TIMER3 10
#define CONFIG_IRQ_TIMER4 10
#define CONFIG_IRQ_TIMER5 10
#define CONFIG_IRQ_TIMER6 10
#define CONFIG_IRQ_TIMER7 10
#define CONFIG_IRQ_TIMER8 10
#define CONFIG_IRQ_TIMER9 10
#define CONFIG_IRQ_TIMER10 10
#define CONFIG_IRQ_TIMER11 10
 
#define CONFIG_IRQ_PROG0_INTA 11
#define CONFIG_IRQ_PROG1_INTA 11
#define CONFIG_IRQ_PROG2_INTA 11
#define CONFIG_IRQ_PROG0_INTB 11
#define CONFIG_IRQ_PROG1_INTB 11
#define CONFIG_IRQ_PROG2_INTB 11
 
#define CONFIG_IRQ_IMDMA_WRRD0 12
#define CONFIG_IRQ_IMDMA_WRRD1 12
 
#define CONFIG_IRQ_WDTIMER 13
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

嵌云阁主

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值