Intel386™ EX EMBEDDED MICROPROCESSOR USER’S MANUAL
12-52
InitDMA1ForSSIXmitterToMem Initializes DMA channel1 for transfers between the
SIO transmitter port and memory
DMAInterrupt Interrupt Service Routine for DMA generated
interrupts
See Appendix C for included header files.
#include “80386ex.h”
#include “ev386ex.h”
#include “dma.h”
#include <DOS.h>
#pragma warning(disable:4704) /*Disable optimization warning*/
/*****************************************************************************
EnableDMAHWRequests:
int EnableDMAHWRequests(int nChannel)
Description:
Enables channel hardware requests for the given DMA channel.
Parameters:
nChannel --channel to enable hardware requests
Returns:
Error Code
Assumptions:
None
Syntax:
int error_code;
error_code = EnableDMAHWRequests (DMA_Channel0);
Real/Protected Mode:
No changes required
*****************************************************************************/
int EnableDMAHWRequests(int nChannel)
{
BYTE regDMAMSK = 0; /*Clear regDMAMSK[HRM]*/
/*Check input*/
if ( (nChannel != DMA_Channel0) && (nChannel != DMA_Channel1) )
return ERR_BADINPUT;
regDMAMSK = nChannel; /*Set regDMAMSK[CS] to channel*/
_SetEXRegByte(DMAMSK, regDMAMSK); /*Clear hardware request mask for*/