/* Configure TC72 temperature convertion mode. 
This function is to set and change TC72 temperature convertion mode,you can use TC72_MODE_SHUTDOWN if you want to enter low power consumption condition. And you can use TC72_MODE_CONTINUOUS or TC72_MODE_ONESHOT to switch condition from shutdown mode. */
void TC72Configure(unsigned char ucMode)
/* Configure TC72 temperature convertion mode. 
This function is to set and change TC72 temperature convertion mode,you can use TC72_MODE_SHUTDOWN if you want to enter low power consumption condition. And you can use TC72_MODE_CONTINUOUS or TC72_MODE_ONESHOT to switch condition from shutdown mode. */
void TC72Configure(unsigned char ucMode)
{
    unsigned char ucWrite = 0;
    xASSERT((ucMode == TC72_MODE_CONTINUOUS) || (ucMode == TC72_MODE_SHUTDOWN)
                                             || (ucMode == TC72_MODE_ONESHOT));
    xGPIOSPinWrite(TC72_PIN_SPI_CS, 1);
    ucWrite = TC72_CONTROL_WRITE_REG;
    xSPIDataWrite(TC72_PIN_SPI_PORT, &ucWrite, 1);
    if(ucMode == TC72_MODE_CONTINUOUS)
    {
        ucWrite = TC72_MODE_CONTINUOUS;
    }       
    else if(ucMode == TC72_MODE_SHUTDOWN)
    {
    	ucWrite = TC72_MODE_SHUTDOWN;    }
    else
    {
    	ucWrite = TC72_MODE_ONESHOT;        }
    xSPIDataWrite(TC72_PIN_SPI_PORT, &ucWrite, 1);
    xGPIOSPinWrite(TC72_PIN_SPI_CS, 0);
}