X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Fcpu%2Fcortex-m3%2Fdrv%2Ftimer_lm3s.c;fp=bertos%2Fcpu%2Fcortex-m3%2Fdrv%2Ftimer_lm3s.c;h=0000000000000000000000000000000000000000;hb=476b69eb75e5eca105bb4b3474df19e6cfdbed68;hp=49b9fa8ec2e6ff373034424b40b669735350ab08;hpb=3afee05888683af8b650a31aa2bad66050570842;p=bertos.git diff --git a/bertos/cpu/cortex-m3/drv/timer_lm3s.c b/bertos/cpu/cortex-m3/drv/timer_lm3s.c deleted file mode 100644 index 49b9fa8e..00000000 --- a/bertos/cpu/cortex-m3/drv/timer_lm3s.c +++ /dev/null @@ -1,72 +0,0 @@ -/** - * \file - * - * - * \brief Low-level timer driver for LM3S1968. - * - * \author Andrea Righi - */ - -#include -#include -#include -#include -#include "timer_lm3s.h" - -INLINE void timer_hw_setPeriod(unsigned long period) -{ - ASSERT(period < (1 << 24)); - HWREG(NVIC_ST_RELOAD) = period - 1; -} - -static void timer_hw_enable(void) -{ - HWREG(NVIC_ST_CTRL) |= - NVIC_ST_CTRL_CLK_SRC | NVIC_ST_CTRL_ENABLE | NVIC_ST_CTRL_INTEN; -} - -static void timer_hw_disable(void) -{ - HWREG(NVIC_ST_CTRL) &= ~(NVIC_ST_CTRL_ENABLE | NVIC_ST_CTRL_INTEN); -} - -void timer_hw_init(void) -{ - timer_hw_setPeriod(CPU_FREQ / TIMER_TICKS_PER_SEC); - sysirq_setHandler(FAULT_SYSTICK, timer_handler); - timer_hw_enable(); -} - -void timer_hw_exit(void) -{ - timer_hw_disable(); - sysirq_freeHandler(FAULT_SYSTICK); -}