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