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/
|