Public Member Functions |
| tcDspRtcM41T81 (tcDspI2c *apI2C, unsigned char anAddr, unsigned int anYear=Y2K) |
| This constructor is used to initialize a DS1305 real-time clock over a specified McBSP interface.
|
| ~tcDspRtcM41T81 () |
| 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.
|
| tcDspRtcBase (unsigned int anEpochYear=Y2K) |
| This constructor is used to initialize the real-time clock base class.
|
virtual | ~tcDspRtcBase () |
| Default Destructor.
|
void | convert_time (unsigned int anYear, unsigned int anMonth, unsigned int anDay, unsigned int anHour, unsigned int anMin, unsigned int anSec, tsCLTime &arTime) |
| This routine converts from discrete year, month, day, hours, minutes and seconds to a tsCLTime value.
|
void | convert_time (tsCLTime asTime, unsigned int &arYear, unsigned int &arMonth, unsigned int &arDay, unsigned int &arHour, unsigned int &arMin, unsigned int &arSec) |
| This routine converts from a tsCLTime value to discrete year, month, day, hours, minutes and seconds.
|
unsigned int | convert_time (tsCLTime asTime) |
| This routine converts from a tsCLTime value to a number of seconds since the start of the current epoch.
|
tsCLTime | convert_time (unsigned int anSecsSinceEpoch) |
| This routine converts from the number of seconds since the start of the current epoch to a tsCLTime value.
|
bool | isLeapYear (unsigned int anYear) |
| This routine determines if the specified year is a leap year.
|
Instances of this class handle access to the M41T81 real-time clock chip.
- See also:
- tcDspRtcM41T81 Page
void tcDspRtcM41T81::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.
- Parameters:
-
[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.