projects
/
bertos.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add watchdog driver.
[bertos.git]
/
bertos
/
cpu
/
arm
/
drv
/
timer_at91.c
diff --git
a/bertos/cpu/arm/drv/timer_at91.c
b/bertos/cpu/arm/drv/timer_at91.c
index f1c2887e2b0fe47b850a9ba803b1b2b7a6e91251..0e02d8b40356c17f37ded106e6544201e56d6964 100644
(file)
--- a/
bertos/cpu/arm/drv/timer_at91.c
+++ b/
bertos/cpu/arm/drv/timer_at91.c
@@
-30,8
+30,6
@@
*
* -->
*
*
* -->
*
- * \version $Id$
- *
* \author Francesco Sacchi <batt@develer.com>
*
* \brief Low-level timer module for Atmel AT91 (inplementation).
* \author Francesco Sacchi <batt@develer.com>
*
* \brief Low-level timer module for Atmel AT91 (inplementation).
@@
-50,6
+48,8
@@
/** HW dependent timer initialization */
#if (CONFIG_TIMER == TIMER_ON_PIT)
/** HW dependent timer initialization */
#if (CONFIG_TIMER == TIMER_ON_PIT)
+ ISR_PROTO_CONTEXT_SWITCH(timer_handler);
+
void timer_hw_init(void)
{
sysirq_init();
void timer_hw_init(void)
{
sysirq_init();
@@
-75,6
+75,11
@@
IRQ_RESTORE(flags);
}
IRQ_RESTORE(flags);
}
+ void timer_hw_cleanup(void)
+ {
+ PIT_MR &= ~BV(PITEN);
+ sysirq_setEnable(SYSIRQ_PIT, false);
+ }
#else
#error Unimplemented value for CONFIG_TIMER
#endif /* CONFIG_TIMER */
#else
#error Unimplemented value for CONFIG_TIMER
#endif /* CONFIG_TIMER */