/* Gets the transfer mode for a uDMA channel control structure. */
uint32_t uDMAChannelModeGet(uint32_t ui32ChannelStructIndex)
/* Gets the transfer mode for a uDMA channel control structure. */
uint32_t uDMAChannelModeGet(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_XFERMODE_M);
    if(((ui32Control & ~UDMA_MODE_ALT_SELECT) ==
        UDMA_MODE_MEM_SCATTER_GATHER) ||
       ((ui32Control & ~UDMA_MODE_ALT_SELECT) == UDMA_MODE_PER_SCATTER_GATHER))
    {
        ui32Control &= ~UDMA_MODE_ALT_SELECT;
    }
    return(ui32Control);
}