The tcDspRtcDS1305 class is a real-time clock class used to keep track of time in increments of seconds, minutes, hours, days and years. It provides functions for converting time formats, as well as getting and setting the current time.
This is a simple example of tcDspRtcDS1305 creation and usage:
{ // Assume a McBSP and OutputLatch object have already been created // (See DspMcbsp.h and OutputLatch.h for details). // Create a tcDspRtc object tcDspRtcDS1305 clock1(myMcBsp, myLatch, latchPin, 2005); // Set the time to May 10, 2005 4:30 PM (16:30 in 24-hour time) clock1.set_time (2005, 5, 10, 16, 30, 0); // Store the current time in a tsCLTime structure tsCLTime current_time = clock1.get_time(); ... }