/* Send a master data receive request when the master have obtained control of the bus.(Write Step2) 
For this function returns immediately, it is always using in the interrupt hander. */
void I2CMasterReadRequestS2(unsigned long ulBase, xtBoolean bEndTransmition)
/* Send a master data receive request when the master have obtained control of the bus.(Write Step2) 
For this function returns immediately, it is always using in the interrupt hander. */
void I2CMasterReadRequestS2(unsigned long ulBase, xtBoolean bEndTransmition)
{
    unsigned long ulStatus;
    xASSERT((ulBase == I2C0_BASE));
    if(bEndTransmition)
    {
        xHWREG(ulBase + I2C_CR) &= ~I2C_CR_AA;
        do
        {
            ulStatus = I2CStatusGet(ulBase);  
            if(xHWREG(ulBase + I2C_CSR) & 0x0700)
                break;
        }
        while(!(ulStatus == I2C_MASTER_RX_NOT_EMPTY));
        I2CStopSend(ulBase);
    }     
}