/* Gets the current transfer size for a uDMA channel control structure. */
unsigned long uDMAChannelSizeGet(unsigned long ulChannelStructIndex)
/* Gets the current transfer size for a uDMA channel control structure. */
unsigned long uDMAChannelSizeGet(unsigned long ulChannelStructIndex)
{
    tDMAControlTable *pControlTable;
    unsigned long ulControl;
    ASSERT((ulChannelStructIndex & 0xffff) < 64);
    ASSERT(HWREG(UDMA_CTLBASE) != 0);
    ulChannelStructIndex &= 0x3f;
    pControlTable = (tDMAControlTable *)HWREG(UDMA_CTLBASE);
    ulControl = (pControlTable[ulChannelStructIndex].ulControl &
                 (UDMA_CHCTL_XFERSIZE_M | UDMA_CHCTL_XFERMODE_M));
    if(ulControl == 0)
    {
        return(0);
    }
    else
    {
        return((ulControl >> 4) + 1);
    }
}