ts-7000
[Top] [All Lists]

[ts-7000] Working with /dev/rtc

To:
Subject: [ts-7000] Working with /dev/rtc
From: Mike Magee <>
Date: Tue, 22 Aug 2006 11:25:15 -0700
I am unable to communicate with /dev/rtc using the ioctl() function and
I was wondering if someone could help.  When I try code like this:

fd = open ("/dev/rtc", O_RDONLY);
retval = ioctl(fd, RTC_IRQP_SET, data);

I get the message: "Inappropriate ioctl for device".  In linux/rtc.h
RTC_IRQP_SET is defined to be _IOW('p', 0x0c, unsigned long), and I'm
not really sure what that means.

Here is an outline of the code that worked under the x86 TS-5700 board
that I want to get working on the ARM TS-7260:

fd = open ("/dev/rtc", O_RDONLY);
retval = ioctl(fd, RTC_IRQP_SET, data);
retval = ioctl(fd, RTC_IRQP_READ, &tmp);
retval = ioctl(fd, RTC_PIE_ON, 0);
while(1) {
   // block waiting for next interrupt
   retval = read(fd, &data, sizeof(unsigned long));
   ...do stuff...
}

I am using the default kernel that comes with the development kit
(2.4.26-ts11) and I have the SD Card Socket option and the Battery
Backed Real Time Clock option installed.
-- 
Mike Magee <>
Remtrol Inc.



 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/ts-7000/

<*> To unsubscribe from this group, send an email to:
    

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


<Prev in Thread] Current Thread [Next in Thread>
Admin

Disclaimer: Neither Andrew Taylor nor the University of NSW School of Computer and Engineering take any responsibility for the contents of this archive. It is purely a compilation of material sent by many people to the birding-aus mailing list. It has not been checked for accuracy nor its content verified in any way. If you wish to get material removed from the archive or have other queries about the archive e-mail Andrew Taylor at this address: andrewt@cse.unsw.EDU.AU