projects
/
bertos.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add support for ATMEGA1281.
[bertos.git]
/
drv
/
timer_posix.c
diff --git
a/drv/timer_posix.c
b/drv/timer_posix.c
index 6d6e36735c167cd3fcd8a78a1b1e26c930873847..650e0c970685aec18da83cfab4718e12e8dcd31b 100755
(executable)
--- a/
drv/timer_posix.c
+++ b/
drv/timer_posix.c
@@
-1,4
+1,4
@@
-/*
!
+/*
*
* \file
* <!--
* Copyright 2005 Develer S.r.l. (http://www.develer.com/)
* \file
* <!--
* Copyright 2005 Develer S.r.l. (http://www.develer.com/)
@@
-14,6
+14,12
@@
/*#*
*#* $Log$
/*#*
*#* $Log$
+ *#* Revision 1.6 2006/07/19 12:56:26 bernie
+ *#* Convert to new Doxygen style.
+ *#*
+ *#* Revision 1.5 2006/02/21 21:28:02 bernie
+ *#* New time handling based on TIMER_TICKS_PER_SEC to support slow timers with ticks longer than 1ms.
+ *#*
*#* Revision 1.4 2006/02/17 22:24:21 bernie
*#* Update POSIX timer emulator.
*#*
*#* Revision 1.4 2006/02/17 22:24:21 bernie
*#* Update POSIX timer emulator.
*#*
@@
-55,11
+61,11
@@
static void timer_hw_init(void)
sa.sa_flags = SA_RESTART;
sigaction(SIGALRM, &sa, NULL);
sa.sa_flags = SA_RESTART;
sigaction(SIGALRM, &sa, NULL);
- // Setup POSIX realtime timer to interrupt every 1
0ms
.
+ // Setup POSIX realtime timer to interrupt every 1
/TIMER_TICKS_PER_SEC
.
static struct itimerval itv =
{
static struct itimerval itv =
{
- { 0, 1000
/ TIMER_TICKS_PER_M
SEC }, /* it_interval */
- { 0, 1000
/ TIMER_TICKS_PER_M
SEC } /* it_value */
+ { 0, 1000
000 / TIMER_TICKS_PER_
SEC }, /* it_interval */
+ { 0, 1000
000 / TIMER_TICKS_PER_
SEC } /* it_value */
};
setitimer(ITIMER_REAL, &itv, NULL);
}
};
setitimer(ITIMER_REAL, &itv, NULL);
}