12-61
DMA CONTROLLER
None
Syntax:
regDMAIE = _GetEXRegByte(DMAIEN) | 0x2; //Enable tc interrupt for
// channel 0
_SetEXRegByte(DMAIEN, regDMAIE);
//Set interrupt routine
SetIRQVector(DMAInterrupt, 12, INTERRUPT_ISR);
Enable8259Interrupt(0, IR4); //Enable slave IR4, DMA interrupt
NonSpecificEOI(); //Clear all interrupts
Real/Protected Mode:
No changes required
*****************************************************************************/
void interrupt far DMAInterrupt(void)
{
WORD regDMAIS;
regDMAIS = _GetEXRegByte(DMAIS); /*Get interrupt status register*/
if (regDMAIS & 0x10)
{ /*Transfer Complete, channel 0*/
_SetEXRegByte(DMACLRTC, 0x00); /*Clear transfer complete signal*/
}
if (regDMAIS & 0x20)
{ /*Transfer Complete, channel 1*/
_SetEXRegByte(DMACLRTC, 0x00); /*Clear transfer complete signal*/
}
if (regDMAIS & 0x1)
{ /*Chaining Interrupt, channel 0*/
}
if (regDMAIS & 0x2)
{ /*Chaining Interrupt, channel 1*/
}
NonSpecificEOI(); /*Send End-Of-Interrupt Signal to Master/Slave*/
}