keil_examples/ADC/dma.c
/******************************************************************************
** Function name:		DMA_IRQHandler
**
** Descriptions:		DMA interrupt handler
**
** parameters:		None
** Returned value:	None
** 
******************************************************************************/
Function name:         DMA_IRQHandler
Descriptions:          DMA interrupt handler

None
Returned value:        None
Function name : DMA_IRQHandler Descriptions : DMA interrupt handler None Returned value : None
void DMA_IRQHandler(void) 
{
  uint32_t regVal;
  regVal = LPC_GPDMA->IntTCStat;
  if ( regVal )
  {
	DMATCCount++;
	LPC_GPDMA->IntTCClear = regVal;
	if ( regVal & 0x01 )
	{
	  ADCDMA0Done = 1;
	}
	else if ( regVal & 0x02 )
	{
	  ADCDMA1Done = 1;
	}
	LPC_ADC->CR &= ~(0x1<<16);		
  } 
  regVal = LPC_GPDMA->IntErrStat;
  if ( regVal )
  {
	DMAErrCount++;
	LPC_GPDMA->IntErrClr = regVal;
	LPC_ADC->CR &= ~(0x1<<16);		
  }
  return;
}
void DMA_IRQHandler ( void ) { uint32_t regVal ; regVal = LPC_GPDMA -> IntTCStat ; if ( regVal ) { DMATCCount ++ ; LPC_GPDMA -> IntTCClear = regVal ; if ( regVal & 0x01 ) { ADCDMA0Done = 1 ; } else if ( regVal & 0x02 ) { ADCDMA1Done = 1 ; } LPC_ADC -> CR &= ~ ( 0x1 << 16 ) ; } regVal = LPC_GPDMA -> IntErrStat ; if ( regVal ) { DMAErrCount ++ ; LPC_GPDMA -> IntErrClr = regVal ; LPC_ADC -> CR &= ~ ( 0x1 << 16 ) ; } return ; }
Function name:         DMA_IRQHandler
Descriptions:          DMA interrupt handler
Function name : DMA_IRQHandler Descriptions : DMA interrupt handler
/* Disable the BURST mode bit */ /* Disable the BURST mode bit */