_csl_intcdispatcher.c

来自「TI达芬奇dm644x各硬件模块测试代码」· C语言 代码 · 共 56 行

C
56
字号
/*  ============================================================================
 *   Copyright (c) Texas Instruments Inc 2002, 2003, 2004, 2005                 
 *                                                                              
 *   Use of this software is controlled by the terms and conditions found in the
 *   license agreement under which this software has been supplied.             
 *   ===========================================================================
 */

/**
 *  @file  _csl_intcDispatcher.c
 *
 *  @brief  File for functional layer of CSL API @a _CSL_intcDispatcherInit(..)
 *
 *  Description
 *  - _CSL_intcDispatcherInit(..) function definition
 *
 *  PATH  \\(CSLPATH)\\soc\\davinci\\c64plus\\src\\intc
 *
 *  @date 12th June, 2004
 *  @author Ruchika Kharwar
 *
 */

#include <csl_intc.h>
#include <_csl_intc.h>
#include <csl_intcAux.h>


#pragma CODE_SECTION (_CSL_intcDispatcher, ".text:csl_section:intc");
interrupt
void    _CSL_intcDispatcher(
            void
)
{
    Uint32 intrId = (_CSL_intcCpuIntrTable.currentVectId - (Uint32)(&_CSL_intcCpuIntrTable) - 4)/4;
    Uint32 evtId;
    
    /* Get the Event Source of the Interrupt */
    if (intrId < 8) 
        evtId = CSL_FEXTR(((CSL_IntcRegsOvly)CSL_INTC_REGS)->INTMUX1, \
                           (intrId-4)*8+6,(intrId-4)*8);
    else {
    	if (intrId < 12) 
            evtId = CSL_FEXTR(((CSL_IntcRegsOvly)CSL_INTC_REGS)->INTMUX2, \
                               (intrId-8)*8+6,(intrId-8)*8);
    	else 
            evtId = CSL_FEXTR(((CSL_IntcRegsOvly)CSL_INTC_REGS)->INTMUX3,
                               (intrId-12)*8+6,(intrId-12)*8);
    	}
   		if (_CSL_intcEventOffsetMap[evtId] != CSL_INTC_MAPPED_NONE) 
                    _CSL_intcEventHandlerRecord \
                                [_CSL_intcEventOffsetMap[evtId]].handler ( \
                    _CSL_intcEventHandlerRecord \
                                [_CSL_intcEventOffsetMap[evtId]].arg);
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?