/* Configure TC77 temperature convertion mode. 
This function is to set and change TC77 temperature convertion mode,you can use TC77_MODE_SHUTDOWN if you want to enter low power consumption condition. And you can use TC77_MODE_CONTINUOUS to switch condition from shutdown mode. */
void TC77Configure(unsigned short usMode)
/* Configure TC77 temperature convertion mode. 
This function is to set and change TC77 temperature convertion mode,you can use TC77_MODE_SHUTDOWN if you want to enter low power consumption condition. And you can use TC77_MODE_CONTINUOUS to switch condition from shutdown mode. */
void TC77Configure(unsigned short usMode)
{
    unsigned short usRead,usWrite;
    xASSERT((usMode == TC77_MODE_CONTINUOUS) || (usMode == TC77_MODE_SHUTDOWN));
    xGPIOSPinWrite(TC77_PIN_SPI_CS, 0);
    xGPIOSPinTypeGPIOInput(TC77_PIN_SPI_MOSI);
    xSPIDataRead(TC77_PIN_SPI_PORT, &usRead, 1);  
    xSPinTypeSPI(TC77_SPI_MOSI, TC77_PIN_SPI_MOSI);
    if(usMode == TC77_MODE_CONTINUOUS)
    {
        usWrite = TC77_MODE_CONTINUOUS;
    }
    else
    {
        usWrite = TC77_MODE_SHUTDOWN;
    }
    xSPIDataWrite(TC77_PIN_SPI_PORT, &usWrite, 1);
    xGPIOSPinWrite(TC77_PIN_SPI_CS, 1);
}