Help: ICE_GENERAL_CHAINING

DMA Chaining Concepts


When a DMA completes (dma->todo goes to 0), the controller checks the dma->chain field.
If non-zero, the DMA structure's chain related fields are replaced by the values in
the DMACHAIN structure pointed to by dma->chain.  The new DMA will then be processed 
without interrupting the input/output stream.  

The DMACHAIN structure has the following fields:
  
  haddr	- the HOST buffer physical address in words
  hsize	- the HOST buffer physical size in words
  todo	- the number of buffers to process, 
	   or DMA_ONESHOT,DMA_CONTINUOUS,DMA_SPIN
  chain	- pointer to the next DMACHAIN structure

The chain field for the last element in the chain must be zero.  
Users should use the pic_dmachain() routine to populate the chaining registers.
Note that dmafunc(p,dmac,DMA_STATUS) offset values are referenced to the initial buffer start.