OESF Portables Forum

Model Specific Forums => Sharp Zaurus => Zaurus - pdaXrom => Topic started by: SSG on May 27, 2005, 03:30:05 am

Title: Rtc Alarm Not Worked In Rc 10
Post by: SSG on May 27, 2005, 03:30:05 am
Hi dear All!

   int fd, retval;
   unsigned long  data;
   struct rtc_time rtc_tm;

   /* Open runtime clock device */
   fd = open ("/dev/rtc", O_RDONLY);
      
    /* Enable alarm interrupts */
   retval = ioctl(fd, RTC_AIE_ON, 0);

   /* This blocks until the alarm ring causes an interrupt */
   retval = read(fd, &data, sizeof(unsigned long));

In RC9 this code wakeup my Zaurus from suspend mode in given time, in RC10 this not worked - why?
Title: Rtc Alarm Not Worked In Rc 10
Post by: pgas on May 27, 2005, 03:36:35 am
what is returned by  open ("/dev/rtc", O_RDONLY); ?

Maybe the /dev/rtc is opened by something else?

(I read something about this somewhere but I can't remember where;)
like hwclock called before etc..)

Oh if you are into this you might be intersted in this version of the atd daemon :
http://handhelds.org/cgi-bin/cvsweb.cgi/apps/atd/ (http://handhelds.org/cgi-bin/cvsweb.cgi/apps/atd/)
Title: Rtc Alarm Not Worked In Rc 10
Post by: SSG on May 29, 2005, 08:27:48 am
Thanks for fast reply.
After installing nntp it's worked. I see later why.
(sorry my english)
Title: Rtc Alarm Not Worked In Rc 10
Post by: trichmon on May 29, 2005, 11:16:16 am
So you have writen a piece of code to wake up your zaurus out of suspend?  Thats killer , would you mind sharing it, and how you use it?

Todd
Title: Rtc Alarm Not Worked In Rc 10
Post by: SSG on May 31, 2005, 12:20:47 pm
Quote
So you have writen a piece of code to wake up your zaurus out of suspend?  Thats killer , would you mind sharing it, and how you use it?

Todd
[div align=\"right\"][a href=\"index.php?act=findpost&pid=82015\"][{POST_SNAPBACK}][/a][/div]

for the time being it only simple and little daemon wakeup zaurus and play sound.

need interface for editing and store alarm time.