/* Read current date/time or alarm date/time from RTC setting. 
The  */
void RTCTimeRead(tTime *tTime, unsigned long ulTimeAlarm)
/* Read current date/time or alarm date/time from RTC setting. 
The  */
void RTCTimeRead(tTime *tTime, unsigned long ulTimeAlarm)
{
    unsigned long ulTemp;
    xASSERT((ulTimeAlarm == RTC_TIME_CURRENT) ||
            (ulTimeAlarm == RTC_TIME_ALARM));
    if(ulTimeAlarm == RTC_TIME_CURRENT)
    {
        ulTemp = xHWREG(RTC_CNT);
        ulTemp += SysCtlBackupRegRead(0);
        xRTCConvertCounterToTime((xtTime *)tTime, ulTemp);
    }
    else
    {
        ulTemp = xHWREG(RTC_CMP);
        ulTemp += SysCtlBackupRegRead(1);
        xRTCConvertCounterToTime((xtTime *)tTime, ulTemp);       
    }
}