打印
[STM8]

STM8填写中断向量表的问题

[复制链接]
4752|2
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
showtsy|  楼主 | 2014-4-14 15:12 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
我的开发环境是STVD+COSMIC,现在需要用1号中断AWU,不知中断向量表中该怎么填写中断名称。开发资料上面也给了一些带中断的例程,比如要用定时器1,中断向量表的irq11那一行就填Driver_Time_Interrupt,各位朋友,求交流,求指导。
struct interrupt_vector const _vectab[] = {
        {0x82, (interrupt_handler_t)_stext}, /* reset */
        {0x82, NonHandledInterrupt}, /* trap  */
        {0x82, NonHandledInterrupt}, /* irq0  */
        {0x82, NonHandledInterrupt}, /* irq1  */
        {0x82, NonHandledInterrupt}, /* irq2  */
        {0x82, NonHandledInterrupt}, /* irq3  */
        {0x82, NonHandledInterrupt}, /* irq4  */
        {0x82, NonHandledInterrupt}, /* irq5  */
        {0x82, NonHandledInterrupt}, /* irq6  */
        {0x82, NonHandledInterrupt}, /* irq7  */
        {0x82, NonHandledInterrupt}, /* irq8  */
        {0x82, NonHandledInterrupt}, /* irq9  */
        {0x82, NonHandledInterrupt}, /* irq10 */
        {0x82, Driver_Time_Interrupt}, /* irq11 */
        {0x82, NonHandledInterrupt}, /* irq12 */
        {0x82, NonHandledInterrupt}, /* irq13 */
        {0x82, NonHandledInterrupt}, /* irq14 */
        {0x82, NonHandledInterrupt}, /* irq15 */
        {0x82, NonHandledInterrupt}, /* irq16 */
        {0x82, NonHandledInterrupt}, /* irq17 */
        {0x82, NonHandledInterrupt}, /* irq18 */
        {0x82, NonHandledInterrupt}, /* irq19 */
        {0x82, NonHandledInterrupt}, /* irq20 */
        {0x82, NonHandledInterrupt}, /* irq21 */
        {0x82, NonHandledInterrupt}, /* irq22 */
        {0x82, NonHandledInterrupt}, /* irq23 */
        {0x82, NonHandledInterrupt}, /* irq24 */
        {0x82, NonHandledInterrupt}, /* irq25 */
        {0x82, NonHandledInterrupt}, /* irq26 */
        {0x82, NonHandledInterrupt}, /* irq27 */
        {0x82, NonHandledInterrupt}, /* irq28 */
        {0x82, NonHandledInterrupt}, /* irq29 */
};
沙发
airwill| | 2014-4-14 15:16 | 只看该作者
中断向量表的irq11那一行就填Driver_Time_Interrupt
那么定时器1中断服务函数就是 Driver_Time_Interrupt()

也就是说: 在中断向量表中填入中断函数的名称

使用特权

评论回复
板凳
showtsy|  楼主 | 2014-4-14 15:30 | 只看该作者
airwill 发表于 2014-4-14 15:16
中断向量表的irq11那一行就填Driver_Time_Interrupt
那么定时器1中断服务函数就是 Driver_Time_Interrupt() ...

谢谢!之前改中断名称总是报错是因为声明函数时没有相应改名称,现在解决了!

使用特权

评论回复
发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

2

主题

3

帖子

0

粉丝