/* This will enable DMA operation of the I2C block. */
void I2CDMAEnable(unsigned long ulBase, unsigned long ulDMALast)
/* This will enable DMA operation of the I2C block. */
void I2CDMAEnable(unsigned long ulBase, unsigned long ulDMALast)
{
    unsigned long ultmpreg = 0;
    xASSERT((ulBase == I2C1_BASE) || (ulBase == I2C2_BASE));
    ultmpreg =   xHWREG(ulBase + I2C_CR2);
    ultmpreg |=  I2C_CR2_DMAEN;
    ultmpreg &= ~I2C_CR2_LAST;
    ultmpreg |=  ulDMALast;
    xHWREG(ulBase + I2C_CR2) = ultmpreg;
}