/* Set DMA destination PIP configuration used by a HDMA channel.  */
void DMA_DPIPconfiguration(unsigned char channel, unsigned int pipHole, unsigned int pipBoundary)
/* Set DMA destination PIP configuration used by a HDMA channel.  */
void DMA_DPIPconfiguration(unsigned char channel, unsigned int pipHole, unsigned int pipBoundary)
{
    unsigned int value;
    ASSERT(channel < DMA_CHANNEL_NUM, "this channel does not exist");
    value = AT91C_BASE_HDMA->HDMA_CH[channel].HDMA_CTRLB;
    value &= ~ (AT91C_DST_PIP);
    value |= AT91C_DST_PIP;
    AT91C_BASE_HDMA->HDMA_CH[channel].HDMA_CTRLB = value;
    AT91C_BASE_HDMA->HDMA_CH[channel].HDMA_DPIP = (pipHole + 1) | pipBoundary <<16;
}