How to set current time to 8xx RTC through Linux application?

Song Sam samlinuxppc at yahoo.com.cn
Fri Jun 11 23:49:10 EST 2004


Graf Alex <alex.graf at siemens.com> wrote£º
> If you did implement the Linux rtc interface, you should be able to
> read/write the time with IOCTLs from your app.
>
> fRtc = open("/dev/rtc", O_RDWR, 0);
> ioctl(fRtc, RTC_RD_TIME, &tm );
> ioctl(fRtc, RTC_SET_TIME, &tm);
>
> Be carefull, System time is NOT equal RTC time! You have to sync it
> periodical.

Thanks for your input.It did make me more flexible to
set RTC.

Best regards,

Sam

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/





More information about the Linuxppc-embedded mailing list