嵌入式开发者社区

标题: C6748 组合中断如何使用 [打印本页]

作者: xiaoluoshan    时间: 2018-7-5 11:18
标题: C6748 组合中断如何使用
本帖最后由 xiaoluoshan 于 2019-1-8 19:46 编辑

你好,有组合中断如何使用,有示例的demo吗?

作者: xiaoluoshan    时间: 2018-7-5 21:24
void HWIInit(void)
{
    // 动态创建硬件中断
    Hwi_Params hwiParams;

    Hwi_Params_init(&hwiParams);
    hwiParams.eventId = SYS_INT_UART1_INT;
    hwiParams.enableInt = true;

    Hwi_create(C674X_MASK_INT6, UART1Isr, &hwiParams, NULL);
}
中断响应正常。

由于中断数量比较多,不可屏蔽中断号不够用,于是我仿照光盘V2.6里sysbios下的Board例程我改成下面,
void HwiInit(void)
{
    Hwi_Params hwiParams;
    Hwi_Params_init(&hwiParams);
   /* UART1 */
    EventCombiner_dispatchPlug(SYS_INT_UART1_INT, &UART1Isr, 1, TRUE);
    UART1InterruptInit();
}





欢迎光临 嵌入式开发者社区 (https://www.51ele.net/) Powered by Discuz! X3.4