Instances of this class handle access to the M41T81 real-time clock chip. More...
#include <core/DspRtcM41T81.h>
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. |
Instances of this class handle access to the M41T81 real-time clock chip.
tcDspRtcM41T81::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.
[in] | apI2C | The tcDspI2c object to use for communication. |
[in] | anAddr | The address of the M41T81 on the I2C bus. |
[in] | anYear | Base year (epoch) for this real-time clock. |
tcDspRtcM41T81::~tcDspRtcM41T81 | ( | ) |
Default Destructor.
tsCLTime tcDspRtcM41T81::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 tcDspRtcM41T81::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 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.
[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.