/* When reading the value in TC74 registers through I2C0,we can set I2C0 Master transfer setup data structure using this API.  */
unsigned char TC74RegRead(unsigned char ucReg)
/* When reading the value in TC74 registers through I2C0,we can set I2C0 Master transfer setup data structure using this API.  */
unsigned char TC74RegRead(unsigned char ucReg)
{
    xtI2CMasterTransferCfg Cfg;
    unsigned char ucSendBuf[1] = {0};
    unsigned long ulSendLength = 1;
    unsigned char ucReceiveBuf[1] = {0};
    unsigned long ulReceiveLength = 1;
    ucSendBuf[0] = ucReg;
    Cfg.ulSlave = TC74Address;
    Cfg.pvWBuf = ucSendBuf;
    Cfg.ulWLen = ulSendLength;
    Cfg.ulWCount = 0;
    Cfg.pvRBuf = ucReceiveBuf;
    Cfg.ulRLen = ulReceiveLength;
    Cfg.ulRCount = 0;
    I2CMasterTransfer(I2C_BASE, &Cfg, I2C_TRANSFER_POLLING);
    return ucReceiveBuf[0];
}