diff options
author | Ken Sarkies <ksarkies@NewBennie.(none)> | 2013-04-26 10:00:07 +0400 |
---|---|---|
committer | Ken Sarkies <ksarkies@NewBennie.(none)> | 2013-04-26 10:00:07 +0400 |
commit | 92d1134a16903569f2efad5e858e16917e0da155 (patch) | |
tree | 64b243bcc8aded104fad339df134d9483e2969cb /include/libopencm3/stm32/common/timer_common_f24.h | |
parent | cbb4756440fe60b09dd1e19e06178495bf9205fb (diff) |
STM32: moved timer_ic_set_polarity from timer_common_all to
f1/timer.
Added timer_ic_set_polarity to timer_common_f24 with
the enum tim_ic_pol now including trigger on both edges.
Changed timer_slave_set_polarity to use enum tim_et_pol
rather than tim_ic_pol.
In response to suggestion of stinkydiver73 on 24 March that
timers in all families have an option for triggers on both
edges, except F1.
Diffstat (limited to 'include/libopencm3/stm32/common/timer_common_f24.h')
-rw-r--r-- | include/libopencm3/stm32/common/timer_common_f24.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/libopencm3/stm32/common/timer_common_f24.h b/include/libopencm3/stm32/common/timer_common_f24.h index effd43c1..eb17865a 100644 --- a/include/libopencm3/stm32/common/timer_common_f24.h +++ b/include/libopencm3/stm32/common/timer_common_f24.h @@ -85,11 +85,19 @@ Only available in F2 and F4 series. /**@}*/ #define TIM5_OR_TI4_RMP_MASK (0x3 << 6) +/** Input Capture input polarity */ +enum tim_ic_pol { + TIM_IC_RISING, + TIM_IC_FALLING, + TIM_IC_BOTH, +}; + /* --- Function prototypes ------------------------------------------------- */ BEGIN_DECLS void timer_set_option(u32 timer_peripheral, u32 option); +void timer_ic_set_polarity(u32 timer, enum tim_ic_id ic, enum tim_ic_pol pol); END_DECLS |