projects
/
bertos.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Move all pins init into sd hw file.
[bertos.git]
/
bertos
/
drv
/
timer.c
diff --git
a/bertos/drv/timer.c
b/bertos/drv/timer.c
index d75f15abcf85324e525444bd3ad060404f196c56..a411dc4e8be29775aed3cc959f5af49b62f32c00 100644
(file)
--- a/
bertos/drv/timer.c
+++ b/
bertos/drv/timer.c
@@
-158,6
+158,8
@@
INLINE void timer_addToList(Timer *timer, List *queue)
* When the delay indicated by the timer expires, the timer
* device will execute the event associated with it.
*
* When the delay indicated by the timer expires, the timer
* device will execute the event associated with it.
*
+ * You should not call this function on an already running timer.
+ *
* \note Interrupt safe
*/
void timer_add(Timer *timer)
* \note Interrupt safe
*/
void timer_add(Timer *timer)
@@
-252,14
+254,13
@@
void timer_delayTicks(ticks_t delay)
#if CONFIG_KERN_SIGNALS
Timer t;
#if CONFIG_KERN_SIGNALS
Timer t;
-
+ DB(t.magic = TIMER_MAGIC_INACTIVE;)
if (proc_preemptAllowed())
{
if (proc_preemptAllowed())
{
- ASSERT(!sig_check(SIG_SINGLE));
- timer_setSignal(&t, proc_current(), SIG_SINGLE);
+ timer_setEvent(&t);
timer_setDelay(&t, delay);
timer_add(&t);
timer_setDelay(&t, delay);
timer_add(&t);
-
sig_wait(SIG_SINGLE
);
+
timer_waitEvent(&t
);
}
else
#endif /* !CONFIG_KERN_SIGNALS */
}
else
#endif /* !CONFIG_KERN_SIGNALS */