LPCOpen Platform  v1.03
LPCOpen Platform for NXP LPC Microcontrollers
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
gpdma_17xx_40xx.h File Reference

Go to the source code of this file.

Data Structures

struct  DMA_ChannelHandle_t
 DMA channel handle structure. More...
 
struct  DMA_TransferDescriptor_t
 Transfer Descriptor structure typedef. More...
 

Macros

#define GPDMA_NUMBER_CHANNELS   8
 Number of channels on GPDMA.
 
#define GPDMA_BSIZE_1   ((0UL))
 GPDMA Burst size in Source and Destination definitions.
 
#define GPDMA_BSIZE_4   ((1UL))
 
#define GPDMA_BSIZE_8   ((2UL))
 
#define GPDMA_BSIZE_16   ((3UL))
 
#define GPDMA_BSIZE_32   ((4UL))
 
#define GPDMA_BSIZE_64   ((5UL))
 
#define GPDMA_BSIZE_128   ((6UL))
 
#define GPDMA_BSIZE_256   ((7UL))
 
#define GPDMA_WIDTH_BYTE   ((0UL))
 Width in Source transfer width and Destination transfer width definitions.
 
#define GPDMA_WIDTH_HALFWORD   ((1UL))
 
#define GPDMA_WIDTH_WORD   ((2UL))
 
#define DMA_CONTROLLER   0
 Flow control definitions.
 
#define SRC_PER_CONTROLLER   1
 
#define DST_PER_CONTROLLER   2
 

Functions

STATIC INLINE IntStatus Chip_GPDMA_IntGetStatus (LPC_GPDMA_T *pGPDMA, IP_GPDMA_STATUS_T type, uint8_t channel)
 Read the status from different registers according to the type.
 
STATIC INLINE void Chip_GPDMA_ClearIntPending (LPC_GPDMA_T *pGPDMA, IP_GPDMA_STATECLEAR_T type, uint8_t channel)
 Clear the Interrupt Flag from different registers according to the type.
 
STATIC INLINE void Chip_GPDMA_ChannelCmd (LPC_GPDMA_T *pGPDMA, uint8_t channelNum, FunctionalState NewState)
 Enable or Disable the GPDMA Channel.
 
void Chip_GPDMA_Init (LPC_GPDMA_T *pGPDMA)
 Initialize the GPDMA.
 
void Chip_GPDMA_DeInit (LPC_GPDMA_T *pGPDMA)
 Shutdown the GPDMA.
 
void Chip_DMA_Stop (LPC_GPDMA_T *pGPDMA, uint8_t ChannelNum)
 Stop a stream DMA transfer.
 
Status Chip_DMA_Interrupt (LPC_GPDMA_T *pGPDMA, uint8_t ChannelNum)
 The GPDMA stream interrupt status checking.
 
uint8_t Chip_DMA_GetFreeChannel (LPC_GPDMA_T *pGPDMA, uint32_t PeripheralConnection_ID)
 Get a free GPDMA channel for one DMA connection.
 
Status Chip_DMA_Transfer (LPC_GPDMA_T *pGPDMA, uint8_t ChannelNum, uint32_t src, uint32_t dst, IP_GPDMA_FLOW_CONTROL_T TransferType, uint32_t Size)
 Do a DMA transfer M2M, M2P,P2M or P2P.
 
Status Chip_DMA_SGTransfer (LPC_GPDMA_T *pGPDMA, uint8_t ChannelNum, const DMA_TransferDescriptor_t *DMADescriptor, IP_GPDMA_FLOW_CONTROL_T TransferType)
 Do a DMA transfer using linked list of descriptors.
 
Status Chip_DMA_PrepareDescriptor (LPC_GPDMA_T *pGPDMA, DMA_TransferDescriptor_t *DMADescriptor, uint32_t src, uint32_t dst, uint32_t Size, IP_GPDMA_FLOW_CONTROL_T TransferType, const DMA_TransferDescriptor_t *NextDescriptor)
 Prepare a single DMA descriptor.
 
int Chip_DMA_InitChannelCfg (LPC_GPDMA_T *pGPDMA, GPDMA_Channel_CFG_T *GPDMACfg, uint8_t ChannelNum, uint32_t src, uint32_t dst, uint32_t Size, IP_GPDMA_FLOW_CONTROL_T TransferType)
 Initialize channel configuration strucutre.