Hi,
I am working on DM355 leopard board which is having 2.6.10 kernel and i want to get the time,data,and year when some externel interrupt comes .how will i do this? plz help me??
Thanks
Printable View
Hi,
I am working on DM355 leopard board which is having 2.6.10 kernel and i want to get the time,data,and year when some externel interrupt comes .how will i do this? plz help me??
Thanks
Huh? What do you mean EXACTLY by "external interrupt". I believe that what you mean by "interrupt" and what I understand it to mean are very different things... :-(
Actually leopard board will take snap whenever some object comes . I want to track the time,date and year whenever it takes snap. For that should i read some rtc registers?? is that different for different processors??
You still are not (for me) being clear enough in what you mean, PRECISELY, by "whenever some object comes"...
hm.. In leopard board there is one camera module so i can take picture . If i am taking picture i want to save the picture as well as time, date and year.
Well, when you save the image, the file system will preserve the created date+time of the image when it was stored. This does not require any additional operations.
Hi
I could print time+date+year from rtc but i want to write it in to a file. Any idea??
rtc_fd = open("/dev/rtc", O_RDONLY,0);
ret = ioctl(rtc_fd, RTC_RD_TIME, &rtc_tm);
printf("Current RTC date/time is %d-%d-%d, %02d:%02d:%02d.\r\n",
rtc_tm.tm_mday, rtc_tm.tm_mon + 1, rtc_tm.tm_year+1900,
rtc_tm.tm_hour, rtc_tm.tm_min, rtc_tm.tm_sec);
Thanks