Hi stepa,
> What I need is an event that calls a function at regular times
I'm assuming you want to access the hardware directly? ... Without
using the serial driver? If so, you can use the select() system call to wakeup
periodically. E.g.:<div class='quotetop'>QUOTE </div>
--- Quote Start ---
while (1) {
/* Wait for 100 ms */
tv.tv_sec = 0;
tv.tv_usec = 100 * 1000;
result =
select (0, NULL, NULL, NULL, &tv); /* Sleep */
/* Do the periodic check */
}[/b]
--- Quote End ---
See the manpage for details on select() -- it's a pretty complete manpage :-)
Regards,
--Scott