📄 _csl_intccombeventdispatcher.c
字号:
/* ============================================================================
* 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_intcCombEventDispatcher.c
*
* @brief File for functional layer of CSL API @a _CSL_intcEvent0Dispatcher()
*
* 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_intcEvent0Dispatcher, ".text:csl_section:intc");
interrupt
void _CSL_intcEvent0Dispatcher(
void
)
{
volatile CSL_BitMask32 evtRcv;
Uint32 evtId, evtMask ;
evtRcv = ((CSL_IntcRegsOvly)CSL_INTC_REGS)->MEVTFLAG[0];
while (evtRcv) {
/* Clear the events */
((CSL_IntcRegsOvly)CSL_INTC_REGS)->EVTCLR[0] = evtRcv ;
evtMask = 1<<4;
evtId = 4;
evtRcv &= ~(0xF);
do {
if (evtRcv & evtMask) {
if (_CSL_intcEventOffsetMap[evtId] != CSL_INTC_MAPPED_NONE)
_CSL_intcEventHandlerRecord \
[_CSL_intcEventOffsetMap[evtId]].handler ( \
_CSL_intcEventHandlerRecord \
[_CSL_intcEventOffsetMap[evtId]].arg);
evtRcv &= ~evtMask;
}
evtMask = evtMask << 1;
evtId++;
} while (evtRcv);
/* Read the MEVTFLAG[0] register */
evtRcv = ((CSL_IntcRegsOvly)CSL_INTC_REGS)->MEVTFLAG[0];
}
}
#pragma CODE_SECTION (_CSL_intcEvent1Dispatcher, ".text:csl_section:intc");
interrupt
void _CSL_intcEvent1Dispatcher(
void
)
{
volatile CSL_BitMask32 evtRcv;
Uint32 evtId, evtMask ;
/* Read the MEVTFLAG[0] register */
evtRcv = ((CSL_IntcRegsOvly)CSL_INTC_REGS)->MEVTFLAG[1];
while (evtRcv) {
/* Clear the events */
((CSL_IntcRegsOvly)CSL_INTC_REGS)->EVTCLR[1] = evtRcv ;
evtId = 32;
evtMask = 1;
do {
if (evtRcv & evtMask) {
if (_CSL_intcEventOffsetMap[evtId] != CSL_INTC_MAPPED_NONE)
_CSL_intcEventHandlerRecord \
[_CSL_intcEventOffsetMap[evtId]].handler ( \
_CSL_intcEventHandlerRecord \
[_CSL_intcEventOffsetMap[evtId]].arg);
evtRcv &= ~evtMask;
}
evtMask = evtMask << 1;
evtId++;
} while (evtRcv);
/* Read the MEVTFLAG[1] register */
evtRcv = ((CSL_IntcRegsOvly)CSL_INTC_REGS)->MEVTFLAG[1];
}
}
#pragma CODE_SECTION (_CSL_intcEvent2Dispatcher, ".text:csl_section:intc");
interrupt
void _CSL_intcEvent2Dispatcher(
void
)
{
volatile CSL_BitMask32 evtRcv;
Uint32 evtId, evtMask ;
/* Read the MEVTFLAG[2] register */
evtRcv = ((CSL_IntcRegsOvly)CSL_INTC_REGS)->MEVTFLAG[2];
while (evtRcv) {
/* Clear the events */
((CSL_IntcRegsOvly)CSL_INTC_REGS)->EVTCLR[2] = evtRcv ;
evtId = 64;
evtMask = 1;
do {
if (evtRcv & evtMask) {
if (_CSL_intcEventOffsetMap[evtId] != CSL_INTC_MAPPED_NONE)
_CSL_intcEventHandlerRecord \
[_CSL_intcEventOffsetMap[evtId]].handler ( \
_CSL_intcEventHandlerRecord \
[_CSL_intcEventOffsetMap[evtId]].arg);
evtRcv &= ~evtMask;
}
evtMask = evtMask << 1;
evtId++;
} while (evtRcv);
/* Read the MEVTFLAG[2] register */
evtRcv = ((CSL_IntcRegsOvly)CSL_INTC_REGS)->MEVTFLAG[2];
}
}
#pragma CODE_SECTION (_CSL_intcEvent3Dispatcher, ".text:csl_section:intc");
interrupt
void _CSL_intcEvent3Dispatcher(
void
)
{
volatile CSL_BitMask32 evtRcv;
Uint32 evtId, evtMask ;
/* Read the MEVTFLAG[3] register */
evtRcv = ((CSL_IntcRegsOvly)CSL_INTC_REGS)->MEVTFLAG[3];
while (evtRcv) {
/* Clear the events */
((CSL_IntcRegsOvly)CSL_INTC_REGS)->EVTCLR[3] = evtRcv ;
evtId = 96;
evtMask = 1;
do {
if (evtRcv & evtMask) {
if (_CSL_intcEventOffsetMap[evtId] != CSL_INTC_MAPPED_NONE)
_CSL_intcEventHandlerRecord \
[_CSL_intcEventOffsetMap[evtId]].handler ( \
_CSL_intcEventHandlerRecord
[_CSL_intcEventOffsetMap[evtId]].arg);
evtRcv &= ~evtMask;
}
evtMask = evtMask << 1;
evtId++;
} while (evtRcv);
/* Read the MEVTFLAG[3] register */
evtRcv = ((CSL_IntcRegsOvly)CSL_INTC_REGS)->MEVTFLAG[3];
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -