aboutsummaryrefslogtreecommitdiff
path: root/include/libopencm3/stm32/timer.h
diff options
context:
space:
mode:
authorPiotr Esden-Tempski2011-02-01 22:43:18 -0800
committerPiotr Esden-Tempski2011-02-01 22:43:18 -0800
commitc7587f11ec52157fffd8dbdc6b0d800e349f8bc1 (patch)
treef1e81b61ddb3dfe179fccac436f70a7f0ca1bde2 /include/libopencm3/stm32/timer.h
parentd40fb96fcf6b7415c445df036641ebd1fa00e55c (diff)
Added get flag and get counter functions to timer. Allow proper interrupt handling and recording timer counter values.
Diffstat (limited to 'include/libopencm3/stm32/timer.h')
-rw-r--r--include/libopencm3/stm32/timer.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/libopencm3/stm32/timer.h b/include/libopencm3/stm32/timer.h
index 4ba3c98..7b5df86 100644
--- a/include/libopencm3/stm32/timer.h
+++ b/include/libopencm3/stm32/timer.h
@@ -855,6 +855,7 @@ enum tim_oc_mode {
void timer_reset(u32 timer_peripheral);
void timer_enable_irq(u32 timer_peripheral, u32 irq);
void timer_disable_irq(u32 timer_peripheral, u32 irq);
+bool timer_get_flag(u32 timer_peripheral, u32 flag);
void timer_clear_flag(u32 timer_peripheral, u32 flag);
void timer_set_mode(u32 timer_peripheral, u8 clock_div,
u8 alignment, u8 direction);
@@ -915,5 +916,6 @@ void timer_set_disabled_off_state_in_idle_mode(u32 timer_peripheral);
void timer_set_break_lock(u32 timer_peripheral, u32 lock);
void timer_set_deadtime(u32 timer_peripheral, u32 deadtime);
void timer_generate_event(u32 timer_peripheral, u32 event);
+u32 timer_get_counter(u32 timer_peripheral);
#endif