Intel 386 Manuale Utente Pagina 393

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 691
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 392
Intel386™ EX EMBEDDED MICROPROCESSOR USERS MANUAL
12-58
Syntax:
InitDMA(); //Initialize DMA peripheral
Real/Protected Mode:
No changes required
*****************************************************************************/
void InitDMA(void)
{
_SetEXRegByte(DMACLR, 0x0); /*Resets DMA peripheral*/
_SetEXRegByte(DMACMD1, 0x0); /*DMACMD1[7:5]=0: reserved*/
/*DMACMD1[4]=0: disable priority rotation*/
/* enable*/
/*DMACMD1[2]=0: enable channel’s 0 and 1*/
/*DMACMD1[1:0]=0: reserved*/
_SetEXRegByte(DMACMD2, 0x8); /*DMACMD2[7:4]=0: reserved*/
/*DMACMD2[3:2]=2: assign HOLD to the lowest*/
/* priority level*/
/*DMACMD2[1]=0: EOP# samples input async.*/
/*DMACMD2[0]=0: DRQn samples input async.*/
}
/*****************************************************************************
InitDMA1ForSSIXmitterToMem:
Description:
This function prepares DMA channel 1 for transfers between the async.
serial port transmitter (channel 0) and memory. After calling this
function, a DMA transfer can be initiated by setting the Target address,
setting the transfer count, and clearing the hardware request mask
for this DMA channel.
Parameters:
None
Returns:
None
Assumptions:
InitDMA() has been called to enable the peripheral.
Syntax:
static char lpsz[]=”Hello World”;
InitDMA(); //Initialize DMA peripheral
InitDMA1ForSerialXmitter(); //Initialize DMA channel 1
.
.
Vedere la pagina 392
1 2 ... 388 389 390 391 392 393 394 395 396 397 398 ... 690 691

Commenti su questo manuale

Nessun commento