<div dir="ltr">I am testing out the Raspberry Pi I2C interface by implementing a DS1307 RTC driver. <div><br></div><div>I started with the libchip/rtc/ds1375.c driver, since it is very close to the 1307. </div><div><br></div>
<div>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. </div><div><br></div><div>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?</div>
<div><br></div><div>For example: </div><div>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. </div>
<div><br></div><div>Am I missing any setup here?</div><div><br></div><div>Finally, is RTC the same as TOD for RTEMS?</div><div><br></div><div>Thanks,</div><div>Alan</div></div>