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.
This commit is contained in:
Ken Sarkies
2013-04-26 15:30:07 +09:30
parent cbb4756440
commit 92d1134a16
6 changed files with 71 additions and 24 deletions

View File

@@ -37,4 +37,18 @@ LGPL License Terms @ref lgpl_license
#include <libopencm3/stm32/common/timer_common_all.h>
/** Input Capture input polarity */
enum tim_ic_pol {
TIM_IC_RISING,
TIM_IC_FALLING,
};
/* --- Function prototypes ------------------------------------------------- */
BEGIN_DECLS
void timer_ic_set_polarity(u32 timer, enum tim_ic_id ic, enum tim_ic_pol pol);
END_DECLS
#endif