MityDSP Documentation Index

MityDSP::tcDspRtcM41T81 Class Reference

Instances of this class handle access to the M41T81 real-time clock chip. More...

#include <core/DspRtcM41T81.h>

Inheritance diagram for MityDSP::tcDspRtcM41T81:
MityDSP::tcDspRtcBase

List of all members.

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.

Detailed Description

Instances of this class handle access to the M41T81 real-time clock chip.

See also:
tcDspRtcM41T81 Page

Constructor & Destructor Documentation

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.

Parameters:
[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.


Member Function Documentation

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.

Returns:
a tsCLTime instance holding the current time.

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.

Parameters:
[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.

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.


  
Generated on Fri Sep 23 16:33:54 2011 for MityDSP Core by  Doxygen Version 1.6.1
Copyright © 2009, Critical Link LLC, All rights reserved.