Skip to content

Commit a371df6

Browse files
Victor Costasalkinium
authored andcommitted
[stm32] add enable break in timer
1 parent 2406559 commit a371df6

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/modm/platform/timer/stm32/advanced.hpp.in

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,18 @@ public:
261261
return (TIM{{ id }}->BDTR & TIM_BDTR_MOE);
262262
}
263263
%% if target.family in ["g0"]
264+
static inline void
265+
enableBreak()
266+
{
267+
TIM{{ id }}->BDTR |= TIM_BDTR_BKE;
268+
}
269+
270+
static inline void
271+
disableBreak()
272+
{
273+
TIM{{ id }}->BDTR &= ~(TIM_BDTR_BKE);
274+
}
275+
264276
static inline void
265277
enableBreakInput()
266278
{

0 commit comments

Comments
 (0)