From e85c55a9a70f8f357aceba4cbacd7762ca773d7b Mon Sep 17 00:00:00 2001 From: Piotr Esden-Tempski Date: Mon, 31 Jan 2011 16:15:09 -0800 Subject: Added timer flag reset function. --- lib/stm32/timer.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib/stm32/timer.c') diff --git a/lib/stm32/timer.c b/lib/stm32/timer.c index 15e3b14..8c612ed 100644 --- a/lib/stm32/timer.c +++ b/lib/stm32/timer.c @@ -37,6 +37,11 @@ void timer_disable_irq(u32 timer_peripheral, u32 irq) TIM_DIER(timer_peripheral) &= ~irq; } +void timer_clear_flag(u32 timer_peripheral, u32 flag) +{ + TIM_SR(timer_peripheral) &= ~flag; +} + void timer_set_mode(u32 timer_peripheral, u8 clock_div, u8 alignment, u8 direction) { -- cgit v1.2.3