Instances of this class handle access to the DS1305 real-time clock chip. More...
#include <core/DspRtcDS1305.h>
Public Member Functions | |
tcDspRtcDS1305 (tcDspMcbsp *apMcbsp, tcDspOutputLatch *apLatch, unsigned int anCSID, unsigned int anYear=Y2K) | |
This constructor is used to initialize a DS1305 real-time clock over a specified McBSP interface. | |
~tcDspRtcDS1305 () | |
Default Destructor. | |
tsCLTime | get_time (unsigned short *apHundredths=NULL) |
This routine reads the current time from the real-time clock and returns it as a 32-bit tsCLTime value. | |
void | set_time (tsCLTime asTime) |
This routine provides an alternate interface to the set_time routine, using a tsCLTime value. | |
void | set_time (unsigned int anYear, unsigned int anMonth, unsigned int anDay, unsigned int anHour, unsigned int anMin, unsigned int anSec) |
This routine sets the current time of the real-time clock using discrete year, month, day, hour, minute and second values. |
Instances of this class handle access to the DS1305 real-time clock chip.
tcDspRtcDS1305::tcDspRtcDS1305 | ( | tcDspMcbsp * | apMcbsp, | |
tcDspOutputLatch * | apLatch, | |||
unsigned int | anCSID, | |||
unsigned int | anYear = Y2K | |||
) |
This constructor is used to initialize a DS1305 real-time clock over a specified McBSP interface.
[in] | apMcbsp | The tcDspMcbsp object to use for communication. |
[in] | apLatch | The tcDspOutputLatch to use for McBSP chip select. |
[in] | anCSID | The chip select ID to use with apLatch. |
[in] | anYear | Base year for this real-time clock. |
tcDspRtcDS1305::~tcDspRtcDS1305 | ( | ) |
Default Destructor.
tsCLTime tcDspRtcDS1305::get_time | ( | unsigned short * | apHundredths = NULL |
) | [virtual] |
This routine reads the current time from the real-time clock and returns it as a 32-bit tsCLTime value.
Implements MityDSP::tcDspRtcBase.
void tcDspRtcDS1305::set_time | ( | tsCLTime | asTime | ) | [virtual] |
This routine provides an alternate interface to the set_time routine, using a tsCLTime value.
[in] | asTime | A tsCLTime structure representing the current time. |
Implements MityDSP::tcDspRtcBase.
void tcDspRtcDS1305::set_time | ( | unsigned int | anYear, | |
unsigned int | anMonth, | |||
unsigned int | anDay, | |||
unsigned int | anHour, | |||
unsigned int | anMin, | |||
unsigned int | anSec | |||
) | [virtual] |
This routine sets the current time of the real-time clock using discrete year, month, day, hour, minute and second values.
The current epoch is updated if required.
[in] | anYear | Current year. |
[in] | anMonth | Current month (1-12). |
[in] | anDay | Current day (0-31). |
[in] | anHour | Current hour in 24-hour time (0-24). |
[in] | anMin | Current Minute (0-60). |
[in] | anSec | Current Seconds (0-60). |
Implements MityDSP::tcDspRtcBase.