MityDSP Documentation Index

tcDspClk1305G

Introduction

The tcDspClk1305G class is used to provide access to an adjustable frequency hardware clock, based upon the design found in Appendix G of RFC-1305. The clock provides a value in seconds and nanoseconds. It can be read, set directly to a value, have a frequency adjustment in parts-per-billion added/subtracted, or directly set a frequency offset in PPB.

See also:
MityDSP::tcDspClk1305G Class Reference

Example

This is a simple example of tcDspClk1305G creation and usage:

 {
     unsigned int   myBaseAddr = 0xA0000180;
     unsigned int   now_secs, now_nsecs;
     tcDspClk1305G *myClock;
 
     // create a RFC-1305 clock interface
     myClock = new tcDspClk1305G((void *)myBaseAddr);

     // update the current time to 3600.1s
     myClock->setTime(3600, 100000000);

     // increase the clock frequency by 10,000 parts per billion
     myClock->adjFreq(10000);

     // get the current time
     myClock->getTime(now_secs, now_nsecs);

     ...
 } 

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