projects
/
bertos.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Serial port support for ATMega1280 (contributed by Fabio Bizzi).
[bertos.git]
/
bertos
/
cpu
/
cortex-m3
/
drv
/
timer_cm3.h
diff --git
a/bertos/cpu/cortex-m3/drv/timer_cm3.h
b/bertos/cpu/cortex-m3/drv/timer_cm3.h
index 3e47d294912bacc447ad4b1bc628001ed79a24b5..6778606d29850b9a4c39cdd867dc7d4e69ccd027 100644
(file)
--- a/
bertos/cpu/cortex-m3/drv/timer_cm3.h
+++ b/
bertos/cpu/cortex-m3/drv/timer_cm3.h
@@
-40,6
+40,9
@@
#include "cfg/cfg_timer.h" /* CONFIG_TIMER */
#include "cfg/cfg_timer.h" /* CONFIG_TIMER */
+#include <cpu/detect.h>
+#include <cpu/irq.h>
+
#if CPU_CM3_LM3S
#include <io/lm3s.h>
#elif CPU_CM3_STM32
#if CPU_CM3_LM3S
#include <io/lm3s.h>
#elif CPU_CM3_STM32
@@
-90,12
+93,7
@@
INLINE hptime_t timer_hw_hpread(void)
{
INLINE hptime_t timer_hw_hpread(void)
{
- return NVIC_ST_CURRENT_R;
- }
-
- INLINE hptime_t timer_hw_hpticks(ticks_t clock)
- {
- return (TIMER_HW_CNT - timer_hw_hpread()) + clock * TIMER_HW_CNT;
+ return (TIMER_HW_CNT - NVIC_ST_CURRENT_R);
}
#else
}
#else