Hi Chris --
--- In chris duran <> wrote:
>
> Hi Guys
> I have a ts-7250 with RTC (M48T86) working ok, but I need to write an
> aplication that considers the RTC's battery-status. Are there any way to get
> that information directly from the driver?
You can read Bit 7 of Register D (I think, see the data sheet). But you still
only get a binary answer (ie, time is valid or invalid). If the battery
voltage was brought out, you could hook up one of the built-in A/Ds and take a
reading, but it's not exposed AFAIK.
> Now I read the status with open("/proc/driver/rtc", "r"), and parse the
> result, but I supose that there is another way to do that.
Yes, but why? It's already done for you by the kernel, and a userspace read
could interfere with a kernel clock update. I guess if you have a *very* small
system, and want to get rid of /proc filesystem,...
regards, ......... Charlie
>
> Thanks in advance.
>
> --
> Best regards,
> Chris
>
------------------------------------
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/ts-7000/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/ts-7000/join
(Yahoo! ID required)
<*> To change settings via email:
<*> To unsubscribe from this group, send an email to:
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|