keil_examples/UART/dma.c
/******************************************************************************
** Function name:		DMA_Init
**
** Descriptions:		clock to GPDMA in PCONP, GPDMA init before channel init		
**
** parameters:			None			
** Returned value:		None		
** 
******************************************************************************/
Function name:         DMA_Init
Descriptions:          clock to GPDMA in PCONP, GPDMA init before channel init

None
Returned value:                None
Function name : DMA_Init Descriptions : clock to GPDMA in PCONP GPDMA init before channel init None Returned value : None
void DMA_Init( void )
{
  LPC_SC->PCONP |= (1 << 29);
  LPC_SC->DMAREQSEL = 0x0000;
  LPC_GPDMA->IntTCClear = 0x03;
  LPC_GPDMA->IntErrClr = 0x03;
  LPC_GPDMA->Config = 0x01;	
  while ( !(LPC_GPDMA->Config & 0x01) );
  NVIC_EnableIRQ(DMA_IRQn);
  return;
}
void DMA_Init ( void ) { LPC_SC -> PCONP |= ( 1 << 29 ) ; LPC_SC -> DMAREQSEL = 0x0000 ; LPC_GPDMA -> IntTCClear = 0x03 ; LPC_GPDMA -> IntErrClr = 0x03 ; LPC_GPDMA -> Config = 0x01 ; while ( ! ( LPC_GPDMA -> Config & 0x01 ) ) ; NVIC_EnableIRQ ( DMA_IRQn ) ; return ; }
Function name:         DMA_Init
Descriptions:          clock to GPDMA in PCONP, GPDMA init before channel init
Function name : DMA_Init Descriptions : clock to GPDMA in PCONP GPDMA init before channel init
/* Enable CLOCK into GPDMA controller */ /* Select primary function(UART0/1/2/3) in DMA channels,
  secondary is timer 0/1/2/3. */ /* Enable DMA channels, little endian */