/* Please consult the Stellaris data sheet for a table showing all the possible peripheral assignments for the uDMA channels for a particular device. */
void uDMAChannelAssign(unsigned long ulMapping)
/* Please consult the Stellaris data sheet for a table showing all the possible peripheral assignments for the uDMA channels for a particular device. */
void uDMAChannelAssign(unsigned long ulMapping)
{
    unsigned long ulMapReg;
    unsigned long ulMapShift;
    unsigned long ulChannelNum;
    ASSERT((ulMapping & 0xffffff00) < 0x00050000);
    ASSERT(!CLASS_IS_SANDSTORM);
    ASSERT(!CLASS_IS_FURY);
    ASSERT(!CLASS_IS_DUSTDEVIL);
    ASSERT(!CLASS_IS_TEMPEST);
    ASSERT(!CLASS_IS_FIRESTORM);
    ulChannelNum = ulMapping & 0xff;
    ulMapping = ulMapping >> 16;
    ulMapReg = UDMA_CHMAP0 + ((ulChannelNum / 8) * 4);
    ulMapShift = (ulChannelNum % 8) * 4;
    HWREG(ulMapReg) = (HWREG(ulMapReg) & ~(0xf << ulMapShift)) |
                      ulMapping << ulMapShift;
}