Author Topic: Rtc Alarm Not Worked In Rc 10  (Read 3019 times)

SSG

  • Newbie
  • *
  • Posts: 16
    • View Profile
Rtc Alarm Not Worked In Rc 10
« 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?

pgas

  • Hero Member
  • *****
  • Posts: 1097
    • View Profile
    • http://
Rtc Alarm Not Worked In Rc 10
« Reply #1 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/
SLC-860 cacko / senao wifi

SSG

  • Newbie
  • *
  • Posts: 16
    • View Profile
Rtc Alarm Not Worked In Rc 10
« Reply #2 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)

trichmon

  • Full Member
  • ***
  • Posts: 148
    • View Profile
Rtc Alarm Not Worked In Rc 10
« Reply #3 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
SL-6000l running pdaXrom RC12 icewm + rox
Targus keyboard
Trendnet cf 10/100 ethernet
Linksys CF wireless
Sandisk 256mb SD card
Lexar 1gig SD card
SL-5500 running zynergy rom

SSG

  • Newbie
  • *
  • Posts: 16
    • View Profile
Rtc Alarm Not Worked In Rc 10
« Reply #4 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.