TOD/RTC questions
Alan Cudmore
alan.cudmore at gmail.com
Thu Aug 28 17:16:14 UTC 2014
I am testing out the Raspberry Pi I2C interface by implementing a DS1307
RTC driver.
I started with the libchip/rtc/ds1375.c driver, since it is very close to
the 1307.
In the Raspberry Pi BSP, I added code to i2c_init.c to create a raw device
node for the RTC device, then I added the tod/todcfg.h similar to the
powerpc/mvme3100 BSP.
Using the test functions I can read and write the device, but is there
anything else I need to do in order to tie it to the RTEMS time functions?
For example:
In the shell ( main_date.c ) , the time() function just returns the 1998
epoch. Also, the shell rtc command ( main_rtc.c ) calls
rtems_clock_get_tod, but returns a error. If I use the RTC command and set
the time, it does try to write to my device and subsequent calls to
rtems_clock_tod do not return an error.
Am I missing any setup here?
Finally, is RTC the same as TOD for RTEMS?
Thanks,
Alan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20140828/49bd11d2/attachment.html>
More information about the devel
mailing list